23 #include <matrix/vlVector.h>
28 #include <osg/Matrixd>
29 #include <osg/ref_ptr>
42 class DtWeatherAreaGroup;
75 , myParametersUnfmLoc(0)
76 , myTransformUnfmLoc(0)
78 , myWeatherAreaGroup(0)
117 virtual void releaseGLObjects(osg::State* state)
const;
124 virtual bool cullUpdate(
const osg::Vec3d& camPos,
const osg::Matrixd& viewMatrixI,
129 virtual bool isPositionAboveArea(
const osg::Vec3d& position);
137 virtual void setBounds(
const DtVector& bounds,
float cornerRadius);
142 virtual void setTransform(
const osg::Vec3d& position,
const osg::Matrixd& rotation);
146 virtual void setIntensity(
const float intensity);
150 virtual void setBaseColor(
const DtVector& color);
155 virtual void setWind(
const float windDirectionRad,
const float windSpeedMps);
159 virtual void runSort(
const osg::Vec3f& localCamPos);
163 virtual void setEnabled(
bool enabled);
166 virtual bool enabled()
const;
171 virtual bool culled()
const;
177 virtual void computeBounds(osg::Vec4f& bounds, osg::Vec3d& position, osg::Matrixd& rotation)
const;
185 : myVboPositionArray(0)
186 , myVboTexCoords0Array(0)
187 , myVboIndicesArray(0)
191 myPoints =
new osg::Vec4Array;
192 myTexCoords0 =
new osg::Vec2Array;
210 , myPosition(0, 0, 0, 0)
224 virtual bool positionInBounds2D(
const float x,
const float y,
const osg::Vec3f& bounds);
229 virtual float computeRandomMinMax(
float fMin,
float fMax);
233 virtual void computeSortDepth(
const osg::Vec3f& reference);
236 virtual void fillSortedParticles();
241 virtual bool bindMeshGroupData(
MeshGroup* meshGroup, osg::RenderInfo& renderInfo)
const;
246 virtual bool bindDynamicMeshGroupData(
MeshGroup* meshGroup, osg::RenderInfo& renderInfo)
const;
252 virtual bool bindVaoToMeshGroup(
GLuint vao,
MeshGroup* meshGroup, osg::RenderInfo& renderInfo)
const;
257 static int theSortBackToFront(
const void* arg0,
const void* arg1);
260 static void theSortJob(
void* data);
268 : myWeatherPrecipitationShaft(0)
269 , myLocalCameraPos(0, 0, 0)
DT_DLL_EXAMPLESCENEROOTPLUGIN void init(DtDe &anIG)
osg::Matrixd myRotation
Definition: DtWeatherPrecipitationShaft.h:287
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:306
osg::Vec3d myPosition
Definition: DtWeatherPrecipitationShaft.h:286
float myBoundsCornerRadius
Definition: DtWeatherPrecipitationShaft.h:292
GLint myParametersUnfmLoc
Definition: DtWeatherPrecipitationShaft.h:87
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Particle * myParticles
Definition: DtWeatherPrecipitationShaft.h:299
float myBoundsX
Definition: DtWeatherPrecipitationShaft.h:289
A structure to hold data for a sorting job.
Definition: DtWeatherPrecipitationShaft.h:265
GLint myBoxUnfmLoc
Definition: DtWeatherPrecipitationShaft.h:89
float myParticleWidth
Definition: DtWeatherPrecipitationShaft.h:294
unsigned int GLuint
Definition: DtGlTextureBufferObject.h:18
osg::ref_ptr< osg::Vec4Array > myPoints
Definition: DtWeatherPrecipitationShaft.h:195
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:63
unsigned short * myIndices
Definition: DtWeatherPrecipitationShaft.h:197
SortJobData mySortJobData
Definition: DtWeatherPrecipitationShaft.h:303
int myParticleActiveCount
Definition: DtWeatherPrecipitationShaft.h:301
A group node which serves as a root for weather areas, patchy ground fog areas and effects...
Definition: DtWeatherAreaGroup.h:75
float myIntensity
Definition: DtWeatherPrecipitationShaft.h:296
osg::RenderInfo * myRenderInfo
Definition: DtWeatherPrecipitationShaft.h:84
friend DtWeatherPrecipitationShaftCreator
Definition: DtWeatherPrecipitationShaft.h:65
osg::Vec4f myPosition
Definition: DtWeatherPrecipitationShaft.h:216
MeshGroup()
Definition: DtWeatherPrecipitationShaft.h:184
Camera forward declarations.
GLint myTransformUnfmLoc
Definition: DtWeatherPrecipitationShaft.h:88
DtDe & myDe
Definition: DtWeatherPrecipitationShaft.h:278
int myParticlePoolCount
Definition: DtWeatherPrecipitationShaft.h:300
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:22
Contains makVrv::DtRandomNumberGenerator class.
osg::StateSet * myState
Definition: DtWeatherPrecipitationShaft.h:91
unsigned int myIndicesCount
Definition: DtWeatherPrecipitationShaft.h:198
DrawData()
Definition: DtWeatherPrecipitationShaft.h:72
Contains makVrv::DtJobSplitter class.
osg::Vec3f myLocalCameraPos
Definition: DtWeatherPrecipitationShaft.h:275
float myWindDirectionRad
Definition: DtWeatherPrecipitationShaft.h:309
float myWindSpeedMps
Definition: DtWeatherPrecipitationShaft.h:310
SortJobData()
Definition: DtWeatherPrecipitationShaft.h:267
const DtWeatherAreaGroup * myWeatherAreaGroup
Definition: DtWeatherPrecipitationShaft.h:90
float myBoundsZ
Definition: DtWeatherPrecipitationShaft.h:291
float myBoundsY
Definition: DtWeatherPrecipitationShaft.h:290
A structure used to hold data for drawing.
Definition: DtWeatherPrecipitationShaft.h:70
bool myEnabled
Definition: DtWeatherPrecipitationShaft.h:280
A generic OpenGL buffer. This can be: -> a vertex buffer -> an index buffer -> a shader storage buffe...
Definition: DtGlBuffer.h:29
const char * creatorTypeName< DtWeatherPrecipitationShaft >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtWeatherPrecipitationShaft.h:53
MeshGroup * myMeshGroup
Definition: DtWeatherPrecipitationShaft.h:283
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:196
This class is used to manage an opengl vertex array object (VAO) dealing with multiple opengl context...
Definition: DtGlVaoManager.h:58
bool myCulled
Definition: DtWeatherPrecipitationShaft.h:281
DtWeatherPrecipitationShaft * myWeatherPrecipitationShaft
Definition: DtWeatherPrecipitationShaft.h:274
Particle()
Definition: DtWeatherPrecipitationShaft.h:208
Contains DLL export macros.
DtJobSplitterJob mySortJob
Definition: DtWeatherPrecipitationShaft.h:304
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:72
osg::Vec3f myBaseColor
Definition: DtWeatherPrecipitationShaft.h:297
unsigned int myRandomSeed
Definition: DtWeatherPrecipitationShaft.h:307
Contains the DtGlVaoManager class declaration.
float mySortDepth
Definition: DtWeatherPrecipitationShaft.h:215
A structure used to define a particle.
Definition: DtWeatherPrecipitationShaft.h:206
DtGlVaoManager * myVaoManager
Definition: DtWeatherPrecipitationShaft.h:284
DtVirtualBaseClassCreator< DtWeatherPrecipitationShaft > DtWeatherPrecipitationShaftCreator
creator
Definition: DtWeatherPrecipitationShaft.h:46
osg::Vec3d myCamPos
Definition: DtWeatherPrecipitationShaft.h:85
osg::Matrixd myViewMatrix
Definition: DtWeatherPrecipitationShaft.h:86
A structure used to define a mesh group (voa, positions, coords).
Definition: DtWeatherPrecipitationShaft.h:182