13 #include <osg/Drawable>
22 #include <matrix/vlVector.h>
24 #include <osg/Matrixd>
25 #include <osg/ref_ptr>
26 #include <osg/RenderInfo>
36 class DtGroundFogPatch;
37 class DtGroundFogPatchDrawable;
74 , myGroundFogUnfmLoc(0)
75 , myInstanceParamsUnfmLoc(0)
76 , myInstanceMatrixUnfmLoc(0)
77 , myPatternedUnfmLoc(0)
78 , mySkeletonUnfmLoc(0)
79 , mySoftnessUnfmLoc(0)
80 , myPatternSize(512.0f)
81 , myWindDirectionRad(0)
128 virtual void init(
float worldSize,
float thickness);
135 virtual void releaseFogPatchGLObjects(osg::State* state)
const;
138 virtual void releaseFogEffectGLObjects(osg::State* state)
const;
143 virtual void cullUpdate(
const osg::Vec3d& camPos,
const osg::Matrixd& viewMatrixI,
const std::vector<osg::Vec4d>& cullingPlanes,
DtJobSplitter* jobSplitter);
146 virtual bool shouldDrawFogPatches();
156 virtual void setDensity(
float density);
159 virtual float density()
const;
165 virtual void setTransform(
const DtVector& position,
float orientation,
bool relativeToCamera =
false);
169 virtual void setEnabled(
bool enabled);
172 virtual bool enabled()
const;
176 virtual void setClampingEnabled(
bool enabled);
179 virtual bool clampingEnabled()
const;
182 virtual float worldSize()
const;
187 virtual void setBounds(
const DtVector& bounds,
float cornerRadius);
191 virtual bool isPositionAboveArea(
const osg::Vec3d& position);
197 virtual void setBaseColor(
float red,
float green,
float blue);
201 virtual void setParticleSizeVariation(
float variation);
207 virtual void setPatternedLook(
bool patternedEnable);
224 : myVboPositionArray(0)
225 , myVboTexCoords0Array(0)
227 , myVboWeightsArray(0)
229 myPoints =
new osg::Vec3Array;
230 myTexCoords0 =
new osg::Vec2Array;
231 myBones =
new osg::Vec4Array;
232 myWeights =
new osg::Vec4Array;
261 virtual void freeData(
void);
269 virtual void computeWeights(
float x,
float y,
float patchSize,
float* bones,
float* weights);
274 virtual void initLod(
int gridSize,
float patchSize);
279 virtual bool bindMeshGroupData(
MeshGroup* meshGroup, osg::RenderInfo& renderInfo)
const;
285 virtual bool bindVaoToMeshGroup(
GLuint vao,
MeshGroup* meshGroup, osg::RenderInfo& renderInfo)
const;
290 virtual void computeBasis(
const osg::Vec3d& inGeocentricPos, osg::Matrixd& rotOut);
294 virtual void computeSortDepth(
const osg::Vec3& camPos);
300 virtual void inverseTransformPlane(osg::Vec4d& plane,
const osg::Vec3d& position,
const osg::Matrixd& rotation);
306 virtual bool isSphereVisible(
const std::vector<osg::Vec4d>& planes,
const osg::Vec3d& center,
double radius);
309 virtual void computeBoundsCulling();
312 virtual float computeEffectFade(
const osg::Vec3& localCam);
315 virtual double clampDistance()
const;
319 virtual bool clampPosition(osg::Vec3d& position);
322 virtual float computeParticleSize();
325 virtual float computePatchCellSize();
328 static int theSortWeights(
const void* arg0,
const void* arg1);
331 static int theSortBackToFront(
const void* arg0,
const void* arg1);
414 static const std::string& theClassName();
int myIndex
Definition: DtGroundFogPatchArea.h:256
Virtual base class.
Definition: DtVirtualBaseClass.h:22
A structure used to hold data for drawing.
Definition: DtGroundFogEffect.h:40
DtGroundFogPatch ** myRenderPatches
Definition: DtGroundFogPatchArea.h:380
float myPatchWorldSize
Definition: DtGroundFogPatchArea.h:377
bool myEnabled
Definition: DtGroundFogPatchArea.h:338
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
AREA_TYPE
brief Area type enumerations.
Definition: DtGroundFogPatchArea.h:62
DtDe & myDe
Definition: DtGroundFogPatchArea.h:335
osg::RenderInfo * myRenderInfo
Definition: DtGroundFogPatchArea.h:90
double myLastWindTime
Definition: DtGroundFogPatchArea.h:342
osg::ref_ptr< osg::Vec4Array > myBones
Definition: DtGroundFogPatchArea.h:237
creator for DtGroundFogPatchArea
Definition: DtGroundFogPatchArea.h:388
unsigned int GLuint
Definition: DtGlTextureBufferObject.h:17
float myBoundsX
Definition: DtGroundFogPatchArea.h:369
Contains makVrv::DtDe class.
this class is used to split work up between threads.
Definition: DtJobSplitter.h:64
float myBaseColorR
Definition: DtGroundFogPatchArea.h:351
double myWeight
Definition: DtGroundFogPatchArea.h:257
GLint myPatternedUnfmLoc
Definition: DtGroundFogPatchArea.h:95
DrawData()
Definition: DtGroundFogPatchArea.h:71
BoneWeight()
Definition: DtGroundFogPatchArea.h:249
GLint myGroundFogUnfmLoc
Definition: DtGroundFogPatchArea.h:92
MeshGroup()
Definition: DtGroundFogPatchArea.h:223
AREA_TYPE myAreaType
Definition: DtGroundFogPatchArea.h:359
DtDe & myDe
Definition: DtGroundFogPatchArea.h:417
std::vector< DtGroundFogEffect * > myEffects
Definition: DtGroundFogPatchArea.h:383
int myClampBoneIndex
Definition: DtGroundFogPatchArea.h:348
osg::Vec3d myCamPos
Definition: DtGroundFogPatchArea.h:91
this class is used to create an effect around the eye to represent blowing particle effects such as s...
Definition: DtGroundFogEffect.h:35
std::vector< DtGroundFogPatch * > myPatches
Definition: DtGroundFogPatchArea.h:378
DtGlVaoManager * myVaoManager
Definition: DtGroundFogPatchArea.h:362
Definition: DtGroundFogPatchArea.h:64
static const double DT_GFP_CLAMP_DISTANCE
Definition: DtGroundFogPatchArea.h:373
osg::Vec3d myBasisPos
Definition: DtGroundFogPatchArea.h:366
float myMaxClampOffset
Definition: DtGroundFogPatchArea.h:349
an object used to represent 1 patch of a patchy ground fog system.
Definition: DtGroundFogPatch.h:32
unsigned int myVboTexCoords0Array
Definition: DtGroundFogPatchArea.h:241
Contains makVrv::DtOsgCullVisitor class.
float myWindV
Definition: DtGroundFogPatchArea.h:341
unsigned int myVboWeightsArray
Definition: DtGroundFogPatchArea.h:243
GLint mySoftnessUnfmLoc
Definition: DtGroundFogPatchArea.h:97
bool myCameraBasisDirty
Definition: DtGroundFogPatchArea.h:344
int myRenderPatchCount
Definition: DtGroundFogPatchArea.h:381
float myPatternSize
Definition: DtGroundFogPatchArea.h:98
unsigned int myVboBonesArray
Definition: DtGroundFogPatchArea.h:242
float myPatternedLook
Definition: DtGroundFogPatchArea.h:358
float myParticleSizeVariation
Definition: DtGroundFogPatchArea.h:355
const DtGroundFogPatchDrawable * myDrawable
Definition: DtGroundFogPatchArea.h:102
float myWindU
Definition: DtGroundFogPatchArea.h:340
bool myInitialized
Definition: DtGroundFogPatchArea.h:345
float myWindDirectionRad
Definition: DtGroundFogPatchArea.h:99
A structure used to define a mesh group (voa, positions, coords).
Definition: DtGroundFogPatchArea.h:221
float myBaseColorB
Definition: DtGroundFogPatchArea.h:353
GLint myInstanceParamsUnfmLoc
Definition: DtGroundFogPatchArea.h:93
float myBaseColorG
Definition: DtGroundFogPatchArea.h:352
An area of ground fog patch items and effects.
Definition: DtGroundFogPatchArea.h:56
bool myClampingEnabled
Definition: DtGroundFogPatchArea.h:346
float myWindSpeedMps
Definition: DtGroundFogPatchArea.h:100
float myOrientation
Definition: DtGroundFogPatchArea.h:365
osg::ref_ptr< osg::Vec4Array > myWeights
Definition: DtGroundFogPatchArea.h:238
int myGridSize
Definition: DtGroundFogPatchArea.h:376
GLint myInstanceMatrixUnfmLoc
Definition: DtGroundFogPatchArea.h:94
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 myBoundsCornerRadius
Definition: DtGroundFogPatchArea.h:371
int myClampIndex
Definition: DtGroundFogPatchArea.h:347
Contains makVrv::DtGroundFogEffect class.
Contains DLL export macros.
float myDensity
Definition: DtGroundFogPatchArea.h:337
osg::ref_ptr< osg::Vec3Array > myPoints
Definition: DtGroundFogPatchArea.h:235
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
MeshGroup * myMeshGroup
Definition: DtGroundFogPatchArea.h:361
GLint mySkeletonUnfmLoc
Definition: DtGroundFogPatchArea.h:96
unsigned int myVboPositionArray
Definition: DtGroundFogPatchArea.h:240
Contains the DtGlVaoManager class declaration.
A drawable used for drawing patchy ground fog objects.
Definition: DtGroundFogPatchDrawable.h:35
int myPatchCount
Definition: DtGroundFogPatchArea.h:379
osg::StateSet * mySensorState
Definition: DtGroundFogPatchArea.h:103
float myBoundsY
Definition: DtGroundFogPatchArea.h:370
osg::Matrixd myBasisRot
Definition: DtGroundFogPatchArea.h:367
A structure used to hold data for drawing.
Definition: DtGroundFogPatchArea.h:69
osg::Vec3d myPosition
Definition: DtGroundFogPatchArea.h:364
osg::ref_ptr< osg::Vec2Array > myTexCoords0
Definition: DtGroundFogPatchArea.h:236
static const int DT_GFP_CELL_SIZE
Definition: DtGroundFogPatchArea.h:374
A structure used to define a skeleton bone weight.
Definition: DtGroundFogPatchArea.h:247
bool myStateDirty
Definition: DtGroundFogPatchArea.h:101