21 #include <matrix/vlVector.h>
29 class DtWeatherAreaGroup;
30 class DtWeatherRainShaftFactory;
51 , myParametersUnfmLoc(0)
52 , myTransformUnfmLoc(0)
54 , myWeatherAreaGroup(0)
93 virtual void releaseGLObjects(osg::State* state)
const;
99 virtual bool cullUpdate(
const osg::Vec3d& camPos,
const osg::Matrixd& viewMatrixI,
100 const std::vector<osg::Vec4d>& cullingPlanes,
DtJobSplitter* jobSplitter);
104 virtual bool isPositionAboveArea(
const osg::Vec3d& position);
112 virtual void setBounds(
const DtVector& bounds,
float cornerRadius);
117 virtual void setTransform(
const osg::Vec3d& position,
const osg::Matrixd& rotation);
121 virtual void setIntensity(
const float intensity);
125 virtual void setBaseColor(
const DtVector& color);
130 virtual void setWind(
const float windDirectionRad,
const float windSpeedMps);
134 virtual void runSort(
const osg::Vec3& localCamPos);
138 virtual void setEnabled(
bool enabled);
141 virtual bool enabled()
const;
145 virtual bool culled()
const;
151 virtual void computeBounds(osg::Vec4& bounds, osg::Vec3d& position, osg::Matrixd& rotation)
const;
159 : myVboPositionArray(0)
160 , myVboTexCoords0Array(0)
161 , myVboIndicesArray(0)
165 myPoints =
new osg::Vec4Array;
166 myTexCoords0 =
new osg::Vec2Array;
184 , myPosition(0, 0, 0, 0)
198 virtual bool positionInBounds2D(
const float x,
const float y,
const osg::Vec3& bounds);
203 virtual float computeRandomMinMax(
float fMin,
float fMax);
207 virtual void computeSortDepth(
const osg::Vec3& reference);
210 virtual void fillSortedParticles();
215 virtual bool bindMeshGroupData(
MeshGroup* meshGroup, osg::RenderInfo& renderInfo)
const;
220 virtual bool bindDynamicMeshGroupData(
MeshGroup* meshGroup, osg::RenderInfo& renderInfo)
const;
226 virtual bool bindVaoToMeshGroup(
GLuint vao,
MeshGroup* meshGroup, osg::RenderInfo& renderInfo)
const;
232 virtual bool isSphereVisible(
const std::vector<osg::Vec4d>& planes,
const osg::Vec3d& center,
double radius)
const;
237 static int theSortBackToFront(
const void* arg0,
const void* arg1);
240 static void theSortJob(
void* data);
248 : myWeatherRainShaft(0)
249 , myLocalCameraPos(0, 0, 0)
320 static const std::string& theClassName();
DT_DLL_EXAMPLESCENEROOTPLUGIN void init(DtDe &anIG)
MeshGroup()
Definition: DtWeatherRainShaft.h:158
This class simulates and renders a rain shaft area.
Definition: DtWeatherRainShaft.h:39
osg::Vec3 myBaseColor
Definition: DtWeatherRainShaft.h:277
Virtual base class.
Definition: DtVirtualBaseClass.h:19
Implementation independent random number generator.
Definition: DtRandomNumberGenerator.h:20
float myWindDirectionRad
Definition: DtWeatherRainShaft.h:289
float myParticleWidth
Definition: DtWeatherRainShaft.h:274
GLint myTransformUnfmLoc
Definition: DtWeatherRainShaft.h:64
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Particle * myParticles
Definition: DtWeatherRainShaft.h:279
unsigned int myIndicesCount
Definition: DtWeatherRainShaft.h:172
GLint myBoxUnfmLoc
Definition: DtWeatherRainShaft.h:65
SortJobData mySortJobData
Definition: DtWeatherRainShaft.h:283
Factory that is used to create weather rain shaft areas.
Definition: DtWeatherRainShaft.h:297
unsigned int GLuint
Definition: DtGlTextureBufferObject.h:17
Contains makVrv::DtDe class.
this class is used to split work up between threads.
Definition: DtJobSplitter.h:64
unsigned int myVboIndicesArray
Definition: DtWeatherRainShaft.h:176
A group node which serves as a root for weather areas, patchy ground fog areas and effects...
Definition: DtWeatherAreaGroup.h:72
float myBoundsCornerRadius
Definition: DtWeatherRainShaft.h:272
osg::ref_ptr< osg::Vec4Array > myPoints
Definition: DtWeatherRainShaft.h:169
A structure used to define a particle.
Definition: DtWeatherRainShaft.h:180
A structure used to hold data for drawing.
Definition: DtWeatherRainShaft.h:46
Contains makVrv::DtVirtualBaseClass class.
DtRandomNumberGenerator myRandomNumberGen
Definition: DtWeatherRainShaft.h:286
bool myCulled
Definition: DtWeatherRainShaft.h:261
Contains makVrv::DtRandomNumberGenerator class.
unsigned int myVboPositionArray
Definition: DtWeatherRainShaft.h:174
DtDe & myDe
Definition: DtWeatherRainShaft.h:258
osg::Matrixd myRotation
Definition: DtWeatherRainShaft.h:267
osg::Vec3d myCamPos
Definition: DtWeatherRainShaft.h:61
Contains makVrv::DtJobSplitter class.
float myBoundsZ
Definition: DtWeatherRainShaft.h:271
unsigned short * myIndices
Definition: DtWeatherRainShaft.h:171
DtJobSplitterJob mySortJob
Definition: DtWeatherRainShaft.h:284
DtGlVaoManager * myVaoManager
Definition: DtWeatherRainShaft.h:264
float myIntensity
Definition: DtWeatherRainShaft.h:276
float myBoundsX
Definition: DtWeatherRainShaft.h:269
DtWeatherRainShaft * myWeatherRainShaft
Definition: DtWeatherRainShaft.h:254
int myParticleActiveCount
Definition: DtWeatherRainShaft.h:281
osg::ref_ptr< osg::Vec2Array > myTexCoords0
Definition: DtWeatherRainShaft.h:170
GLint myParametersUnfmLoc
Definition: DtWeatherRainShaft.h:63
float myBoundsY
Definition: DtWeatherRainShaft.h:270
Particle()
Definition: DtWeatherRainShaft.h:182
osg::RenderInfo * myRenderInfo
Definition: DtWeatherRainShaft.h:60
osg::Matrixd myViewMatrix
Definition: DtWeatherRainShaft.h:62
A generic structure to hold data for a job for use with DtJobSplitter.
Definition: DtJobSplitter.h:26
osg::StateSet * myState
Definition: DtWeatherRainShaft.h:67
This class is used to manage an opengl vertex array object (VAO) dealing with multiple opengl context...
Definition: DtGlVaoManager.h:49
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
A structure used to define a mesh group (voa, positions, coords).
Definition: DtWeatherRainShaft.h:156
SortJobData()
Definition: DtWeatherRainShaft.h:247
DtDe & myDe
Definition: DtWeatherRainShaft.h:327
const DtWeatherAreaGroup * myWeatherAreaGroup
Definition: DtWeatherRainShaft.h:66
osg::Vec3d myPosition
Definition: DtWeatherRainShaft.h:266
float mySortDepth
Definition: DtWeatherRainShaft.h:189
Contains the DtGlVaoManager class declaration.
unsigned int myRandomSeed
Definition: DtWeatherRainShaft.h:287
DrawData()
Definition: DtWeatherRainShaft.h:48
MeshGroup * myMeshGroup
Definition: DtWeatherRainShaft.h:263
osg::Vec3 myLocalCameraPos
Definition: DtWeatherRainShaft.h:255
unsigned int myVboTexCoords0Array
Definition: DtWeatherRainShaft.h:175
osg::Vec4 myPosition
Definition: DtWeatherRainShaft.h:190
int myParticlePoolCount
Definition: DtWeatherRainShaft.h:280
bool myEnabled
Definition: DtWeatherRainShaft.h:260
A structure to hold data for a sorting job.
Definition: DtWeatherRainShaft.h:245
float myWindSpeedMps
Definition: DtWeatherRainShaft.h:290