![]() |
VR-Forces 4.8 Class Documentation
|
An area of ground fog patch items and effects. More...
Classes | |
| struct | BoneWeight |
| A structure used to define a skeleton bone weight. More... | |
| struct | DrawData |
| A structure used to hold data for drawing. More... | |
| struct | MeshGroup |
| A structure used to define a mesh group (voa, positions, coords). More... | |
Public Types | |
| enum | AREA_TYPE { AREA_TYPE_PATCHY_GROUND_FOG, AREA_TYPE_SANDSTORM } |
| brief Area type enumerations. More... | |
Public Member Functions | |
| DtGroundFogPatchArea (makVrv::DtDe &de) | |
| CTOR. More... | |
| virtual | ~DtGroundFogPatchArea () |
| DTOR. More... | |
| virtual void | init (float worldSize, float thickness) |
| Initializes the area. More... | |
| virtual void | addEffect (DtGroundFogEffect *effect) |
| brief Adds an effect to this area. More... | |
| virtual void | releaseFogPatchGLObjects (osg::State *state) const |
| Release all gl objects used by fog patches in this area. More... | |
| virtual void | releaseFogEffectGLObjects (osg::State *state) const |
| Release all gl objects used by fog effects in this area. More... | |
| virtual void | cullUpdate (const osg::Vec3d &camPos, const osg::Matrixd &viewMatrixI, const std::vector< osg::Vec4d > &cullingPlanes, DtJobSplitter *jobSplitter) |
| Updates ground fog area based on the current camera. More... | |
| virtual bool | shouldDrawFogPatches () |
| Returns true if drawing of fog patches is allowed this draw. More... | |
| virtual void | drawFogPatches (DtGroundFogPatchArea::DrawData &drawData) |
| Do the drawing of fog patches. More... | |
| virtual void | drawFogEffects (DtGroundFogEffect::DrawData &drawData) |
| Do the drawing of fog effects. More... | |
| virtual void | setDensity (float density) |
| brief Set the fog density. More... | |
| virtual float | density () const |
| brief Returns the fog density. More... | |
| virtual void | setTransform (const DtVector &position, float orientation, bool relativeToCamera=false) |
| Sets the fog area transform. More... | |
| virtual void | setEnabled (bool enabled) |
| Enables or disables the fog patch area. More... | |
| virtual bool | enabled () const |
| Returns the enabled state. More... | |
| virtual void | setClampingEnabled (bool enabled) |
| Enables or disables fog clamping to terrain. More... | |
| virtual bool | clampingEnabled () const |
| Returns the clamping enabled state. More... | |
| virtual float | worldSize () const |
| Returns the world size of 1 side of the square area. More... | |
| virtual void | setBounds (const DtVector &bounds, float cornerRadius) |
| Sets the bounds of the area. More... | |
| virtual bool | isPositionAboveArea (const osg::Vec3d &position) |
| Returns true if the given position is above the area peak. More... | |
| virtual void | setBaseColor (float red, float green, float blue) |
| Sets the base material color for the area. More... | |
| virtual void | setParticleSizeVariation (float variation) |
| Sets a size variation for particles used to fill voxel space. More... | |
| virtual void | setPatternedLook (bool patternedEnable) |
| Enables or disables a patterned look (typically "true" for sandstorms). More... | |
| virtual void | setAreaType (DtGroundFogPatchArea::AREA_TYPE areaType) |
| Sets a type for this area. More... | |
| virtual DtGroundFogPatchArea::AREA_TYPE | areaType () const |
| Gets a area type for this area. More... | |
Protected Member Functions | |
| virtual void | freeData (void) |
| Frees resources associated with patches. More... | |
| virtual void | computeWeights (float x, float y, float patchSize, float *bones, float *weights) |
| Computes a skeletal weights for a local cell position. More... | |
| virtual void | initLod (int gridSize, float patchSize) |
| Initializes an lod for a patch. More... | |
| virtual bool | bindMeshGroupData (MeshGroup *meshGroup, osg::RenderInfo &renderInfo) const |
| Binds the mesh group data to the vbo's. More... | |
| virtual bool | bindVaoToMeshGroup (GLuint vao, MeshGroup *meshGroup, osg::RenderInfo &renderInfo) const |
| Binds the given voa to vbo's for a mesh group. More... | |
| virtual void | computeBasis (const osg::Vec3d &inGeocentricPos, osg::Matrixd &rotOut) |
| Ccomputes a basis rotation matrix for the given geocentric position. More... | |
| virtual void | computeSortDepth (const osg::Vec3 &camPos) |
| Computes the sort depth for all patches. More... | |
| virtual void | inverseTransformPlane (osg::Vec4d &plane, const osg::Vec3d &position, const osg::Matrixd &rotation) |
| Transforms a plane into a local transform space. More... | |
| virtual bool | isSphereVisible (const std::vector< osg::Vec4d > &planes, const osg::Vec3d ¢er, double radius) |
| Tests to see if a sphere is visible using the given frustum planes. More... | |
| virtual void | computeBoundsCulling () |
| For each patch, computes if it is culled from the bounds and stores results. More... | |
| virtual float | computeEffectFade (const osg::Vec3 &localCam) |
| Computes and returns a (0.0 - 1.0) base on camera position inside the bounds. More... | |
| virtual double | clampDistance () const |
| Returns the distance used for bone clamping to the terrain. More... | |
| virtual bool | clampPosition (osg::Vec3d &position) |
| Clamps a position to the terrain. More... | |
| virtual float | computeParticleSize () |
| Computes the particle size used for voxel filling. More... | |
| virtual float | computePatchCellSize () |
| Computes the cell size used in a fog patch. More... | |
Static Protected Member Functions | |
| static int | theSortWeights (const void *arg0, const void *arg1) |
| Sort function used for sorting skeletal weights. More... | |
| static int | theSortBackToFront (const void *arg0, const void *arg1) |
| Sort function used for qsorting patches. More... | |
Protected Attributes | |
| DtDe & | myDe |
| float | myDensity |
| bool | myEnabled |
| float | myWindU |
| float | myWindV |
| double | myLastWindTime |
| bool | myCameraBasisDirty |
| bool | myInitialized |
| bool | myClampingEnabled |
| int | myClampIndex |
| int | myClampBoneIndex |
| float | myMaxClampOffset |
| float | myBaseColorR |
| float | myBaseColorG |
| float | myBaseColorB |
| float | myParticleSizeVariation |
| float | myPatternedLook |
| AREA_TYPE | myAreaType |
| MeshGroup * | myMeshGroup |
| DtGlVaoManager * | myVaoManager |
| osg::Vec3d | myPosition |
| float | myOrientation |
| osg::Vec3d | myBasisPos |
| osg::Matrixd | myBasisRot |
| float | myBoundsX |
| float | myBoundsY |
| float | myBoundsCornerRadius |
| int | myGridSize |
| float | myPatchWorldSize |
| std::vector< DtGroundFogPatch * > | myPatches |
| int | myPatchCount |
| DtGroundFogPatch ** | myRenderPatches |
| int | myRenderPatchCount |
| std::vector< DtGroundFogEffect * > | myEffects |
Static Protected Attributes | |
| static const double | DT_GFP_CLAMP_DISTANCE |
| static const int | DT_GFP_CELL_SIZE |
Private Member Functions | |
| DtGroundFogPatchArea () | |
| Default Constructor not implemented. More... | |
| DtGroundFogPatchArea (const DtGroundFogPatchArea &other) | |
| Copy Constructor not implemented - Copy not allowed. More... | |
| DtGroundFogPatchArea & | operator= (const DtGroundFogPatchArea &other) |
| Assignment Operator not implemented - Assignment not allowed. More... | |
An area of ground fog patch items and effects.
One ground fog patch area is associated with a non-infinite ground fog cloud layer in the user interface. The area is made up of a rectangular 2d grid of ground fog patch items.
Optionally, ground fog particle effects are added to the area and activated as the camera moves through the area. This area object can be thought of as a manager for fog patches and effects that are within a specified bounds.
Note that sandstorms are also created using a ground fog patch area. The main differences between ground fog and sandstorms are the way the areas are configured such as base color and effects.
| makVrv::DtGroundFogPatchArea::DtGroundFogPatchArea | ( | makVrv::DtDe & | de | ) |
CTOR.
|
virtual |
DTOR.
|
private |
Default Constructor not implemented.
|
private |
Copy Constructor not implemented - Copy not allowed.
|
private |
Assignment Operator not implemented - Assignment not allowed.
|
virtual |
Initializes the area.
| worldSize | The world size of 1 horizontal square side (meters). |
| thickness | The vertical height of the area (meters). |
|
virtual |
brief Adds an effect to this area.
| effect | This effect object to add. |
|
virtual |
Release all gl objects used by fog patches in this area.
|
virtual |
Release all gl objects used by fog effects in this area.
|
virtual |
Updates ground fog area based on the current camera.
| cam | The current camera being drawn. |
| jobSplitter | A job splitter to add predraw jobs to. |
|
virtual |
Returns true if drawing of fog patches is allowed this draw.
|
virtual |
Do the drawing of fog patches.
|
virtual |
Do the drawing of fog effects.
|
virtual |
brief Set the fog density.
| density | This fog density exp() control. |
|
virtual |
brief Returns the fog density.
|
virtual |
Sets the fog area transform.
| position | The transform position in world space. |
| oritantation | The yaw orientation in degrees (0 = north). |
| relativeToCamera | Set to true if the position is relative to the current camera. |
|
virtual |
Enables or disables the fog patch area.
| enabled | Set to true to enable the area. |
|
virtual |
Returns the enabled state.
|
virtual |
Enables or disables fog clamping to terrain.
| enabled | Set to true to enable clamping. |
|
virtual |
Returns the clamping enabled state.
|
virtual |
Returns the world size of 1 side of the square area.
|
virtual |
Sets the bounds of the area.
| bounds | The (x,y,z) of the bounds. |
| cornerRadius | The radius at each corner of the bounds. |
|
virtual |
Returns true if the given position is above the area peak.
| position | The position to test. |
|
virtual |
Sets the base material color for the area.
| red | The red component color to set in the range of (0.0 - 1.0). |
| green | The green component color to set in the range of (0.0 - 1.0). |
| blue | The blue component color to set in the range of (0.0 - 1.0). |
|
virtual |
Sets a size variation for particles used to fill voxel space.
| variation | The random variation (typically 0.0 to 0.5). |
|
virtual |
Enables or disables a patterned look (typically "true" for sandstorms).
Setting this to true or false will determine how shading and patchiness are applied in the ground fog patch shader.
| patternedEnable | If true, enables a patterned look. |
|
virtual |
Sets a type for this area.
The type is used for determining things like how the area looks in sensors. areaType The area type enumeration.
|
virtual |
Gets a area type for this area.
The area type is used for determining things like how the area looks in sensors.
|
protectedvirtual |
Frees resources associated with patches.
|
protectedvirtual |
Computes a skeletal weights for a local cell position.
| x | The x cell position. |
| y | The y cell position. |
| patchSize | The world size of a patch row. |
| weights | An array of 4 floats to be filled with best bone indices. |
| weights | An array of 4 floats to be filled with best best weights. |
|
protectedvirtual |
Initializes an lod for a patch.
| gridSize | The number of cells in 1 row of a patch. |
| patchSize | The world size of a patch row. |
|
protectedvirtual |
Binds the mesh group data to the vbo's.
| meshGroup | The mesh group object to bind. |
| renderInfo | The current rendering info. |
|
protectedvirtual |
Binds the given voa to vbo's for a mesh group.
| vao | The GL VAO handle. |
| meshGroup | The mesh group to bind. |
| renderInfo | The current rendering info. |
|
protectedvirtual |
Ccomputes a basis rotation matrix for the given geocentric position.
| inGeocentricPos | The geocentric reference position. |
| rotOut | The computed basis rotation transform. |
|
protectedvirtual |
Computes the sort depth for all patches.
| camPos | The camera position in local fog system space. |
|
protectedvirtual |
Transforms a plane into a local transform space.
| plane | The plane to transform. |
| position | The transform position. |
| rotation | the transform rotation. |
|
protectedvirtual |
Tests to see if a sphere is visible using the given frustum planes.
| planes | The frustum planes to test the sphere against. |
| center | The sphere center position. |
| radius | the sphere radius. |
|
protectedvirtual |
For each patch, computes if it is culled from the bounds and stores results.
|
protectedvirtual |
Computes and returns a (0.0 - 1.0) base on camera position inside the bounds.
|
protectedvirtual |
Returns the distance used for bone clamping to the terrain.
|
protectedvirtual |
Clamps a position to the terrain.
Returns true on success.
| position | The position to clamp. |
|
protectedvirtual |
Computes the particle size used for voxel filling.
|
protectedvirtual |
Computes the cell size used in a fog patch.
|
staticprotected |
Sort function used for sorting skeletal weights.
|
staticprotected |
Sort function used for qsorting patches.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |