20 #include <osg/RenderInfo>
27 class DtWeatherAreaGroup;
58 , myParametersUnfmLoc(0)
59 , mySoftnessUnfmLoc(0)
60 , myWeatherAreaGroup(0)
97 virtual void init(
int particleCount,
float particleSize,
float radius);
100 virtual void releaseGLObjects(osg::State* state)
const;
108 virtual void cullUpdate(
const osg::Vec3d& camPos,
DtJobSplitter* jobSplitter);
112 virtual void setEnable(
bool enable);
117 virtual void setWind(
float windDirectionRad,
float windSpeedMps);
121 virtual void setWindSpeedMultiplier(
float multiplier);
125 virtual void setWindLiftMultiplier(
float multiplier);
129 virtual void setWindTurbulence(
float multiplier);
133 virtual void setDensity(
float density);
136 virtual void setEffectFade(
float fade);
141 virtual void setIntensityPerWindRamp(
float start,
float end);
144 virtual float computeIntensityPerWind();
147 virtual void setBasisRotation(
const osg::Matrixd& rotation);
151 virtual void setColorMult(
float r,
float g,
float b);
154 virtual float radius()
const;
158 virtual void runSort(
const osg::Vec3& localCamPos);
166 : myVboPositionArray(0)
167 , myVboTexCoords0Array(0)
169 myPoints =
new osg::Vec4Array;
170 myTexCoords0 =
new osg::Vec2Array;
185 , myPosition(0, 0, 0, 0)
195 virtual void connectSignals();
198 virtual void slot_simulationUpdate();
201 virtual void computeSortDepth(
const osg::Vec3& reference);
204 virtual void fillSortedParticles();
209 virtual bool bindMeshGroupData(
MeshGroup* meshGroup, osg::RenderInfo& renderInfo)
const;
214 virtual bool bindDynamicMeshGroupData(
MeshGroup* meshGroup, osg::RenderInfo& renderInfo)
const;
220 virtual bool bindVaoToMeshGroup(
GLuint vao,
MeshGroup* meshGroup, osg::RenderInfo& renderInfo)
const;
225 virtual void simulateParticles(
float timeStep,
double currentTime);
233 void wrapPosition(
float& posX,
float& posY,
float& posZ);
238 static int theSortBackToFront(
const void* arg0,
const void* arg1);
241 static void theSortJob(
void* data);
250 , myCameraPos(0, 0, 0)
DT_DLL_EXAMPLESCENEROOTPLUGIN void init(DtDe &anIG)
float myWindDirectionRad
Definition: DtGroundFogEffect.h:266
SortJobData mySortJobData
Definition: DtGroundFogEffect.h:285
bool myEnable
Definition: DtGroundFogEffect.h:263
A structure used to hold data for drawing.
Definition: DtGroundFogEffect.h:53
DrawData()
Definition: DtGroundFogEffect.h:55
osg::ref_ptr< osg::Vec2Array > myTexCoords0
Definition: DtGroundFogEffect.h:174
osg::ref_ptr< osg::Vec4Array > myPoints
Definition: DtGroundFogEffect.h:173
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
A structure used to define a simulation particle.
Definition: DtGroundFogEffect.h:181
MeshGroup()
Definition: DtGroundFogEffect.h:165
const DtWeatherAreaGroup * myWeatherAreaGroup
Definition: DtGroundFogEffect.h:70
osg::Vec3 myScroll
Definition: DtGroundFogEffect.h:264
osg::Vec3 myCameraPos
Definition: DtGroundFogEffect.h:256
unsigned int GLuint
Definition: DtGlTextureBufferObject.h:18
DtGroundFogEffect * myEffect
Definition: DtGroundFogEffect.h:255
DtJobSplitterJob mySortJob
Definition: DtGroundFogEffect.h:286
this class is used to split work up between threads.
Definition: DtJobSplitter.h:64
A group node which serves as a root for weather areas, patchy ground fog areas and effects...
Definition: DtWeatherAreaGroup.h:76
int myParticleCount
Definition: DtGroundFogEffect.h:283
float mfIntensityPerWindEnd
Definition: DtGroundFogEffect.h:276
osg::RenderInfo * myRenderInfo
Definition: DtGroundFogEffect.h:66
Particle * myParticles
Definition: DtGroundFogEffect.h:282
double myLastTime
Definition: DtGroundFogEffect.h:271
float mySortDepth
Definition: DtGroundFogEffect.h:190
float myWindTurbulence
Definition: DtGroundFogEffect.h:270
this class is used to create an effect around the eye to represent blowing particle effects such as s...
Definition: DtGroundFogEffect.h:48
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:23
SortJobData()
Definition: DtGroundFogEffect.h:248
osg::Vec3d myCamPos
Definition: DtGroundFogEffect.h:67
DtGlVaoManager * myVaoManager
Definition: DtGroundFogEffect.h:280
DtSignalConnectionManager myConnections
Definition: DtGroundFogEffect.h:288
Contains makVrv::DtJobSplitter class.
MeshGroup * myMeshGroup
Definition: DtGroundFogEffect.h:279
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
float mfIntensityPerWindStart
Definition: DtGroundFogEffect.h:275
osg::StateSet * myState
Definition: DtGroundFogEffect.h:71
GLint mySoftnessUnfmLoc
Definition: DtGroundFogEffect.h:69
float myEffectFade
Definition: DtGroundFogEffect.h:272
osg::Vec4 myPosition
Definition: DtGroundFogEffect.h:191
osg::Vec3 myColorMult
Definition: DtGroundFogEffect.h:274
A generic OpenGL buffer. This can be: -> a vertex buffer -> an index buffer -> a shader storage buffe...
Definition: DtGlBuffer.h:29
float myParticleSize
Definition: DtGroundFogEffect.h:273
DtDe & myDe
Definition: DtGroundFogEffect.h:259
Base class to provide boost signal/slot management.
A generic structure to hold data for a job for use with DtJobSplitter.
Definition: DtJobSplitter.h:26
DtVirtualBaseClassCreator< DtGroundFogEffect, const int &, const float &, const float & > DtGroundFogEffectCreator
creator
Definition: DtGroundFogEffect.h:31
float myRadius
Definition: DtGroundFogEffect.h:265
This class is used to manage an opengl vertex array object (VAO) dealing with multiple opengl context...
Definition: DtGlVaoManager.h:58
Particle()
Definition: DtGroundFogEffect.h:183
Contains DLL export macros.
a structure to hold data for a sorting job
Definition: DtGroundFogEffect.h:246
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
float myWindSpeedMps
Definition: DtGroundFogEffect.h:267
float myDensity
Definition: DtGroundFogEffect.h:277
GLint myParametersUnfmLoc
Definition: DtGroundFogEffect.h:68
osg::Matrixd myBasisRot
Definition: DtGroundFogEffect.h:261
A structure used to define a mesh group (voa, positions, coords).
Definition: DtGroundFogEffect.h:163
Contains the DtGlVaoManager class declaration.
float myWindSpeedMultiplier
Definition: DtGroundFogEffect.h:268
float myWindLiftMultiplier
Definition: DtGroundFogEffect.h:269
const char * creatorTypeName< DtGroundFogEffect >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtGroundFogEffect.h:38