21 #include <matrix/vlVector.h>
29 class DtWeatherAreaGroup;
30 class DtWeatherPrecipitationShaftFactory;
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;
146 virtual bool culled()
const;
152 virtual void computeBounds(osg::Vec4& bounds, osg::Vec3d& position, osg::Matrixd& rotation)
const;
160 : myVboPositionArray(0)
161 , myVboTexCoords0Array(0)
162 , myVboIndicesArray(0)
166 myPoints =
new osg::Vec4Array;
167 myTexCoords0 =
new osg::Vec2Array;
185 , myPosition(0, 0, 0, 0)
199 virtual bool positionInBounds2D(
const float x,
const float y,
const osg::Vec3& bounds);
204 virtual float computeRandomMinMax(
float fMin,
float fMax);
208 virtual void computeSortDepth(
const osg::Vec3& reference);
211 virtual void fillSortedParticles();
216 virtual bool bindMeshGroupData(
MeshGroup* meshGroup, osg::RenderInfo& renderInfo)
const;
221 virtual bool bindDynamicMeshGroupData(
MeshGroup* meshGroup, osg::RenderInfo& renderInfo)
const;
227 virtual bool bindVaoToMeshGroup(
GLuint vao,
MeshGroup* meshGroup, osg::RenderInfo& renderInfo)
const;
233 virtual bool isSphereVisible(
const std::vector<osg::Vec4d>& planes,
const osg::Vec3d& center,
double radius)
const;
238 static int theSortBackToFront(
const void* arg0,
const void* arg1);
241 static void theSortJob(
void* data);
249 : myWeatherPrecipitationShaft(0)
250 , myLocalCameraPos(0, 0, 0)
321 static const std::string& theClassName();
DT_DLL_EXAMPLESCENEROOTPLUGIN void init(DtDe &anIG)
osg::Matrixd myRotation
Definition: DtWeatherPrecipitationShaft.h:268
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
Implementation independent random number generator.
Definition: DtRandomNumberGenerator.h:20
DtRandomNumberGenerator myRandomNumberGen
Definition: DtWeatherPrecipitationShaft.h:287
osg::Vec3d myPosition
Definition: DtWeatherPrecipitationShaft.h:267
float myBoundsCornerRadius
Definition: DtWeatherPrecipitationShaft.h:273
GLint myParametersUnfmLoc
Definition: DtWeatherPrecipitationShaft.h:63
osg::Vec3 myBaseColor
Definition: DtWeatherPrecipitationShaft.h:278
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Particle * myParticles
Definition: DtWeatherPrecipitationShaft.h:280
float myBoundsX
Definition: DtWeatherPrecipitationShaft.h:270
A structure to hold data for a sorting job.
Definition: DtWeatherPrecipitationShaft.h:246
GLint myBoxUnfmLoc
Definition: DtWeatherPrecipitationShaft.h:65
float myParticleWidth
Definition: DtWeatherPrecipitationShaft.h:275
unsigned int GLuint
Definition: DtGlTextureBufferObject.h:17
osg::ref_ptr< osg::Vec4Array > myPoints
Definition: DtWeatherPrecipitationShaft.h:170
Contains makVrv::DtDe class.
this class is used to split work up between threads.
Definition: DtJobSplitter.h:64
This class simulates and renders a precipitation shaft area. The area volume is filled with a density...
Definition: DtWeatherPrecipitationShaft.h:39
unsigned short * myIndices
Definition: DtWeatherPrecipitationShaft.h:172
SortJobData mySortJobData
Definition: DtWeatherPrecipitationShaft.h:284
int myParticleActiveCount
Definition: DtWeatherPrecipitationShaft.h:282
A group node which serves as a root for weather areas, patchy ground fog areas and effects...
Definition: DtWeatherAreaGroup.h:72
float myIntensity
Definition: DtWeatherPrecipitationShaft.h:277
osg::RenderInfo * myRenderInfo
Definition: DtWeatherPrecipitationShaft.h:60
MeshGroup()
Definition: DtWeatherPrecipitationShaft.h:159
osg::Vec4 myPosition
Definition: DtWeatherPrecipitationShaft.h:191
GLint myTransformUnfmLoc
Definition: DtWeatherPrecipitationShaft.h:64
DtDe & myDe
Definition: DtWeatherPrecipitationShaft.h:259
int myParticlePoolCount
Definition: DtWeatherPrecipitationShaft.h:281
Factory that is used to create weather precipitation shaft areas.
Definition: DtWeatherPrecipitationShaft.h:298
Contains makVrv::DtVirtualBaseClass class.
Contains makVrv::DtRandomNumberGenerator class.
osg::StateSet * myState
Definition: DtWeatherPrecipitationShaft.h:67
unsigned int myIndicesCount
Definition: DtWeatherPrecipitationShaft.h:173
DrawData()
Definition: DtWeatherPrecipitationShaft.h:48
Contains makVrv::DtJobSplitter class.
float myWindDirectionRad
Definition: DtWeatherPrecipitationShaft.h:290
float myWindSpeedMps
Definition: DtWeatherPrecipitationShaft.h:291
SortJobData()
Definition: DtWeatherPrecipitationShaft.h:248
const DtWeatherAreaGroup * myWeatherAreaGroup
Definition: DtWeatherPrecipitationShaft.h:66
osg::Vec3 myLocalCameraPos
Definition: DtWeatherPrecipitationShaft.h:256
float myBoundsZ
Definition: DtWeatherPrecipitationShaft.h:272
float myBoundsY
Definition: DtWeatherPrecipitationShaft.h:271
A structure used to hold data for drawing.
Definition: DtWeatherPrecipitationShaft.h:46
bool myEnabled
Definition: DtWeatherPrecipitationShaft.h:261
unsigned int myVboPositionArray
Definition: DtWeatherPrecipitationShaft.h:175
unsigned int myVboTexCoords0Array
Definition: DtWeatherPrecipitationShaft.h:176
MeshGroup * myMeshGroup
Definition: DtWeatherPrecipitationShaft.h:264
A generic structure to hold data for a job for use with DtJobSplitter.
Definition: DtJobSplitter.h:26
osg::ref_ptr< osg::Vec2Array > myTexCoords0
Definition: DtWeatherPrecipitationShaft.h:171
This class is used to manage an opengl vertex array object (VAO) dealing with multiple opengl context...
Definition: DtGlVaoManager.h:65
bool myCulled
Definition: DtWeatherPrecipitationShaft.h:262
DtWeatherPrecipitationShaft * myWeatherPrecipitationShaft
Definition: DtWeatherPrecipitationShaft.h:255
Particle()
Definition: DtWeatherPrecipitationShaft.h:183
Contains DLL export macros.
DtJobSplitterJob mySortJob
Definition: DtWeatherPrecipitationShaft.h:285
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:70
unsigned int myRandomSeed
Definition: DtWeatherPrecipitationShaft.h:288
unsigned int myVboIndicesArray
Definition: DtWeatherPrecipitationShaft.h:177
Contains the DtGlVaoManager class declaration.
float mySortDepth
Definition: DtWeatherPrecipitationShaft.h:190
A structure used to define a particle.
Definition: DtWeatherPrecipitationShaft.h:181
DtDe & myDe
Definition: DtWeatherPrecipitationShaft.h:328
DtGlVaoManager * myVaoManager
Definition: DtWeatherPrecipitationShaft.h:265
osg::Vec3d myCamPos
Definition: DtWeatherPrecipitationShaft.h:61
osg::Matrixd myViewMatrix
Definition: DtWeatherPrecipitationShaft.h:62
A structure used to define a mesh group (voa, positions, coords).
Definition: DtWeatherPrecipitationShaft.h:157