![]() |
VR-Forces 5.0.1 Developer's Guide
|
this class is used to create an effect around the eye to represent blowing particle effects such as sand. The effect is made from a particle system with simple wind physics applied. Effects can be added to a ground fog area. Each effect is initialized with a fixed particle count, particle size, and effect radius around the eye. Note that sandstorms also make use of this effect class.
Classes | |
| struct | DrawData |
| struct | MeshGroup |
| struct | Particle |
| struct | SortJobData |
Public Member Functions | |
| DtGroundFogEffect (makVrv::DtDe &de) | |
| virtual | ~DtGroundFogEffect () |
| virtual void | init (int particleCount, float particleSize, float radius) |
| virtual void | releaseGLObjects (osg::State *state) const |
| virtual void | draw (DtGroundFogEffect::DrawData &drawData, const osg::Vec3 &baseColor) const |
| virtual void | cullUpdate (const osg::Vec3d &camPos, DtJobSplitter *jobSplitter) |
| virtual void | setEnable (bool enable) |
| virtual void | setWind (float windDirectionRad, float windSpeedMps) |
| virtual void | setWindSpeedMultiplier (float multiplier) |
| virtual void | setWindLiftMultiplier (float multiplier) |
| virtual void | setWindTurbulence (float multiplier) |
| virtual void | setDensity (float density) |
| virtual void | setEffectFade (float fade) |
| virtual void | setIntensityPerWindRamp (float start, float end) |
| virtual float | computeIntensityPerWind () |
| virtual void | setBasisRotation (const osg::Matrixd &rotation) |
| virtual void | setColorMult (float r, float g, float b) |
| virtual float | radius () const |
| virtual void | runSort (const osg::Vec3 &localCamPos) |
Protected Member Functions | |
| virtual void | connectSignals () |
| virtual void | disconnectSignals () |
| virtual void | slot_simulationUpdate () |
| virtual void | computeSortDepth (const osg::Vec3 &reference) |
| virtual void | fillSortedParticles () |
| virtual bool | bindMeshGroupData (MeshGroup *meshGroup, osg::RenderInfo &renderInfo) const |
| virtual bool | bindDynamicMeshGroupData (MeshGroup *meshGroup, osg::RenderInfo &renderInfo) const |
| virtual bool | bindVaoToMeshGroup (GLuint vao, MeshGroup *meshGroup, osg::RenderInfo &renderInfo) const |
| virtual void | simulateParticles (float timeStep, double currentTime) |
| void | wrapPosition (float &posX, float &posY, float &posZ) |
Protected Attributes | |
| DtDe & | myDe |
| osg::Matrixd | myBasisRot |
| bool | myEnable |
| osg::Vec3 | myScroll |
| float | myRadius |
| float | myWindDirectionRad |
| float | myWindSpeedMps |
| float | myWindSpeedMultiplier |
| float | myWindLiftMultiplier |
| float | myWindTurbulence |
| double | myLastTime |
| float | myEffectFade |
| float | myParticleSize |
| osg::Vec3 | myColorMult |
| float | mfIntensityPerWindStart |
| float | mfIntensityPerWindEnd |
| float | myDensity |
| MeshGroup * | myMeshGroup |
| DtGlVaoManager * | myVaoManager |
| Particle * | myParticles |
| int | myParticleCount |
| SortJobData | mySortJobData |
| DtJobSplitterJob | mySortJob |
Private Member Functions | |
| DtGroundFogEffect () | |
| DtGroundFogEffect (const DtGroundFogEffect &other) | |
| DtGroundFogEffect & | operator= (const DtGroundFogEffect &other) |
Static Private Member Functions | |
| static int | theSortBackToFront (const void *arg0, const void *arg1) |
| static void | theSortJob (void *data) |
| makVrv::DtGroundFogEffect::DtGroundFogEffect | ( | 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 |
Initialize the effect.
|
virtual |
Release all gl objects used by this object.
|
virtual |
Issues the drawing command for the effect.
|
virtual |
Prepares the patch for drawing bsed on the camera position.
| camPos | The camera position in fog system space. |
| jobSplitter | A job splitter to add predraw jobs to. |
|
virtual |
Sets the enable flag to enable or disable the effect.
| enable | The enable state to set. |
|
virtual |
Sets the current wind.
| windDirectionRad | The wind direction in radians. |
| windSpeedMps | The wind speed in meters per second. |
|
virtual |
Sets a wind speed multiplier used for particle physics.
| multiplier | The multiplier value. |
|
virtual |
Sets a wind lift multiplier used for particle physics.
| multiplier | The lift multiplier value can be positive (up) or negative (down). |
|
virtual |
Sets a wind turbulence multiplier for particle physics.
| multiplier | The multiplier value (basically height deviation in meters). |
|
virtual |
Sets a density value to control exp2 distance thickness (generally <= 1.0). The higher the density, the more the effect becomes apparent closer to the eye.
|
virtual |
Sets a (0.0 - 1.0) value to control the effect fade.
|
virtual |
Sets an intensity ramp based on wind speed.
| start | The starting wind speed in mps. (no effect) |
| end | The ending wind speed in mps. (full effect) |
|
virtual |
Returns an intensity (0.0 - 1.0) based on current wind and wind ramp.
|
virtual |
Sets the current basis rotation used for earth calculations.
|
virtual |
Sets a base color color multiplier.
| (r,g,b) | The r,g,b multiplier values. |
|
virtual |
Returns the radius of the effect.
|
virtual |
Sorts particles for the current view. Fills indice buffer.
| localCamPos | The local camera position. |
|
protectedvirtual |
Connects all the signals, Non-virtural, called in the ctor.
|
protectedvirtual |
Disconnects all the signals, called in the dtor.
|
protectedvirtual |
Signal handler to run a simulation update.
|
protectedvirtual |
Computes the sort depth for all cells.
|
protectedvirtual |
Fills the gpu buffer with sorted particle data.
|
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 dynamic 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 |
Simulates particle life (movements, etc...).
timeStep The change in time. currentTime The current simulation time.
|
protected |
Keeps the given position in the effect radius.
posX The X position to constrain. posY The Y position to constrain. posZ The Z position to constrain.
|
staticprivate |
sort function used for qsorting particles
|
staticprivate |
sort job function used as a callback for job splitting
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |