![]() |
VR-Forces 4.3.1 Class Documentation
|
A model instance of a tactical smoke cloud consisting of several puffs of smoke. More...

Public Member Functions | |
| DtTacticalSmokeModelInstance (DtDe &de) | |
| Initializing CTOR. | |
| virtual | ~DtTacticalSmokeModelInstance () |
| Virtual DTOR. | |
| virtual void | setBasePosition (const DtVector &v) |
| Set base position for particles. | |
| virtual bool | realize (DtModelDefinition &definition) |
| Attempt to realize the instance of this model from a definition. | |
| virtual void | setTexture (const std::string &txt) |
| Set the texture for all particles of this puff. | |
| virtual void | setIntensity (const osg::Vec2 &range) |
| Set the number of particles to emit each frame. | |
| virtual void | setSizes (const osg::Vec2 &range) |
| Set the initial and final sizes of particles. | |
| virtual void | setRotations (const osg::Vec2 &range) |
| Set the range of values for angular-velocity of particles. | |
| virtual void | setColors (const osg::Vec4 &ic, const osg::Vec4 &fc) |
| Set the initial and final colors of particles. | |
| virtual void | setAlphaMultiplier (double alpha) |
| Set an initial alpha value multiplier for particles. | |
| virtual void | setSpeed (double speed) |
| Set a constant speed of the particles in meters per second. | |
| virtual void | setLifetime (double life) |
| Set a constant lifetime of the particles in seconds. | |
| virtual void | addToConnector (DtOsgSceneConnector *connector) |
| Tell the model instance to add itself to the provided node. | |
| virtual bool | removeFromConnector (DtOsgSceneConnector *connector) |
| Tell the model instance to remove itself from the provided node. | |
| virtual void | setVisible (bool isVisible) |
| Set the visible state of this object. | |
| virtual void | setPuffPosition (int puffIndex, const DtVector &position) |
| Set the position of a smoke-puff of particles. | |
| virtual void | setOneSigmaDistance (int puffIndex, const DtVector &sigma) |
| Set the one-sigma distance per orthogonal direction of a smoke-puff of particles. | |
| virtual void | setDensity (int puffIndex, double density) |
| Set density of a smoke-puff of particles. | |
| virtual void | setWindDirection (const DtVector &winddir) |
| Set the wind direction and intensity. | |
| virtual void | start () |
| Tell the model to start emitting particles. | |
| virtual void | stop () |
| Tell the model to stop emitting particles. | |
| virtual void | pause () |
| Freeze the particle emitters. | |
| virtual void | resume () |
| Resume the animation. | |
Public Member Functions inherited from makVrv::DtOsgModelInstance | |
| virtual | ~DtOsgModelInstance () |
| DTOR. | |
| virtual bool | saveModelToFile (const std::string &filename) const |
| Attempt to save the model to a file. | |
| virtual void | enableColorBlending (bool b) |
| Enable / disable coloring on all models in the scene object Note about enableColorBlending: If this particular model has instancing enabled then this flag is set to false and color blending is handled by the instance manager. | |
| virtual void | setBlendColor (float r, float g, float b, float a) |
| set the model's color | |
| virtual void | enableTexture (bool onOff) |
| virtual osg::Node * | rootNode () |
| Get the model instance's root node. | |
| virtual const osg::Node * | rootNode () const |
| Get the model instance's root node. | |
| virtual osg::Node * | sensorNode () |
| Get the model instance's sensor node, . | |
| virtual const osg::Node * | sensorNode () const |
| Get the model instance's sensor node, . | |
| virtual void | addDynamicSensorRegion (const std::string ®ion) |
| Add an active region state. | |
| virtual void | setDynamicSensorRegion (const std::string ®ion, bool state) |
| Set the state of an active region. | |
| virtual bool | dynamicSensorRegion (const std::string ®ion) |
| Get the current state of the specified sensor region. | |
| SensorRegionStateMap const | dynamicSensorRegionMap () const |
| Get the map containing all regions and their current states. | |
Public Member Functions inherited from makVrv::DtModelInstance | |
| DtModelInstance (DtDe &de) | |
| CTOR. | |
| virtual | ~DtModelInstance () |
| DTOR. | |
| const std::string & | realizedDefinitionName () const |
| Get the name of the definition that this model instance was realized with. | |
| const DtVector & | boundingBoxExtents () const |
| Get the bounding box extents of the model instance. | |
| void | getBoundingBoxExtents (double &x, double &y, double &z) const |
| Get the bounding box extents of the model instance. | |
| const DtVector & | boundingBoxCenter () const |
| Get the bounding box center of the model instance. | |
| void | getBoundingBoxCenter (double &x, double &y, double &z) const |
| Get the bounding box center of the model instance. | |
| void | getBoundingBoxComponents (DtVector &minimum, DtVector &maximum) |
| virtual void | setContributesToBound (bool trueOrFalse) |
| Set whether this model instance contributes to an object's overall bounding volume. | |
| bool | contributesToBound () const |
| Get whether this model instance contributes to an object's overall bounding volume. | |
Private Member Functions | |
| void | destroyEffect () |
| Remove effect from scene-graph, destroy children and destroy effect. | |
Private Attributes | |
| osg::ref_ptr < DtTacticalSmokeEffect > | myCloud |
| osg::Vec3d | myBasePosition |
Friends | |
| class | DtTacticalSmokeModelInstanceCreator |
Additional Inherited Members | |
Public Types inherited from makVrv::DtOsgModelInstance | |
| typedef boost::unordered_map < std::string, bool > | SensorRegionStateMap |
| Dynamic Sensor Region methods. | |
Static Public Member Functions inherited from makVrv::DtOsgModelInstance | |
| static osg::Vec4 | readVec4 (const std::string ¶mName, const DtModelDefinition &definition) |
| static osg::Vec3 | readVec3 (const std::string ¶mName, const DtModelDefinition &definition) |
Public Attributes inherited from makVrv::DtOsgModelInstance | |
| boost::signal< void(const std::string &) > | signal_dynamicSensorRegionAdded |
| Signal raised when a dynamic sensor region is added. | |
| boost::signal< void(const std::string &, bool) > | signal_dynamicSensorRegionChanged |
| Signal raised when a dynamic sensor region's state changes. | |
Public Attributes inherited from makVrv::DtModelInstance | |
| boost::signal< void(DtModelInstance *)> | signal_modelInstanceChanged |
Protected Member Functions inherited from makVrv::DtOsgModelInstance | |
| virtual void | updateColorBlending () |
| calls update color blending with the model root. | |
| virtual void | updateColorBlending (osg::Node *node) |
| virtual void | enableTexture (osg::Node *root, bool onOff) |
| virtual void | updateBoundingBoxViaContents () |
| DtOsgModelInstance (DtDe &de) | |
| CTOR. | |
| virtual void | setRootNode (osg::Node *node) |
| Set the model instance's root node. | |
Protected Attributes inherited from makVrv::DtOsgModelInstance | |
| osg::ref_ptr< osg::Node > | myModelRoot |
| osg::ref_ptr< osg::StateSet > | myCachedState |
| SensorRegionStateMap | mySensorRegionMap |
A model instance of a tactical smoke cloud consisting of several puffs of smoke.
| makVrv::DtTacticalSmokeModelInstance::DtTacticalSmokeModelInstance | ( | DtDe & | de | ) |
Initializing CTOR.
| [in] | de | is a reference to the display engine. |
|
virtual |
Virtual DTOR.
|
virtual |
Set base position for particles.
Particle positions will be stored at an offset from this position. After the first time this function is called, it is a no-op.
|
virtual |
Attempt to realize the instance of this model from a definition.
| [in] | definition | is the model definition. |
| true | if the instance was realized. |
| false | otherwise. |
Reimplemented from makVrv::DtModelInstance.
|
virtual |
Set the texture for all particles of this puff.
| [in] | txt | is the texture filename. |
|
virtual |
Set the number of particles to emit each frame.
These values are spread across all puffs to create a random number of total particles to generate each second.
| [in] | range | is the min/max range multipliers, default (6, 12). |
|
virtual |
Set the initial and final sizes of particles.
These values allow particles to grow or shrink over their lifetime.
| [in] | range | is the start/end sizes, default (1, 1). |
|
virtual |
Set the range of values for angular-velocity of particles.
These values allow particles to rotate continuously over their lifetime. The angular-velocity should be specified in degrees.
| [in] | range | is the min/max angular-velocity, default (-10, 10). |
|
virtual |
Set the initial and final colors of particles.
These values allow particles to change colors over their lifetime.
| [in] | ic | is the initial color, default (1.0, 1.0, 1.0, 1.0). |
| [in] | fc | is the final color, default (1.0, 1.0, 1.0, 1.0). |
|
virtual |
Set an initial alpha value multiplier for particles.
This is multiplied to starting alpha value of the particles, the ending value is always zero. The alpha value should be a normalized value from zero to one. Invalid values are clamped.
| [in] | alpha | is the starting alpha value, default 1.0. |
|
virtual |
Set a constant speed of the particles in meters per second.
Setting this value fixes a constant speed of the particle while forcing each particle to have a variable lifetime.
| [in] | speed | is the constant speed of particles, default 0.25. |
|
virtual |
Set a constant lifetime of the particles in seconds.
Setting this value fixes a constant lifetime of the particle while forcing each particle to have a variable speed.
| [in] | life | is the constant lifetime of particles, default 40. |
|
virtual |
Tell the model instance to add itself to the provided node.
| [in] | connector | is the scene-connector with the node. |
Reimplemented from makVrv::DtOsgModelInstance.
|
virtual |
Tell the model instance to remove itself from the provided node.
| [in] | connector | is the scene-connector with the node. |
| true | if model instance was successfully removed. |
| false | otherwise. |
Reimplemented from makVrv::DtOsgModelInstance.
|
virtual |
Set the visible state of this object.
| [in] | isVisible | is the new visible state. |
Implements makVrv::DtModelInstance.
|
virtual |
Set the position of a smoke-puff of particles.
| [in] | puffIndex | is the id of the the particle effect. |
| [in] | position | is the position of new particles. |
|
virtual |
Set the one-sigma distance per orthogonal direction of a smoke-puff of particles.
| [in] | puffIndex | is the id of the the particle effect. |
| [in] | sigma | is the distance in each direction where the probability of particle distribution within that distance is one-sigma (68.3%) from the emitting position. |
|
virtual |
Set density of a smoke-puff of particles.
| [in] | puffIndex | is the id of the the particle effect. |
| [in] | density | is the density of the particles where 1.0 is full density and 0.0 is no density (no smoke), default is 1.0. |
|
virtual |
Set the wind direction and intensity.
| [in] | winddir | is the direction and intensity of the wind. |
|
virtual |
Tell the model to start emitting particles.
|
virtual |
Tell the model to stop emitting particles.
|
virtual |
Freeze the particle emitters.
|
virtual |
Resume the animation.
|
private |
Remove effect from scene-graph, destroy children and destroy effect.
|
friend |
|
private |
|
private |