![]() |
VR-Forces 4.10 Class Documentation
|
This class simulates and renders a rain shaft area. More...

Classes | |
| 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... | |
| struct | Particle |
| A structure used to define a particle. More... | |
| struct | SortJobData |
| A structure to hold data for a sorting job. More... | |
Public Member Functions | |
| virtual | ~DtWeatherRainShaft () |
| DTOR. More... | |
| DtWeatherRainShaft ()=delete | |
| Default Constructor not implemented. More... | |
| DtWeatherRainShaft (const DtWeatherRainShaft &other)=delete | |
| Copy Constructor not implemented - Copy not allowed. More... | |
| DtWeatherRainShaft & | operator= (const DtWeatherRainShaft &other)=delete |
| Assignment Operator not implemented - Assignment not allowed. More... | |
| virtual void | init () |
| Called after creation to initialize effects. More... | |
| virtual void | releaseGLObjects (osg::State *state) const |
| Release all gl objects used by items in this layer. More... | |
| virtual bool | cullUpdate (const osg::Vec3d &camPos, const osg::Matrixd &viewMatrixI, const std::vector< osg::Vec4d > &cullingPlanes, DtJobSplitter *jobSplitter) |
| Culls the area based on the current camera. More... | |
| virtual bool | isPositionAboveArea (const osg::Vec3d &position) |
| Returns true if the given position is above the rain shaft. More... | |
| virtual void | draw (DtWeatherRainShaft::DrawData &drawData) |
| Draw rain shafts. More... | |
| virtual void | setBounds (const DtVector &bounds, float cornerRadius) |
| Sets the bounds of the object. More... | |
| virtual void | setTransform (const osg::Vec3d &position, const osg::Matrixd &rotation) |
| Sets the object transform. More... | |
| virtual void | setIntensity (const float intensity) |
| Sets the intensity. More... | |
| virtual void | setBaseColor (const DtVector &color) |
| Sets a base color for the rain shaft lighting. More... | |
| virtual void | setWind (const float windDirectionRad, const float windSpeedMps) |
| Sets the current wind. More... | |
| virtual void | runSort (const osg::Vec3 &localCamPos) |
| Sorts particles for the current view. More... | |
| virtual void | setEnabled (bool enabled) |
| Enables or disables the rain shaft. More... | |
| virtual bool | enabled () const |
| Returns the enabled state. More... | |
| virtual bool | culled () const |
| Returns the culled state. More... | |
| virtual void | computeBounds (osg::Vec4 &bounds, osg::Vec3d &position, osg::Matrixd &rotation) const |
| Computes the bounds of the area. More... | |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| Do nothing constructor. More... | |
| virtual | ~DtVirtualBaseClass () |
| Virtual do nothing destructor. More... | |
Protected Member Functions | |
| DtWeatherRainShaft (makVrv::DtDe &de) | |
| CTOR. More... | |
| virtual bool | positionInBounds2D (const float x, const float y, const osg::Vec3 &bounds) |
| Checks to see if the local 2D position is within the bounds. More... | |
| virtual float | computeRandomMinMax (float fMin, float fMax) |
| Computes a random floating point value in the min max range. More... | |
| virtual void | computeSortDepth (const osg::Vec3 &reference) |
| Computes the sort depth for all cells. More... | |
| virtual void | fillSortedParticles () |
| Fills the gpu buffer with sorted particle data. More... | |
| virtual bool | bindMeshGroupData (MeshGroup *meshGroup, osg::RenderInfo &renderInfo) const |
| Binds the mesh group data to the vbo's. More... | |
| virtual bool | bindDynamicMeshGroupData (MeshGroup *meshGroup, osg::RenderInfo &renderInfo) const |
| Binds the dynamic 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 bool | isSphereVisible (const std::vector< osg::Vec4d > &planes, const osg::Vec3d ¢er, double radius) const |
| Tests to see if a sphere is visible using the given frustum planes. More... | |
Static Protected Member Functions | |
| static int | theSortBackToFront (const void *arg0, const void *arg1) |
| sort function used for qsorting particles More... | |
| static void | theSortJob (void *data) |
| sort job function used as a callback for job splitting More... | |
Protected Attributes | |
| DtDe & | myDe |
| bool | myEnabled |
| bool | myCulled |
| MeshGroup * | myMeshGroup |
| DtGlVaoManager * | myVaoManager |
| osg::Vec3d | myPosition |
| osg::Matrixd | myRotation |
| float | myBoundsX |
| float | myBoundsY |
| float | myBoundsZ |
| float | myBoundsCornerRadius |
| float | myParticleWidth |
| float | myIntensity |
| osg::Vec3 | myBaseColor |
| Particle * | myParticles |
| int | myParticlePoolCount |
| int | myParticleActiveCount |
| SortJobData | mySortJobData |
| DtJobSplitterJob | mySortJob |
| DtRandomNumberGenerator | myRandomNumberGen |
| unsigned int | myRandomSeed |
| float | myWindDirectionRad |
| float | myWindSpeedMps |
Friends | |
| class | DtWeatherRainShaftFactory |
This class simulates and renders a rain shaft area.
The area volume is filled with a density of particles that are as tall as the bounds. The particles use a shader to give the illusion of falling rain. The particles bend in the wind direction depending on wind strength. An intensity value can be set to increase or decrease the visibility of the effect.
|
virtual |
DTOR.
|
delete |
Default Constructor not implemented.
|
delete |
Copy Constructor not implemented - Copy not allowed.
|
protected |
CTOR.
|
delete |
Assignment Operator not implemented - Assignment not allowed.
|
virtual |
Called after creation to initialize effects.
|
virtual |
Release all gl objects used by items in this layer.
|
virtual |
Culls the area based on the current camera.
| cam | The current camera being drawn. |
| jobSplitter | A job splitter to add predraw jobs to. Returns true if visible. |
|
virtual |
Returns true if the given position is above the rain shaft.
| position | The position to test. |
|
virtual |
Draw rain shafts.
|
virtual |
Sets the bounds of the object.
| bounds | The (x,y,z) of the bounds. |
| cornerRadius | The radius at each corner of the bounds. |
|
virtual |
Sets the object transform.
| position | The transform position in world space. |
| orientation | The yaw orientation in degrees (0 = north). |
|
virtual |
Sets the intensity.
| intensity | The intensity (affects visibility). |
|
virtual |
Sets a base color for the rain shaft lighting.
| color | The rgb color values (0.0 - 1.0 scale). |
|
virtual |
Sets the current wind.
| windDirectionRad | The wind direction in radians. |
| windSpeedMps | The wind speed in meters per second. |
|
virtual |
Sorts particles for the current view.
Fills indice buffer.
| localCamPos | The local camera position. |
|
virtual |
Enables or disables the rain shaft.
| enabled | Set to true to enable the rain shaft. |
|
virtual |
Returns the enabled state.
|
virtual |
Returns the culled state.
This will indicate if the rain shaft was culled during the last scenegraph culling pass.
|
virtual |
Computes the bounds of the area.
| bounds | The output (width, length, height, corner radius). |
| position | The output world postition. |
| rotation | The output world rotation. |
|
protectedvirtual |
Checks to see if the local 2D position is within the bounds.
Uses the current bound corner radius.
| x | The local x position |
| y | The local y position. |
| bounds | The (x, y, corner radius) bounds. |
|
protectedvirtual |
Computes a random floating point value in the min max range.
| min | The minimum value. |
| max | The maximum value. |
|
protectedvirtual |
Computes the sort depth for all cells.
| reference | The reference position to compute sort depth from. |
|
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 |
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. |
|
staticprotected |
sort function used for qsorting particles
|
staticprotected |
sort job function used as a callback for job splitting
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |