![]() |
VR-Forces 5.0.1 Developer's Guide
|
A group node which serves as a root for weather layers.
This group node is the top level node in the scenegraph for weather layers. The node also serves as the main interface to create and modify weather layers. There is 1 geode under this node for drawing weather layer effects.
This class hooks into the simulation update which updates all active weather layer effects. Weather layer effects queue update jobs which are updated in parallel using a job splitter. There is also a post update for each weather layer for items that cannot use multithreading (currently intersection tests).
During scenegraph culling, this class calls cull methods on individual weather layers. If a weather layer effect is not culled, it submits a sort job to a job splitter and finally the queued sorting jobs are ran in parallel.

Public Member Functions | |
| DtWeatherLayerGroup (DtDe &de) | |
| DtWeatherLayerGroup (const DtWeatherLayerGroup &orig, const osg::CopyOp &opr) | |
| virtual | ~DtWeatherLayerGroup () |
| virtual osg::Object * | clone (const osg::CopyOp ©op) const |
| virtual osg::Object * | cloneType () const |
| virtual void | releaseGLObjects (osg::State *state=0) const override |
| virtual void | deleteGeode () |
| virtual osg::Node * | getOrCreateSensorNode () |
| virtual void | registerLayer (DtWeatherLayer *layer, bool global=false) |
| virtual void | unregisterLayer (DtWeatherLayer *layer) |
| virtual void | setGlobalWind (float windDirectionRad, float windSpeedMps) |
| virtual void | drawWeatherEffects (DtWeatherEffect::DrawData &drawData) |
| virtual float | timeStep () const |
| virtual void | registerWeatherEffectsObject (DtOsgWeatherEffectsObject *weatherEffectsObject) |
Protected Member Functions | |
| void | connectSignals () |
| void | disconnectSignals () |
| virtual void | slot_groundSnowAccumulationChanged (float value) |
| virtual void | slot_simulationUpdate () |
| virtual void | traverse (osg::NodeVisitor &nv) |
| virtual bool | cullUpdate (osg::Camera *cam) |
| virtual void | computeBasis (const osg::Vec3d &inGeocentricPos, osg::Matrixd &rotOut) |
Protected Attributes | |
| DtDe & | myDe |
| osg::ref_ptr< osg::Geode > | myEffectGeode |
| osg::ref_ptr < makVrv::DtWeatherEffectDrawable > | myEffectDrawable |
| std::vector< osg::Vec4d > | myCullingPlanes |
| std::vector< DtWeatherArea * > | myDrawWeatherAreas |
| double | myLastTime |
| float | myTimeStep |
| float | myWindDirectionRad |
| float | myWindSpeedMps |
| DtJobSplitter * | myJobSplitter |
| DtSignalConnectionManager | myWeatherEffectsConnections |
Private Member Functions | |
| DtWeatherLayerGroup ()=delete | |
| DtWeatherLayerGroup (const DtWeatherLayerGroup &other)=delete | |
| DtWeatherLayerGroup & | operator= (const DtWeatherLayerGroup &other)=delete |
Private Attributes | |
| std::vector< DtWeatherLayer * > | myWeatherLayers |
| std::vector< DtWeatherLayer * > | myGlobalWeatherLayers |
| makVrv::DtWeatherLayerGroup::DtWeatherLayerGroup | ( | DtDe & | de | ) |
CTOR.
| makVrv::DtWeatherLayerGroup::DtWeatherLayerGroup | ( | const DtWeatherLayerGroup & | orig, |
| const osg::CopyOp & | opr | ||
| ) |
Copy constructor needed because it is derived from osg::Group.
|
virtual |
DTOR.
|
privatedelete |
Default Constructor not implemented.
|
privatedelete |
Copy Constructor not implemented - Copy not allowed.
|
privatedelete |
Assignment Operator not implemented - Assignment not allowed.
|
inlinevirtual |
required functions for derriving from osg::Group
|
inlinevirtual |
|
overridevirtual |
Release all gl objects used by weather effect objects.
|
virtual |
Tell the group to delete its specific children.
|
virtual |
|
virtual |
Registers the layer for use with this group. unregisterLayer should be called by the layer owner when it no longer in use. This group does not own the layer obect. Set global to true if the layer does not belong to a local area.
| layer | The layer to register. |
| global | True if the layer is a used as a global effect. |
|
virtual |
Unregisters a previously registered layer from this group. This group does not own the layer obect.
| layer | The layer to unregister. |
|
virtual |
Sets the current global wind to use for weather layers.
| windDirectionRad | The wind direction in radians. |
| windSpeedMps | The wind speed in meters per second. |
|
virtual |
Draw all weather effects.
|
virtual |
Returns the last simulation timestep.
|
virtual |
called by the DtOsgWeatherEffectsObject constructor to register itself when it is created.
|
protected |
Connects all the signals, non-virtural, called in the ctor.
|
protected |
Disconnects all the signals, non-virtural, called in the dtor.
|
protectedvirtual |
Signal to handle when the ground snow accumulation changes.
|
protectedvirtual |
Signal handler to run a simulation update.
|
protectedvirtual |
Traverse.
|
protectedvirtual |
Update draw objects for current camera. Returns false if everything was culled.
| cam | The current camera. |
|
protectedvirtual |
Computes a basis rotation matrix for the given geocentric position.
| inGeocentricPos | The geocentric reference position. |
| rotOut | The computed basis rotation transform. |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprivate |
These are mutable because it's used as part of the const drawImplementation.
|
mutableprivate |