20 #include <osg/RenderInfo>
27 class DtWeatherAreaGroup;
58 , myParametersUnfmLoc(0)
59 , mySoftnessUnfmLoc(0)
60 , myWindDirectionRad(0)
62 , myWeatherAreaGroup(0)
101 virtual void init(
int particleCount,
float particleSize,
float radius);
104 virtual void releaseGLObjects(osg::State* state)
const;
112 virtual void cullUpdate(
const osg::Vec3d& camPos,
DtJobSplitter* jobSplitter);
116 virtual void setEnable(
bool enable);
121 virtual void setWind(
float windDirectionRad,
float windSpeedMps);
125 virtual void setWindSpeedMultiplier(
float multiplier);
129 virtual void setWindLiftMultiplier(
float multiplier);
133 virtual void setWindTurbulence(
float multiplier);
137 virtual void setDensity(
float density);
140 virtual void setEffectFade(
float fade);
145 virtual void setIntensityPerWindRamp(
float start,
float end);
148 virtual float computeIntensityPerWind();
151 virtual void setBasisRotation(
const osg::Matrixd& rotation);
155 virtual void setColorMult(
float r,
float g,
float b);
158 virtual float radius()
const;
162 virtual void runSort(
const osg::Vec3& localCamPos);
170 : myVboPositionArray(0)
171 , myVboTexCoords0Array(0)
173 myPoints =
new osg::Vec4Array;
174 myTexCoords0 =
new osg::Vec2Array;
189 , myPosition(0, 0, 0, 0)
199 virtual void connectSignals();
202 virtual void slot_simulationUpdate();
205 virtual void computeSortDepth(
const osg::Vec3& reference);
208 virtual void fillSortedParticles();
213 virtual bool bindMeshGroupData(
MeshGroup* meshGroup, osg::RenderInfo& renderInfo)
const;
218 virtual bool bindDynamicMeshGroupData(
MeshGroup* meshGroup, osg::RenderInfo& renderInfo)
const;
224 virtual bool bindVaoToMeshGroup(
GLuint vao,
MeshGroup* meshGroup, osg::RenderInfo& renderInfo)
const;
229 virtual void simulateParticles(
float timeStep,
double currentTime);
237 void wrapPosition(
float& posX,
float& posY,
float& posZ);
242 static int theSortBackToFront(
const void* arg0,
const void* arg1);
245 static void theSortJob(
void* data);
254 , myCameraPos(0, 0, 0)
DT_DLL_EXAMPLESCENEROOTPLUGIN void init(DtDe &anIG)
float myWindDirectionRad
Definition: DtGroundFogEffect.h:270
SortJobData mySortJobData
Definition: DtGroundFogEffect.h:289
bool myEnable
Definition: DtGroundFogEffect.h:267
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:178
float myWindSpeedMps
Definition: DtGroundFogEffect.h:73
osg::ref_ptr< osg::Vec4Array > myPoints
Definition: DtGroundFogEffect.h:177
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
A structure used to define a simulation particle.
Definition: DtGroundFogEffect.h:185
MeshGroup()
Definition: DtGroundFogEffect.h:169
const DtWeatherAreaGroup * myWeatherAreaGroup
Definition: DtGroundFogEffect.h:74
osg::Vec3 myScroll
Definition: DtGroundFogEffect.h:268
osg::Vec3 myCameraPos
Definition: DtGroundFogEffect.h:260
unsigned int GLuint
Definition: DtGlTextureBufferObject.h:18
DtGroundFogEffect * myEffect
Definition: DtGroundFogEffect.h:259
DtJobSplitterJob mySortJob
Definition: DtGroundFogEffect.h:290
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:75
int myParticleCount
Definition: DtGroundFogEffect.h:287
float mfIntensityPerWindEnd
Definition: DtGroundFogEffect.h:280
osg::RenderInfo * myRenderInfo
Definition: DtGroundFogEffect.h:68
Particle * myParticles
Definition: DtGroundFogEffect.h:286
double myLastTime
Definition: DtGroundFogEffect.h:275
float mySortDepth
Definition: DtGroundFogEffect.h:194
float myWindTurbulence
Definition: DtGroundFogEffect.h:274
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:22
SortJobData()
Definition: DtGroundFogEffect.h:252
osg::Vec3d myCamPos
Definition: DtGroundFogEffect.h:69
DtGlVaoManager * myVaoManager
Definition: DtGroundFogEffect.h:284
DtSignalConnectionManager myConnections
Definition: DtGroundFogEffect.h:292
Contains makVrv::DtJobSplitter class.
MeshGroup * myMeshGroup
Definition: DtGroundFogEffect.h:283
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
float mfIntensityPerWindStart
Definition: DtGroundFogEffect.h:279
osg::StateSet * myState
Definition: DtGroundFogEffect.h:75
GLint mySoftnessUnfmLoc
Definition: DtGroundFogEffect.h:71
float myEffectFade
Definition: DtGroundFogEffect.h:276
osg::Vec4 myPosition
Definition: DtGroundFogEffect.h:195
osg::Vec3 myColorMult
Definition: DtGroundFogEffect.h:278
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:277
DtDe & myDe
Definition: DtGroundFogEffect.h:263
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:269
This class is used to manage an opengl vertex array object (VAO) dealing with multiple opengl context...
Definition: DtGlVaoManager.h:58
float myWindDirectionRad
Definition: DtGroundFogEffect.h:72
Particle()
Definition: DtGroundFogEffect.h:187
Contains DLL export macros.
a structure to hold data for a sorting job
Definition: DtGroundFogEffect.h:250
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
float myWindSpeedMps
Definition: DtGroundFogEffect.h:271
float myDensity
Definition: DtGroundFogEffect.h:281
GLint myParametersUnfmLoc
Definition: DtGroundFogEffect.h:70
osg::Matrixd myBasisRot
Definition: DtGroundFogEffect.h:265
A structure used to define a mesh group (voa, positions, coords).
Definition: DtGroundFogEffect.h:167
Contains the DtGlVaoManager class declaration.
float myWindSpeedMultiplier
Definition: DtGroundFogEffect.h:272
float myWindLiftMultiplier
Definition: DtGroundFogEffect.h:273
const char * creatorTypeName< DtGroundFogEffect >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtGroundFogEffect.h:38