VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
makVrv::DtFxParticleSystemModelInstance Class Reference

An effect model instance creates a particle effect from a model definition. More...

Inheritance diagram for makVrv::DtFxParticleSystemModelInstance:
Inheritance graph
[legend]

Public Member Functions

virtual ~DtFxParticleSystemModelInstance ()
 DTOR. More...
 
virtual void setPosition (double x, double y, double z)
 Set the position of the emitter. More...
 
virtual void setPosition (int index, double x, double y, double z)
 sets the position of a sub emitter . More...
 
virtual void setIntensity (float intensity)
 Set the effect intensity. More...
 
virtual void setIsRotorWash (bool isRotorWash)
 For rotorwash type effects, scale the vortex lift force and radius with intensity. More...
 
virtual void setScale (float scale)
 Set the effect scale. More...
 
virtual void setRotorDiameter (double diameter)
 For rotorwash type effects, set the lift vortex radius (if diameter is a negative number then use the value in the particle system description) More...
 
virtual void setRotorWindSpeed (double speed)
 For rotorwash type effects, multiply the lift vortex force by speed/100 (if speed is a negative number then the lift vortex won't be scaled by the value) More...
 
virtual void setIgnoreModelScaling (bool ignoreModelScaling)
 Sets Whether ignore scaling the particle by distance when you enable the "XR" mode. More...
 
virtual bool ignoreModelScaling () const
 Get whether model scaling is disabled for this model instance. More...
 
virtual void setDuration (double seconds)
 Set the effect duration. More...
 
virtual void setWind (const DtVector &windVector, const DtVector &up)
 Set the effect wind. More...
 
virtual void setMaxParticlesToEmit (int max)
 Set the maximum number of particles to emit. More...
 
virtual bool realize (DtModelDefinition &definition)
 Attempt to realize a definition. More...
 
virtual osg::Node * getOrLoadFromDefinition (DtModelDefinition &definition)
 Load a node from a file, or from the cache if possible. More...
 
virtual void addToConnector (DtOsgSceneConnector *connector)
 Tell the model instance to add itself to the provided node. More...
 
virtual bool removeFromConnector (DtOsgSceneConnector *connector)
 Tell the model instance to remove itself from the provided node. More...
 
virtual void stop ()
 Tell the model to stop emitting particles. More...
 
virtual void start ()
 Tell the model to start emitting particles. More...
 
virtual void pause ()
 Freeze the particle system. More...
 
virtual void resume ()
 resume the particle system. More...
 
virtual void setVisible (bool isVisible)
 stops the system More...
 
virtual DtParticleEffecteffectNode ()
 access the particle object. More...
 
virtual diguyMaterialType getMaterialType ()
 access the particle material type. More...
 
virtual void setOffset (const DtVector &offset)
 sets offset for system in DIS format (forward, right, down) More...
 
virtual void setArtPart (int partNumber)
 sets articulated part to attach to More...
 
virtual void setStartEmit (bool autoEmit)
 sets whether traverse will call emit the first time the particle system is traversed (call before setModelInstance) More...
 
bool startEmit ()
 gets whether traverse will call emit More...
 
- Public Member Functions inherited from makVrv::DtOsgModelInstance
virtual ~DtOsgModelInstance ()
 DTOR. More...
 
virtual bool cloneInstance (DtModelDefinition &definition)
 Attempt to clone the basic geometry. More...
 
virtual bool saveModelToFile (const std::string &filename) const
 Attempt to save the model to a file. More...
 
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. More...
 
virtual void setBlendColor (float r, float g, float b, float a)
 set the model's color More...
 
virtual void enableTexture (bool onOff)
 
virtual osg::Node * rootNode ()
 Get the model instance's root node. More...
 
virtual const osg::Node * rootNode () const
 
virtual osg::Node * sensorNode ()
 Get the model instance's sensor node, . More...
 
virtual const osg::Node * sensorNode () const
 
virtual void addDynamicSensorRegion (const std::string &region)
 Add an active region state. More...
 
virtual void setDynamicSensorRegion (const std::string &region, bool state)
 Set the state of an active region. More...
 
virtual bool dynamicSensorRegion (const std::string &region)
 Get the current state of the specified sensor region. More...
 
SensorRegionStateMap const dynamicSensorRegionMap () const
 Get the map containing all regions and their current states. More...
 
virtual void slot_atcGlobalModelEnableChanged ()
 Slot to handle the global alpha to coverage signal for entities. More...
 
virtual bool alphaToCoverageEnabled ()
 Get the current setting for alpha to coverage for this model. More...
 
virtual void registerLightPoints (const std::string &groupName, bool daylightControlledLights)
 loop over all this models light points and register them with the light point manager daylightControlled is only used if the light points do not already have a type specified More...
 
- Public Member Functions inherited from makVrv::DtModelInstance
 DtModelInstance (DtDe &de)
 CTOR. More...
 
virtual ~DtModelInstance ()
 DTOR. More...
 
const std::string & realizedDefinitionName () const
 Get the name of the definition that this model instance was realized with. More...
 
const DtVectorboundingBoxExtents () const
 Get the bounding box extents of the model instance. More...
 
void getBoundingBoxExtents (double &x, double &y, double &z) const
 Get the bounding box extents of the model instance. More...
 
const DtVectorboundingBoxCenter () const
 Get the bounding box center of the model instance. More...
 
void getBoundingBoxCenter (double &x, double &y, double &z) const
 Get the bounding box center of the model instance. More...
 
void getBoundingBoxComponents (DtVector &minimum, DtVector &maximum)
 Get the bounding box min/max of the model instance. More...
 
const DtVectorallGeometryboundingBoxExtents () const
 functions for getting the allGeometry versions of the extents (they are calculated by traversing as if all switch paths are active) More...
 
void getAllGeometryBoundingBoxExtents (double &x, double &y, double &z) const
 Get the all geometry version of bounding box extents of the model instance. More...
 
const DtVectorallGeometryboundingBoxCenter () const
 Get the all geometry version of bounding box center of the model instance. More...
 
void getAllGeometryBoundingBoxCenter (double &x, double &y, double &z) const
 Get the all geometry version of bounding box center of the model instance. More...
 
void getAllGeometryBoundingBoxComponents (DtVector &minimum, DtVector &maximum)
 Get the all geometry version of bounding box min/max of the model instance. More...
 
virtual void setContributesToBound (bool trueOrFalse)
 Set whether this model instance contributes to an object's overall bounding volume. More...
 
bool contributesToBound () const
 Get whether this model instance contributes to an object's overall bounding volume. More...
 

Protected Member Functions

 DtFxParticleSystemModelInstance (DtDe &de)
 Create the effect. More...
 
virtual osg::Node * loadNode (const std::string &filenameParam, const std::string &resourcePathList)
 Try to load a filename as a node. More...
 
- Protected Member Functions inherited from makVrv::DtParticleSystemModelInstance
 DtParticleSystemModelInstance (DtDe &de)
 Create the effect, no op constructor. More...
 
- Protected Member Functions inherited from makVrv::DtOsgModelInstance
 DtOsgModelInstance (DtDe &de)
 CTOR. More...
 
virtual void updateColorBlending ()
 calls update color blending with the model root. More...
 
virtual void updateColorBlending (osg::Node *node)
 
virtual void enableTexture (osg::Node *root, bool onOff)
 
virtual void updateBoundingBoxViaContents ()
 
virtual void setRootNode (osg::Node *node)
 Set the model instance's root node. More...
 
virtual void setUpDepthTest (osg::StateSet *stateSet)
 Helper function to set up a depth test on a state set taking into account whether reverse z is enabled or not. More...
 

Protected Attributes

osg::ref_ptr< DtParticleEffectmyEffect
 
osg::ref_ptr
< osg::MatrixTransform > 
myDiguySystemUpdater
 
DtFxParticleSystemmyDiguySystem
 
bool myIgnoreModelScaling
 
DtVector myOffset
 
int myArtPart
 
bool myStartEmit
 
bool myIsRotorWash
 
- Protected Attributes inherited from makVrv::DtOsgModelInstance
osg::ref_ptr< osg::Node > myModelRoot
 
osg::ref_ptr< osg::StateSet > myCachedState
 
SensorRegionStateMap mySensorRegionMap
 
AlphaToCoverageState myAlphaToCoverageState
 
DtSignalConnectionManager myConnections
 
bool myModelInstanceShaderSet
 Has this model instance had a shader generated for it? Used for classes (ex. More...
 
- Protected Attributes inherited from makVrv::DtModelInstance
DtDemyDe
 
std::string myRealizedModelDefinitionName
 
DtVector myBoundingBoxCenter
 
DtVector myBoundingBoxExtents
 
DtVector myBoundingBoxMinimum
 
DtVector myBoundingBoxMaximum
 
DtVector myAllGeometryBoundingBoxCenter
 
DtVector myAllGeometryBoundingBoxExtents
 
DtVector myAllGeometryBoundingBoxMinimum
 
DtVector myAllGeometryBoundingBoxMaximum
 
bool myContributesToBound
 
bool myColorBlendingEnabled
 
float myBlendRed
 
float myBlendBlue
 
float myBlendGreen
 
float myBlendAlpha
 

Friends

class DtFxParticleSystemModelInstanceCreator
 The class may only be instantiated through the friend creator. More...
 

Additional Inherited Members

- Public Types inherited from makVrv::DtOsgModelInstance
enum  AlphaToCoverageState { USE_GLOBAL, FORCE_OFF, FORCE_ON }
 The possible states of a control point. More...
 
typedef boost::unordered_map
< std::string, bool
SensorRegionStateMap
 Dynamic Sensor Region methods. More...
 
- Static Public Member Functions inherited from makVrv::DtOsgModelInstance
static osg::Vec4 readVec4 (const std::string &paramName, const DtModelDefinition &definition, const osg::Vec4 &initValue=osg::Vec4(1, 1, 1, 1))
 
static osg::Vec3 readVec3 (const std::string &paramName, const DtModelDefinition &definition, const osg::Vec3 &initValue=osg::Vec3(1, 1, 1))
 
- Static Public Member Functions inherited from makVrv::DtModelInstance
static float readFloat (const std::string &paramName, const DtModelDefinition &definition)
 
static DtVector readVector (const std::string &paramName, const DtModelDefinition &definition)
 
- Public Attributes inherited from makVrv::DtOsgModelInstance
boost::signalslib::signal
< void(const std::string &) > 
signal_dynamicSensorRegionAdded
 Signal raised when a dynamic sensor region is added. More...
 
boost::signalslib::signal
< void(const std::string
&, bool) > 
signal_dynamicSensorRegionChanged
 Signal raised when a dynamic sensor region's state changes. More...
 
boost::signalslib::signal
< void(bool)> 
signal_atcModeEnableChanged
 Signal raised when alpha to coverage for this model is changed. More...
 
- Public Attributes inherited from makVrv::DtModelInstance
boost::signalslib::signal
< void(DtModelInstance *)> 
signal_modelInstanceChanged
 

Detailed Description

An effect model instance creates a particle effect from a model definition.

Can be either a new DI-Guy based effect or an osg based one.

Constructor & Destructor Documentation

virtual makVrv::DtFxParticleSystemModelInstance::~DtFxParticleSystemModelInstance ( )
virtual

DTOR.

makVrv::DtFxParticleSystemModelInstance::DtFxParticleSystemModelInstance ( DtDe de)
protected

Create the effect.

Member Function Documentation

virtual void makVrv::DtFxParticleSystemModelInstance::setPosition ( double  x,
double  y,
double  z 
)
virtual

Set the position of the emitter.

Implements makVrv::DtParticleSystemModelInstance.

virtual void makVrv::DtFxParticleSystemModelInstance::setPosition ( int  index,
double  x,
double  y,
double  z 
)
virtual

sets the position of a sub emitter .

Implements makVrv::DtParticleSystemModelInstance.

virtual void makVrv::DtFxParticleSystemModelInstance::setIntensity ( float  intensity)
virtual

Set the effect intensity.

Implements makVrv::DtParticleSystemModelInstance.

Reimplemented in makVrv::DtParticleRotorWashModelInstance.

virtual void makVrv::DtFxParticleSystemModelInstance::setIsRotorWash ( bool  isRotorWash)
virtual

For rotorwash type effects, scale the vortex lift force and radius with intensity.

virtual void makVrv::DtFxParticleSystemModelInstance::setScale ( float  scale)
virtual

Set the effect scale.

Implements makVrv::DtParticleSystemModelInstance.

Reimplemented in makVrv::DtParticleRotorWashModelInstance.

virtual void makVrv::DtFxParticleSystemModelInstance::setRotorDiameter ( double  diameter)
virtual

For rotorwash type effects, set the lift vortex radius (if diameter is a negative number then use the value in the particle system description)

Reimplemented in makVrv::DtParticleRotorWashModelInstance.

virtual void makVrv::DtFxParticleSystemModelInstance::setRotorWindSpeed ( double  speed)
virtual

For rotorwash type effects, multiply the lift vortex force by speed/100 (if speed is a negative number then the lift vortex won't be scaled by the value)

Reimplemented in makVrv::DtParticleRotorWashModelInstance.

virtual void makVrv::DtFxParticleSystemModelInstance::setIgnoreModelScaling ( bool  ignoreModelScaling)
virtual

Sets Whether ignore scaling the particle by distance when you enable the "XR" mode.

This can be configured from "ignoreModelScaling" in the model definition. Default is true.

Implements makVrv::DtParticleSystemModelInstance.

virtual bool makVrv::DtFxParticleSystemModelInstance::ignoreModelScaling ( ) const
virtual

Get whether model scaling is disabled for this model instance.

Implements makVrv::DtParticleSystemModelInstance.

virtual void makVrv::DtFxParticleSystemModelInstance::setDuration ( double  seconds)
virtual

Set the effect duration.

Implements makVrv::DtParticleSystemModelInstance.

virtual void makVrv::DtFxParticleSystemModelInstance::setWind ( const DtVector windVector,
const DtVector up 
)
virtual

Set the effect wind.

Implements makVrv::DtParticleSystemModelInstance.

virtual void makVrv::DtFxParticleSystemModelInstance::setMaxParticlesToEmit ( int  max)
virtual

Set the maximum number of particles to emit.

Implements makVrv::DtParticleSystemModelInstance.

virtual bool makVrv::DtFxParticleSystemModelInstance::realize ( DtModelDefinition definition)
virtual

Attempt to realize a definition.

If the model instance can't realize the definition it should return false.

Implements makVrv::DtParticleSystemModelInstance.

virtual osg::Node* makVrv::DtFxParticleSystemModelInstance::getOrLoadFromDefinition ( DtModelDefinition definition)
virtual

Load a node from a file, or from the cache if possible.

Implements makVrv::DtParticleSystemModelInstance.

virtual void makVrv::DtFxParticleSystemModelInstance::addToConnector ( DtOsgSceneConnector connector)
virtual

Tell the model instance to add itself to the provided node.

Implements makVrv::DtParticleSystemModelInstance.

virtual bool makVrv::DtFxParticleSystemModelInstance::removeFromConnector ( DtOsgSceneConnector connector)
virtual

Tell the model instance to remove itself from the provided node.

Implements makVrv::DtParticleSystemModelInstance.

virtual void makVrv::DtFxParticleSystemModelInstance::stop ( )
virtual

Tell the model to stop emitting particles.

Implements makVrv::DtParticleSystemModelInstance.

Reimplemented in makVrv::DtParticleRotorWashModelInstance.

virtual void makVrv::DtFxParticleSystemModelInstance::start ( )
virtual

Tell the model to start emitting particles.

Implements makVrv::DtParticleSystemModelInstance.

Reimplemented in makVrv::DtParticleRotorWashModelInstance.

virtual void makVrv::DtFxParticleSystemModelInstance::pause ( )
virtual

Freeze the particle system.

Implements makVrv::DtParticleSystemModelInstance.

virtual void makVrv::DtFxParticleSystemModelInstance::resume ( )
virtual

resume the particle system.

Implements makVrv::DtParticleSystemModelInstance.

virtual void makVrv::DtFxParticleSystemModelInstance::setVisible ( bool  isVisible)
virtual
virtual DtParticleEffect* makVrv::DtFxParticleSystemModelInstance::effectNode ( )
virtual

access the particle object.

virtual diguyMaterialType makVrv::DtFxParticleSystemModelInstance::getMaterialType ( )
virtual

access the particle material type.

virtual void makVrv::DtFxParticleSystemModelInstance::setOffset ( const DtVector offset)
virtual

sets offset for system in DIS format (forward, right, down)

Implements makVrv::DtParticleSystemModelInstance.

Reimplemented in makVrv::DtParticleRotorWashModelInstance.

virtual void makVrv::DtFxParticleSystemModelInstance::setArtPart ( int  partNumber)
virtual

sets articulated part to attach to

Implements makVrv::DtParticleSystemModelInstance.

virtual void makVrv::DtFxParticleSystemModelInstance::setStartEmit ( bool  autoEmit)
virtual

sets whether traverse will call emit the first time the particle system is traversed (call before setModelInstance)

bool makVrv::DtFxParticleSystemModelInstance::startEmit ( )

gets whether traverse will call emit

virtual osg::Node* makVrv::DtFxParticleSystemModelInstance::loadNode ( const std::string &  filenameParam,
const std::string &  resourcePathList 
)
protectedvirtual

Try to load a filename as a node.

Friends And Related Function Documentation

The class may only be instantiated through the friend creator.

Member Data Documentation

osg::ref_ptr<DtParticleEffect> makVrv::DtFxParticleSystemModelInstance::myEffect
protected
osg::ref_ptr<osg::MatrixTransform> makVrv::DtFxParticleSystemModelInstance::myDiguySystemUpdater
protected
DtFxParticleSystem* makVrv::DtFxParticleSystemModelInstance::myDiguySystem
protected
bool makVrv::DtFxParticleSystemModelInstance::myIgnoreModelScaling
protected
DtVector makVrv::DtFxParticleSystemModelInstance::myOffset
protected
int makVrv::DtFxParticleSystemModelInstance::myArtPart
protected
bool makVrv::DtFxParticleSystemModelInstance::myStartEmit
protected
bool makVrv::DtFxParticleSystemModelInstance::myIsRotorWash
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)