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;
125 virtual bool cullUpdate(
const osg::Vec3d& camPos,
const osg::Matrixd& viewMatrixI,
130 virtual bool isPositionAboveArea(
const osg::Vec3d& position);
138 virtual void setBounds(
const DtVector& bounds,
float cornerRadius);
143 virtual void setTransform(
const osg::Vec3d& position,
const osg::Matrixd& rotation);
147 virtual void setIntensity(
const float intensity);
151 virtual void setBaseColor(
const DtVector& color);
156 virtual void setWind(
const float windDirectionRad,
const float windSpeedMps);
160 virtual void runSort(
const osg::Vec3f& localCamPos);
164 virtual void setEnabled(
bool enabled);
167 virtual bool enabled()
const;
172 virtual bool culled()
const;
178 virtual void computeBounds(osg::Vec4f& bounds, osg::Vec3d& position, osg::Matrixd& rotation)
const;
186 : myVboPositionArray(0)
187 , myVboTexCoords0Array(0)
188 , myVboIndicesArray(0)
192 myPoints =
new osg::Vec4Array;
193 myTexCoords0 =
new osg::Vec2Array;
211 , myPosition(0, 0, 0, 0)
225 virtual bool positionInBounds2D(
const float x,
const float y,
const osg::Vec3f& bounds);
230 virtual float computeRandomMinMax(
float fMin,
float fMax);
234 virtual void computeSortDepth(
const osg::Vec3f& reference);
237 virtual void fillSortedParticles();
242 virtual bool bindMeshGroupData(
MeshGroup* meshGroup, osg::RenderInfo& renderInfo)
const;
247 virtual bool bindDynamicMeshGroupData(
MeshGroup* meshGroup, osg::RenderInfo& renderInfo)
const;
253 virtual bool bindVaoToMeshGroup(
GLuint vao,
MeshGroup* meshGroup, osg::RenderInfo& renderInfo)
const;
258 static int theSortBackToFront(
const void* arg0,
const void* arg1);
261 static void theSortJob(
void* data);
269 : myWeatherPrecipitationShaft(0)
270 , myLocalCameraPos(0, 0, 0)
DT_DLL_EXAMPLESCENEROOTPLUGIN void init(DtDe &anIG)
osg::Matrixd myRotation
Definition: DtWeatherPrecipitationShaft.h:288
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:307
osg::Vec3d myPosition
Definition: DtWeatherPrecipitationShaft.h:287
float myBoundsCornerRadius
Definition: DtWeatherPrecipitationShaft.h:293
GLint myParametersUnfmLoc
Definition: DtWeatherPrecipitationShaft.h:87
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Particle * myParticles
Definition: DtWeatherPrecipitationShaft.h:300
float myBoundsX
Definition: DtWeatherPrecipitationShaft.h:290
A structure to hold data for a sorting job.
Definition: DtWeatherPrecipitationShaft.h:266
GLint myBoxUnfmLoc
Definition: DtWeatherPrecipitationShaft.h:89
float myParticleWidth
Definition: DtWeatherPrecipitationShaft.h:295
unsigned int GLuint
Definition: DtGlTextureBufferObject.h:18
osg::ref_ptr< osg::Vec4Array > myPoints
Definition: DtWeatherPrecipitationShaft.h:196
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:198
SortJobData mySortJobData
Definition: DtWeatherPrecipitationShaft.h:304
int myParticleActiveCount
Definition: DtWeatherPrecipitationShaft.h:302
A group node which serves as a root for weather areas, patchy ground fog areas and effects...
Definition: DtWeatherAreaGroup.h:76
float myIntensity
Definition: DtWeatherPrecipitationShaft.h:297
osg::RenderInfo * myRenderInfo
Definition: DtWeatherPrecipitationShaft.h:84
friend DtWeatherPrecipitationShaftCreator
Definition: DtWeatherPrecipitationShaft.h:65
osg::Vec4f myPosition
Definition: DtWeatherPrecipitationShaft.h:217
MeshGroup()
Definition: DtWeatherPrecipitationShaft.h:185
Camera forward declarations.
GLint myTransformUnfmLoc
Definition: DtWeatherPrecipitationShaft.h:88
DtDe & myDe
Definition: DtWeatherPrecipitationShaft.h:279
int myParticlePoolCount
Definition: DtWeatherPrecipitationShaft.h:301
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:23
Contains makVrv::DtRandomNumberGenerator class.
osg::StateSet * myState
Definition: DtWeatherPrecipitationShaft.h:91
unsigned int myIndicesCount
Definition: DtWeatherPrecipitationShaft.h:199
DrawData()
Definition: DtWeatherPrecipitationShaft.h:72
Contains makVrv::DtJobSplitter class.
osg::Vec3f myLocalCameraPos
Definition: DtWeatherPrecipitationShaft.h:276
float myWindDirectionRad
Definition: DtWeatherPrecipitationShaft.h:310
float myWindSpeedMps
Definition: DtWeatherPrecipitationShaft.h:311
SortJobData()
Definition: DtWeatherPrecipitationShaft.h:268
const DtWeatherAreaGroup * myWeatherAreaGroup
Definition: DtWeatherPrecipitationShaft.h:90
float myBoundsZ
Definition: DtWeatherPrecipitationShaft.h:292
float myBoundsY
Definition: DtWeatherPrecipitationShaft.h:291
A structure used to hold data for drawing.
Definition: DtWeatherPrecipitationShaft.h:70
bool myEnabled
Definition: DtWeatherPrecipitationShaft.h:281
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:284
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:197
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:282
DtWeatherPrecipitationShaft * myWeatherPrecipitationShaft
Definition: DtWeatherPrecipitationShaft.h:275
Particle()
Definition: DtWeatherPrecipitationShaft.h:209
Contains DLL export macros.
DtJobSplitterJob mySortJob
Definition: DtWeatherPrecipitationShaft.h:305
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:76
osg::Vec3f myBaseColor
Definition: DtWeatherPrecipitationShaft.h:298
unsigned int myRandomSeed
Definition: DtWeatherPrecipitationShaft.h:308
Contains the DtGlVaoManager class declaration.
float mySortDepth
Definition: DtWeatherPrecipitationShaft.h:216
A structure used to define a particle.
Definition: DtWeatherPrecipitationShaft.h:207
DtGlVaoManager * myVaoManager
Definition: DtWeatherPrecipitationShaft.h:285
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:183