31 #include <matrix/vlVector.h>
39 class DtWeatherFogFroxelGrid;
79 SensorMaterialTypeNone = 0,
85 SensorMaterialTypeCount
122 virtual void releaseGLObjects(osg::State* state = 0)
const override;
129 virtual void deleteGeode();
133 virtual osg::Node* getOrCreateSensorNode(SensorMaterialType matType);
140 virtual bool removeHeightFog(
DtUniqueID uniqueId);
143 virtual void removeCloudLayers();
147 float orientation,
float cornerRadius,
const DtVector& bounds,
148 double density,
bool infinite,
bool relative,
bool altitudeIsHAT);
153 float cornerRadius,
const DtVector& bounds,
double density,
bool relative);
157 const DtVector& position,
float orientation,
float cornerRadius,
158 const DtVector& bounds,
double density,
bool relative);
162 float orientation,
float cornerRadius,
const DtVector& bounds,
163 double density,
bool infinite,
bool relative,
bool altitudeIsHAT);
167 const DtVector& position,
float orientation,
float cornerRadius,
168 const DtVector& bounds,
bool relative);
172 const DtVector& position,
float orientation,
float cornerRadius,
173 const DtVector& bounds,
bool relative);
177 const DtVector& position,
float orientation,
float cornerRadius,
178 const DtVector& bounds,
bool relative);
187 virtual DtUniqueID addPrecipitationShaft(osg::Vec3d& position,
188 const osg::Matrixd& rotation,
const DtVector& bounds,
189 const float cornerRadius,
const float intensity);
193 virtual void removePrecipitationShaft(
DtUniqueID uniqueId);
199 virtual void setWeatherPrecipitationShaftBounds(
DtUniqueID uniqueId,
200 const DtVector& bounds,
const float cornerRadius);
206 virtual void setWeatherPrecipitationShaftTransform(
DtUniqueID uniqueId,
207 const osg::Vec3d& position,
const osg::Matrixd& rotation);
212 virtual void setWeatherPrecipitationShaftIntensity(
DtUniqueID uniqueId,
213 const float intensity);
218 virtual void setWeatherPrecipitationShaftBaseColor(
DtUniqueID uniqueId,
225 virtual void setWeatherPrecipitationShaftWind(
DtUniqueID uniqueId,
226 const float windDirectionRad,
const float windSpeedMps);
231 virtual void setWeatherPrecipitationShaftEnabled(
DtUniqueID uniqueId,
bool enabled);
240 virtual DtUniqueID addLightning(osg::Vec3d& position,
241 const osg::Matrixd& rotation,
const DtVector& bounds,
242 const float cornerRadius,
const float intensity);
246 virtual void removeLightning(
DtUniqueID uniqueId);
252 virtual void setWeatherLightningBounds(
DtUniqueID uniqueId,
253 const DtVector& bounds,
const float cornerRadius);
259 virtual void setWeatherLightningTransform(
DtUniqueID uniqueId,
260 const osg::Vec3d& position,
const osg::Matrixd& rotation);
265 virtual void setWeatherLightningIntensity(
DtUniqueID uniqueId,
266 const float intensity);
271 virtual void setWeatherLightningEnabled(
DtUniqueID uniqueId,
bool enabled);
276 virtual void setCloudLayerDensity(
DtCloudLayerId layerId,
float density);
281 virtual void setHeightFogDensity(
DtUniqueID uniqueId,
float density);
286 virtual void setCloudLayerEnabled(
DtCloudLayerId layerId,
bool enabled);
291 virtual void setHeightFogEnabled(
DtUniqueID uniqueId,
bool enabled);
294 virtual void setCloudLayerPositionAndOrientation(
DtCloudLayerId layerId,
295 const DtVector& position,
float orientation);
298 virtual void setHeightFogPositionAndOrientation(
DtUniqueID uniqueId,
299 const DtVector& position,
float orientation,
bool relative);
307 float red,
float green,
float blue);
314 virtual void setHeightFogBaseColor(
DtUniqueID uniqueId,
315 float red,
float green,
float blue);
321 virtual void setHeightFogBounds(
DtUniqueID uniqueId,
322 const DtVector& bounds,
const float cornerRadius);
327 virtual void setCloudLayerParticleSizeVariation(
DtCloudLayerId layerId,
334 bool patternedEnable);
341 float windDirectionRad,
float windSpeedMps);
346 virtual void setGlobalWind(
float windDirectionRad,
float windSpeedMps);
349 virtual void drawObjects(osg::RenderInfo& renderInfo,
355 virtual void gatherWeatherAreas(
const osg::Vec3d& position,
356 std::vector<DtWeatherArea*>& areas);
363 virtual bool computeLocalPrecipitation(
const DtVector& location,
364 int& precipType,
float& intensity);
371 virtual bool computeLocalGroundRainAccumulation(
const DtVector& location,
372 float& depth,
float& blend);
375 virtual bool shouldActivateRaindrops()
const;
382 virtual bool bindFogFroxelTexture(
const int unit,
const unsigned int renderContextId);
385 virtual float fogFroxelMaxDistance()
const;
396 , myItemType(DrawItemTypeNone)
423 , myCameraBasisDirty(false)
497 virtual void initGroundFogPatchState();
500 virtual void initSandstormState();
503 virtual void initGroundFogEffectState();
506 virtual void initPrecipitationShaftState();
509 virtual void initLightningState();
512 virtual void loadShaders();
515 virtual void loadGroundFogPatchShaders();
518 virtual void loadSandstormShaders();
521 virtual void loadGroundFogEffectShaders();
524 virtual void loadPrecipitationShaftShaders();
527 virtual void loadLightningShaders();
530 virtual void clearDrawBins();
533 void flushDrawBin(osg::RenderInfo& renderInfo,
545 virtual void drawPrecipitationShaft(
569 virtual void initSoftnessUniforms(osg::StateSet& ss,
575 virtual void setupSoftness(osg::Camera* camera,
579 void connectSignals();
582 virtual void slot_reloadShaders();
585 virtual void slot_simulationUpdate();
594 virtual void slot_weatherAreaObjectTransformChanged(
DtUniqueID id,
595 const DtVector& position,
const float orientation);
598 virtual void slot_weatherAreaObjectBoundsChanged(
DtUniqueID id,
599 const DtVector& bounds,
const float cornerRadius);
602 virtual void slot_weatherAreaObjectPrecipitationIntensityChanged(
606 virtual void slot_weatherAreaObjectPrecipitationTypeChanged(
610 virtual void slot_weatherAreaObjectGroundRainAccumulationChanged(
614 virtual void slot_weatherAreaObjectFogColorChanged(
DtUniqueID id,
618 virtual void slot_weatherAreaObjectVisibilityDistanceChanged(
622 virtual void slot_weatherAreaObjectOvercastChanged(
DtUniqueID id,
626 virtual void slot_weatherAreaObjectLightningEnabledChanged(
630 virtual void slot_weatherAreaObjectWindChanged(
631 DtUniqueID id,
const float direction,
const float speed);
634 virtual void slot_weatherAreaObjectCloudLayerAdded(
638 virtual void slot_weatherAreaObjectCloudLayerRemoved(
642 virtual void traverse(osg::NodeVisitor& nv);
645 virtual void disableHeightFog();
649 virtual void cullUpdate(osg::Camera* cam);
653 virtual void cullUpdateHeightFog(osg::Camera* cam);
658 virtual void computeBasis(
const osg::Vec3d& inGeocentricPos, osg::Matrixd& rotOut);
661 virtual void releaseGroundFogPatchGLObjects(osg::State* state)
const;
664 virtual void releaseGroundFogEffectGLObjects(osg::State* state)
const;
667 virtual void releaseWeatherPrecipitationShaftGLObjects(osg::State* state)
const;
670 virtual void releaseWeatherLightningGLObjects(osg::State* state)
const;
732 osg::Node* getChildNodeByName(osg::Group* parent,
const char* name);
osg::Vec3 myBaseColor
Definition: DtWeatherAreaGroup.h:448
std::vector< DrawItem > myPreSortBin
Definition: DtWeatherAreaGroup.h:699
DT_DLL_EXAMPLESCENEROOTPLUGIN void init(DtDe &anIG)
DtUniqueID myUniqueId
Definition: DtWeatherAreaGroup.h:436
osg::ref_ptr< makVrv::DtWeatherAreaDrawable > mySortTransparentDrawable
Definition: DtWeatherAreaGroup.h:691
DtDe & myDe
Definition: DtWeatherAreaGroup.h:674
Contains DtWeatherAreaObjectManager class.
Contains makVrv::DtWeatherLayer class.
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
std::map< DtCloudLayerId, DtUniqueID > DtCloudLayerIdToUniqueIdMap
Definition: DtWeatherAreaGroup.h:714
Definition: DtWeatherAreaGroup.h:84
A structure used to hold data for drawing.
Definition: DtGroundFogEffect.h:41
HeightFogItem()
Definition: DtWeatherAreaGroup.h:419
The weather area object represents a set localized environmental conditions such as local rain and fo...
Definition: DtWeatherAreaObject.h:33
std::map< DtUniqueID, DtWeatherArea * > DtWeatherAreaObjectMap
This is mutable because it's used as part of the const drawImplementation.
Definition: DtWeatherAreaGroup.h:743
Definition: DtWeatherAreaGroup.h:94
osg::ref_ptr< osg::Uniform > myViewMatrixInvUniform
Definition: DtWeatherAreaGroup.h:487
osg::Vec3d myPosition
Definition: DtWeatherAreaGroup.h:438
DtSignalConnectionManager myConnections
Definition: DtWeatherAreaGroup.h:724
Definition: DtWeatherAreaGroup.h:82
DtHeightFogMap myHeightFogMap
Definition: DtWeatherAreaGroup.h:712
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
osg::ref_ptr< osg::Group > mySortPreCloudsGroupNode
Definition: DtWeatherAreaGroup.h:681
double myLastTime
Definition: DtWeatherAreaGroup.h:719
DtWeatherPrecipitationShaftMap myMutableWeatherPrecipitationShaftMap
Definition: DtWeatherAreaGroup.h:748
osg::Vec3d myBasisPos
Definition: DtWeatherAreaGroup.h:439
Creator that is used to create the weather area group.
Definition: DtWeatherAreaGroup.h:758
float myAltitudeBlend
Definition: DtWeatherAreaGroup.h:444
GroundFogPatchState myMutableGroundFogPatchState
Definition: DtWeatherAreaGroup.h:705
osg::ref_ptr< osg::Group > myGroundFogPatchSensorGroup
Definition: DtWeatherAreaGroup.h:693
bool myCameraBasisDirty
Definition: DtWeatherAreaGroup.h:441
A structure to hold draw state information for ground fog effect shaders.
Definition: DtWeatherAreaGroup.h:476
PrecipitationShaftState myMutablePrecipitationShaftState
Definition: DtWeatherAreaGroup.h:708
Contains makVrv::DtGroundFogPatchArea class.
Definition: DtWeatherAreaGroup.h:95
DtWeatherFogFroxelGrid * myWeatherFogFroxelGrid
Definition: DtWeatherAreaGroup.h:726
bool myEnabled
Definition: DtWeatherAreaGroup.h:437
float myWindSpeedMps
Definition: DtWeatherAreaGroup.h:676
osg::ref_ptr< osg::Group > mySortTransparentGroupNode
Definition: DtWeatherAreaGroup.h:689
A structure used to hold data for drawing.
Definition: DtWeatherLightning.h:46
DtCloudLayerIdToUniqueIdMap myCloudLayerIdToUniqueIdMap
Definition: DtWeatherAreaGroup.h:715
Definition: DtWeatherAreaGroup.h:81
this class is used to split work up between threads.
Definition: DtJobSplitter.h:64
DtGroundFogPatchAreaMap myMutableGroundFogPatchAreaMap
Definition: DtWeatherAreaGroup.h:736
A structure to hold data for a height fog object.
Definition: DtWeatherAreaGroup.h:417
This class simulates and renders a precipitation shaft area. The area volume is filled with a density...
Definition: DtWeatherPrecipitationShaft.h:39
A drawable used for drawing items related to weather areas. The class serves as a draw point entry an...
Definition: DtWeatherAreaDrawable.h:30
A group node which serves as a root for weather areas, patchy ground fog areas and effects...
Definition: DtWeatherAreaGroup.h:72
DtJobSplitter * myJobSplitter
Definition: DtWeatherAreaGroup.h:722
virtual osg::Object * clone(const osg::CopyOp ©op) const
required functions for derriving from osg::Group
Definition: DtWeatherAreaGroup.h:125
osg::ref_ptr< makVrv::DtWeatherAreaDrawable > mySortPostCloudsDrawable
Definition: DtWeatherAreaGroup.h:687
GroundFogPatchState()
Definition: DtWeatherAreaGroup.h:465
osg::ref_ptr< osg::Uniform > myViewMatrixInvUniform
Definition: DtWeatherAreaGroup.h:479
DrawItem()
Definition: DtWeatherAreaGroup.h:393
SensorMaterialType
brief Sensor material type enumerations used for sensorfx.
Definition: DtWeatherAreaGroup.h:77
std::vector< DrawItem > mySortBinTransparent
Definition: DtWeatherAreaGroup.h:702
SoftnessUniforms mySoftnessUniforms
Definition: DtWeatherAreaGroup.h:486
This class simulates and renders a lightning area. The area will randomly create lightning within a s...
Definition: DtWeatherLightning.h:39
A structure to hold draw state information for lightning shaders.
Definition: DtWeatherAreaGroup.h:491
osg::ref_ptr< osg::Group > myWeatherPrecipitationShaftSensorGroup
Definition: DtWeatherAreaGroup.h:696
Contains makVrv::DtOsgCullVisitor class.
std::map< DtCloudLayerId, DtWeatherArea * > DtWeatherAreaMap
This is mutable because it's used as part of the const drawImplementation.
Definition: DtWeatherAreaGroup.h:739
SoftnessUniforms mySoftnessUniforms
Definition: DtWeatherAreaGroup.h:493
float myAltitude
Definition: DtWeatherAreaGroup.h:442
DT_DLL_VRVCORE double distance(const makVrv::DtCoordinateSystem &, const DtVector &from, const DtVector &to)
Returns the distance from the two points. Coordinates are in local database coordinates The coordinat...
osg::ref_ptr< osg::Group > myWeatherLightningSensorGroup
Definition: DtWeatherAreaGroup.h:697
DrawItemType
brief Draw item type enumerations used for sorting bins.
Definition: DtWeatherAreaGroup.h:89
SoftnessUniforms mySoftnessUniforms
Definition: DtWeatherAreaGroup.h:470
osg::ref_ptr< makVrv::DtWeatherAreaDrawable > mySortPreCloudsDrawable
Definition: DtWeatherAreaGroup.h:683
float myPatternTextureWidth
Definition: DtWeatherAreaGroup.h:472
float myDensity
Definition: DtWeatherAreaGroup.h:443
osg::ref_ptr< osg::Group > myGroundFogEffectSensorGroup
Definition: DtWeatherAreaGroup.h:695
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
osg::ref_ptr< osg::Group > mySortPostCloudsGroupNode
Definition: DtWeatherAreaGroup.h:685
std::vector< DrawItem > mySortBinPostClouds
Definition: DtWeatherAreaGroup.h:701
GroundFogPatchState myMutableSandstormState
Definition: DtWeatherAreaGroup.h:706
DtWeatherAreaObjectMap myMutableWeatherAreaObjectMap
Definition: DtWeatherAreaGroup.h:744
osg::ref_ptr< osg::Geode > mySortPreCloudsGeode
Definition: DtWeatherAreaGroup.h:682
int mySortDistance
Definition: DtWeatherAreaGroup.h:402
Contains vrvCore::DtCloudLayerRecord declaration.
float myTimeStep
Definition: DtWeatherAreaGroup.h:720
DtWeatherFogFroxelGrid uses a frustum voxel grid to compute density/translucency at voxel locations b...
Definition: DtWeatherFogFroxelGrid.h:52
Definition: DtWeatherAreaGroup.h:80
LightningState myMutableLightningState
Definition: DtWeatherAreaGroup.h:709
A structure used to hold data for drawing.
Definition: DtWeatherPrecipitationShaft.h:46
DtWeatherLightningMap myMutableWeatherLightningMap
Definition: DtWeatherAreaGroup.h:752
std::map< DtUniqueID, DtWeatherLightning * > DtWeatherLightningMap
This is mutable because it's used as part of the const drawImplementation.
Definition: DtWeatherAreaGroup.h:751
A structure to hold draw state information for precipitation shaft shaders.
Definition: DtWeatherAreaGroup.h:484
std::map< DtUniqueID, DtWeatherPrecipitationShaft * > DtWeatherPrecipitationShaftMap
This is mutable because it's used as part of the const drawImplementation.
Definition: DtWeatherAreaGroup.h:747
An area of ground fog patch items and effects. One ground fog patch area is associated with a non-inf...
Definition: DtGroundFogPatchArea.h:56
Functor for comparing draw items by sorting distance.
Definition: DtWeatherAreaGroup.h:409
std::map< DtUniqueID, HeightFogItem > DtHeightFogMap
Definition: DtWeatherAreaGroup.h:711
float myDensityBlend
Definition: DtWeatherAreaGroup.h:445
Base class to provide boost signal/slot management.
void * myItem
Definition: DtWeatherAreaGroup.h:405
float myCornerRadius
Definition: DtWeatherAreaGroup.h:446
osg::Matrixd myBasisRot
Definition: DtWeatherAreaGroup.h:440
Contains makVrv::DtWeatherAreaDrawable class.
osg::ref_ptr< osg::Group > mySandstormSensorGroup
Definition: DtWeatherAreaGroup.h:694
Definition: DtWeatherAreaGroup.h:92
long long DtCloudLayerId
Definition: DtCloudLayer.h:26
Contains makVrv::DtGroundFogEffect class.
Definition: DtWeatherAreaGroup.h:93
Contains DLL export macros.
std::map< DtCloudLayerId, DtGroundFogPatchArea * > DtGroundFogPatchAreaMap
This is mutable because it's used as part of the const drawImplementation.
Definition: DtWeatherAreaGroup.h:735
std::vector< osg::Vec4d > myCullingPlanes
Definition: DtWeatherAreaGroup.h:717
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
Contains the makVrv::DtOsgCullVisitorParameters class. Visual mode information is set into the camera...
std::vector< DrawItem > mySortBinPreClouds
Definition: DtWeatherAreaGroup.h:700
GroundFogEffectState myMutableGroundFogEffectState
Definition: DtWeatherAreaGroup.h:707
osg::ref_ptr< osg::Uniform > myViewMatrixInvUniform
Definition: DtWeatherAreaGroup.h:471
Definition: DtWeatherAreaGroup.h:83
A structure to hold data for a draw item. A draw item is placed in a draw item sorting bin...
Definition: DtWeatherAreaGroup.h:391
A structure used to hold data for drawing.
Definition: DtGroundFogPatchArea.h:69
A structure to hold draw state information for ground fog patch (and sandstorm) shaders.
Definition: DtWeatherAreaGroup.h:463
DrawItemType myItemType
Definition: DtWeatherAreaGroup.h:404
osg::ref_ptr< osg::Geode > mySortPostCloudsGeode
Definition: DtWeatherAreaGroup.h:686
Contains makVrv::DtWeatherLightning class.
Contains makVrv::DtWeatherPrecipitationShaft class.
int mySortPriority
Definition: DtWeatherAreaGroup.h:403
osg::ref_ptr< osg::Geode > mySortTransparentGeode
Definition: DtWeatherAreaGroup.h:690
DtWeatherAreaMap myMutableWeatherAreaMap
Definition: DtWeatherAreaGroup.h:740
SoftnessUniforms mySoftnessUniforms
Definition: DtWeatherAreaGroup.h:478
float myWindDirectionRad
Definition: DtWeatherAreaGroup.h:677
virtual osg::Object * cloneType() const
Definition: DtWeatherAreaGroup.h:126
DtVector myBounds
Definition: DtWeatherAreaGroup.h:447