19 #include <osg/RenderInfo>
26 class DtWeatherAreaGroup;
46 , myParametersUnfmLoc(0)
47 , mySoftnessUnfmLoc(0)
48 , myWindDirectionRad(0)
50 , myWeatherAreaGroup(0)
89 virtual void init(
int particleCount,
float particleSize,
float radius);
92 virtual void releaseGLObjects(osg::State* state)
const;
100 virtual void cullUpdate(
const osg::Vec3d& camPos,
DtJobSplitter* jobSplitter);
104 virtual void setEnable(
bool enable);
109 virtual void setWind(
float windDirectionRad,
float windSpeedMps);
113 virtual void setWindSpeedMultiplier(
float multiplier);
117 virtual void setWindLiftMultiplier(
float multiplier);
121 virtual void setWindTurbulence(
float multiplier);
125 virtual void setDensity(
float density);
128 virtual void setEffectFade(
float fade);
133 virtual void setIntensityPerWindRamp(
float start,
float end);
136 virtual float computeIntensityPerWind();
139 virtual void setBasisRotation(
const osg::Matrixd& rotation);
143 virtual void setColorMult(
float r,
float g,
float b);
146 virtual float radius()
const;
150 virtual void runSort(
const osg::Vec3& localCamPos);
158 : myVboPositionArray(0)
159 , myVboTexCoords0Array(0)
161 myPoints =
new osg::Vec4Array;
162 myTexCoords0 =
new osg::Vec2Array;
177 , myPosition(0, 0, 0, 0)
187 virtual void connectSignals();
190 virtual void disconnectSignals();
193 virtual void slot_simulationUpdate();
196 virtual void computeSortDepth(
const osg::Vec3& reference);
199 virtual void fillSortedParticles();
204 virtual bool bindMeshGroupData(
MeshGroup* meshGroup, osg::RenderInfo& renderInfo)
const;
209 virtual bool bindDynamicMeshGroupData(
MeshGroup* meshGroup, osg::RenderInfo& renderInfo)
const;
215 virtual bool bindVaoToMeshGroup(
GLuint vao,
MeshGroup* meshGroup, osg::RenderInfo& renderInfo)
const;
220 virtual void simulateParticles(
float timeStep,
double currentTime);
228 void wrapPosition(
float& posX,
float& posY,
float& posZ);
233 static int theSortBackToFront(
const void* arg0,
const void* arg1);
236 static void theSortJob(
void* data);
245 , myCameraPos(0, 0, 0)
306 virtual DtGroundFogEffect* create(
int particleCount,
float particleSize,
float radius)
const;
313 static const std::string& theClassName();
DT_DLL_EXAMPLESCENEROOTPLUGIN void init(DtDe &anIG)
float myWindDirectionRad
Definition: DtGroundFogEffect.h:261
SortJobData mySortJobData
Definition: DtGroundFogEffect.h:280
bool myEnable
Definition: DtGroundFogEffect.h:258
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
DtDe & myDe
Definition: DtGroundFogEffect.h:316
A structure used to hold data for drawing.
Definition: DtGroundFogEffect.h:41
DrawData()
Definition: DtGroundFogEffect.h:43
osg::ref_ptr< osg::Vec2Array > myTexCoords0
Definition: DtGroundFogEffect.h:166
float myWindSpeedMps
Definition: DtGroundFogEffect.h:61
unsigned int myVboTexCoords0Array
Definition: DtGroundFogEffect.h:169
osg::ref_ptr< osg::Vec4Array > myPoints
Definition: DtGroundFogEffect.h:165
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
A structure used to define a simulation particle.
Definition: DtGroundFogEffect.h:173
MeshGroup()
Definition: DtGroundFogEffect.h:157
const DtWeatherAreaGroup * myWeatherAreaGroup
Definition: DtGroundFogEffect.h:62
osg::Vec3 myScroll
Definition: DtGroundFogEffect.h:259
osg::Vec3 myCameraPos
Definition: DtGroundFogEffect.h:251
unsigned int GLuint
Definition: DtGlTextureBufferObject.h:17
DtGroundFogEffect * myEffect
Definition: DtGroundFogEffect.h:250
DtJobSplitterJob mySortJob
Definition: DtGroundFogEffect.h:281
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:72
int myParticleCount
Definition: DtGroundFogEffect.h:278
float mfIntensityPerWindEnd
Definition: DtGroundFogEffect.h:271
osg::RenderInfo * myRenderInfo
Definition: DtGroundFogEffect.h:56
Particle * myParticles
Definition: DtGroundFogEffect.h:277
double myLastTime
Definition: DtGroundFogEffect.h:266
float mySortDepth
Definition: DtGroundFogEffect.h:182
float myWindTurbulence
Definition: DtGroundFogEffect.h:265
this class is used to create an effect around the eye to represent blowing particle effects such as s...
Definition: DtGroundFogEffect.h:36
SortJobData()
Definition: DtGroundFogEffect.h:243
unsigned int myVboPositionArray
Definition: DtGroundFogEffect.h:168
osg::Vec3d myCamPos
Definition: DtGroundFogEffect.h:57
Contains makVrv::DtVirtualBaseClass class.
DtGlVaoManager * myVaoManager
Definition: DtGroundFogEffect.h:275
Contains makVrv::DtJobSplitter class.
MeshGroup * myMeshGroup
Definition: DtGroundFogEffect.h:274
float mfIntensityPerWindStart
Definition: DtGroundFogEffect.h:270
osg::StateSet * myState
Definition: DtGroundFogEffect.h:63
GLint mySoftnessUnfmLoc
Definition: DtGroundFogEffect.h:59
float myEffectFade
Definition: DtGroundFogEffect.h:267
osg::Vec4 myPosition
Definition: DtGroundFogEffect.h:183
osg::Vec3 myColorMult
Definition: DtGroundFogEffect.h:269
float myParticleSize
Definition: DtGroundFogEffect.h:268
DtDe & myDe
Definition: DtGroundFogEffect.h:254
A generic structure to hold data for a job for use with DtJobSplitter.
Definition: DtJobSplitter.h:26
creator for DtGroundFogEffect
Definition: DtGroundFogEffect.h:286
float myRadius
Definition: DtGroundFogEffect.h:260
This class is used to manage an opengl vertex array object (VAO) dealing with multiple opengl context...
Definition: DtGlVaoManager.h:65
float myWindDirectionRad
Definition: DtGroundFogEffect.h:60
Particle()
Definition: DtGroundFogEffect.h:175
Contains DLL export macros.
a structure to hold data for a sorting job
Definition: DtGroundFogEffect.h:241
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
float myWindSpeedMps
Definition: DtGroundFogEffect.h:262
float myDensity
Definition: DtGroundFogEffect.h:272
GLint myParametersUnfmLoc
Definition: DtGroundFogEffect.h:58
osg::Matrixd myBasisRot
Definition: DtGroundFogEffect.h:256
A structure used to define a mesh group (voa, positions, coords).
Definition: DtGroundFogEffect.h:155
Contains the DtGlVaoManager class declaration.
float myWindSpeedMultiplier
Definition: DtGroundFogEffect.h:263
float myWindLiftMultiplier
Definition: DtGroundFogEffect.h:264