18 #include <osg/RenderInfo>
25 class DtGroundFogEffectDrawable;
45 , myParametersUnfmLoc(0)
46 , mySoftnessUnfmLoc(0)
47 , myWindDirectionRad(0)
90 virtual void init(
int particleCount,
float particleSize,
float radius);
93 virtual void releaseGLObjects(osg::State* state)
const;
101 virtual void cullUpdate(
const osg::Vec3d& camPos,
DtJobSplitter* jobSplitter);
105 virtual void setEnable(
bool enable);
110 virtual void setWind(
float windDirectionRad,
float windSpeedMps);
114 virtual void setWindSpeedMultiplier(
float multiplier);
118 virtual void setWindLiftMultiplier(
float multiplier);
122 virtual void setWindTurbulence(
float multiplier);
126 virtual void setDensity(
float density);
129 virtual void setEffectFade(
float fade);
134 virtual void setIntensityPerWindRamp(
float start,
float end);
137 virtual float computeIntensityPerWind();
140 virtual void setBasisRotation(
const osg::Matrixd& rotation);
144 virtual void setColorMult(
float r,
float g,
float b);
147 virtual float radius()
const;
151 virtual void runSort(
const osg::Vec3& localCamPos);
159 : myVboPositionArray(0)
160 , myVboTexCoords0Array(0)
162 myPoints =
new osg::Vec4Array;
163 myTexCoords0 =
new osg::Vec2Array;
178 , myPosition(0, 0, 0, 0)
188 virtual void connectSignals();
191 virtual void disconnectSignals();
194 virtual void slot_simulationUpdate();
197 virtual void computeSortDepth(
const osg::Vec3& reference);
200 virtual void fillSortedParticles();
205 virtual bool bindMeshGroupData(
MeshGroup* meshGroup, osg::RenderInfo& renderInfo)
const;
210 virtual bool bindDynamicMeshGroupData(
MeshGroup* meshGroup, osg::RenderInfo& renderInfo)
const;
216 virtual bool bindVaoToMeshGroup(
GLuint vao,
MeshGroup* meshGroup, osg::RenderInfo& renderInfo)
const;
221 virtual void simulateParticles(
float timeStep,
double currentTime);
229 void wrapPosition(
float& posX,
float& posY,
float& posZ);
234 static int theSortBackToFront(
const void* arg0,
const void* arg1);
237 static void theSortJob(
void* data);
246 , myCameraPos(0, 0, 0)
307 virtual DtGroundFogEffect* create(
int particleCount,
float particleSize,
float radius)
const;
314 static const std::string& theClassName();
float myWindDirectionRad
Definition: DtGroundFogEffect.h:262
SortJobData mySortJobData
Definition: DtGroundFogEffect.h:281
bool myEnable
Definition: DtGroundFogEffect.h:259
Virtual base class.
Definition: DtVirtualBaseClass.h:22
const DtGroundFogEffectDrawable * myDrawable
Definition: DtGroundFogEffect.h:63
DtDe & myDe
Definition: DtGroundFogEffect.h:317
A structure used to hold data for drawing.
Definition: DtGroundFogEffect.h:40
DrawData()
Definition: DtGroundFogEffect.h:42
osg::ref_ptr< osg::Vec2Array > myTexCoords0
Definition: DtGroundFogEffect.h:167
float myWindSpeedMps
Definition: DtGroundFogEffect.h:61
unsigned int myVboTexCoords0Array
Definition: DtGroundFogEffect.h:170
osg::ref_ptr< osg::Vec4Array > myPoints
Definition: DtGroundFogEffect.h:166
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
A structure used to define a simulation particle.
Definition: DtGroundFogEffect.h:174
MeshGroup()
Definition: DtGroundFogEffect.h:158
osg::Vec3 myScroll
Definition: DtGroundFogEffect.h:260
osg::Vec3 myCameraPos
Definition: DtGroundFogEffect.h:252
unsigned int GLuint
Definition: DtGlTextureBufferObject.h:17
DtGroundFogEffect * myEffect
Definition: DtGroundFogEffect.h:251
DtJobSplitterJob mySortJob
Definition: DtGroundFogEffect.h:282
this class is used to split work up between threads.
Definition: DtJobSplitter.h:64
int myParticleCount
Definition: DtGroundFogEffect.h:279
float mfIntensityPerWindEnd
Definition: DtGroundFogEffect.h:272
osg::RenderInfo * myRenderInfo
Definition: DtGroundFogEffect.h:56
Particle * myParticles
Definition: DtGroundFogEffect.h:278
double myLastTime
Definition: DtGroundFogEffect.h:267
float mySortDepth
Definition: DtGroundFogEffect.h:183
float myWindTurbulence
Definition: DtGroundFogEffect.h:266
this class is used to create an effect around the eye to represent blowing particle effects such as s...
Definition: DtGroundFogEffect.h:35
SortJobData()
Definition: DtGroundFogEffect.h:244
unsigned int myVboPositionArray
Definition: DtGroundFogEffect.h:169
osg::Vec3d myCamPos
Definition: DtGroundFogEffect.h:57
Contains makVrv::DtVirtualBaseClass class.
DtGlVaoManager * myVaoManager
Definition: DtGroundFogEffect.h:276
Contains makVrv::DtJobSplitter class.
MeshGroup * myMeshGroup
Definition: DtGroundFogEffect.h:275
float mfIntensityPerWindStart
Definition: DtGroundFogEffect.h:271
GLint mySoftnessUnfmLoc
Definition: DtGroundFogEffect.h:59
float myEffectFade
Definition: DtGroundFogEffect.h:268
osg::Vec4 myPosition
Definition: DtGroundFogEffect.h:184
osg::Vec3 myColorMult
Definition: DtGroundFogEffect.h:270
float myParticleSize
Definition: DtGroundFogEffect.h:269
DtDe & myDe
Definition: DtGroundFogEffect.h:255
A generic structure to hold data for a job for use with DtJobSplitter.
Definition: DtJobSplitter.h:26
creator for DtGroundFogEffect
Definition: DtGroundFogEffect.h:287
float myRadius
Definition: DtGroundFogEffect.h:261
This class is used to manage an opengl vertex array object (VAO) dealing with multiple opengl context...
Definition: DtGlVaoManager.h:49
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
float myWindDirectionRad
Definition: DtGroundFogEffect.h:60
Particle()
Definition: DtGroundFogEffect.h:176
Contains DLL export macros.
a structure to hold data for a sorting job
Definition: DtGroundFogEffect.h:242
A drawable for drawing ground fog effects.
Definition: DtGroundFogEffectDrawable.h:35
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
float myWindSpeedMps
Definition: DtGroundFogEffect.h:263
float myDensity
Definition: DtGroundFogEffect.h:273
GLint myParametersUnfmLoc
Definition: DtGroundFogEffect.h:58
osg::Matrixd myBasisRot
Definition: DtGroundFogEffect.h:257
osg::StateSet * mySensorState
Definition: DtGroundFogEffect.h:64
A structure used to define a mesh group (voa, positions, coords).
Definition: DtGroundFogEffect.h:156
Contains the DtGlVaoManager class declaration.
float myWindSpeedMultiplier
Definition: DtGroundFogEffect.h:264
float myWindLiftMultiplier
Definition: DtGroundFogEffect.h:265
bool myStateDirty
Definition: DtGroundFogEffect.h:62