VR-Forces 5.0.3 Developer's Guide
 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. Can be either a new DI-Guy based effect or an osg based one.

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

Public Member Functions

virtual ~DtFxParticleSystemModelInstance ()
 
virtual void setPosition (double x, double y, double z)
 
virtual void setPosition (int index, double x, double y, double z)
 
virtual void setIntensity (float intensity)
 
virtual void setIsRotorWash (bool isRotorWash)
 
virtual void setScale (float scale)
 
virtual void setRotorDiameter (double diameter)
 
virtual void setRotorWindSpeed (double speed)
 
virtual void setIgnoreModelScaling (bool ignoreModelScaling)
 
virtual bool ignoreModelScaling () const
 
virtual void setDuration (double seconds)
 
virtual void setWind (const DtVector &windVector, const DtVector &up)
 
virtual void setMaxParticlesToEmit (int max)
 
virtual bool realize (DtModelDefinition &definition)
 
virtual osg::Node * getOrLoadFromDefinition (DtModelDefinition &definition)
 
virtual void addToConnector (DtOsgSceneConnector *connector)
 
virtual bool removeFromConnector (DtOsgSceneConnector *connector)
 
virtual void stop ()
 
virtual void start ()
 
virtual void pause ()
 
virtual void resume ()
 
virtual void setVisible (bool isVisible)
 
virtual DtOsgParticleSystemEffecteffectNode ()
 
virtual diguyMaterialType getMaterialType ()
 
virtual void setOffset (const DtVector &offset)
 
virtual void setArtPart (int partNumber)
 
virtual void setStartEmit (bool autoEmit)
 
bool startEmit ()
 
- Public Member Functions inherited from makVrv::DtOsgModelInstance
virtual ~DtOsgModelInstance ()
 
virtual bool cloneInstance (DtModelDefinition &definition)
 
virtual bool saveModelToFile (const std::string &filename) const
 
virtual void enableColorBlending (bool b)
 
virtual void setBlendColor (float r, float g, float b, float a)
 
virtual void enableTexture (bool onOff)
 
virtual osg::Node * rootNode ()
 
virtual const osg::Node * rootNode () const
 
virtual osg::Node * sensorNode ()
 
virtual const osg::Node * sensorNode () const
 
virtual void setDynamicSensorRegion (const std::string &region, bool state)
 
virtual bool dynamicSensorRegion (const std::string &region)
 
virtual const
SensorRegionStateMap
dynamicSensorRegionMap () const
 
virtual void slot_atcGlobalModelEnableChanged ()
 
virtual bool alphaToCoverageEnabled ()
 
virtual void registerLightPoints (const std::string &groupName, bool daylightControlledLights)
 
- Public Member Functions inherited from makVrv::DtModelInstance
 DtModelInstance (DtDe &de)
 
virtual ~DtModelInstance ()
 
const std::string & realizedDefinitionName () const
 
const DtVectorboundingBoxExtents () const
 
void getBoundingBoxExtents (double &x, double &y, double &z) const
 
const DtVectorboundingBoxCenter () const
 
void getBoundingBoxCenter (double &x, double &y, double &z) const
 
void getBoundingBoxComponents (DtVector &minimum, DtVector &maximum)
 
const DtVectorallGeometryboundingBoxExtents () const
 
void getAllGeometryBoundingBoxExtents (double &x, double &y, double &z) const
 
const DtVectorallGeometryboundingBoxCenter () const
 
void getAllGeometryBoundingBoxCenter (double &x, double &y, double &z) const
 
void getAllGeometryBoundingBoxComponents (DtVector &minimum, DtVector &maximum)
 
virtual void setContributesToBound (bool trueOrFalse)
 
bool contributesToBound () const
 

Protected Member Functions

 DtFxParticleSystemModelInstance (DtDe &de)
 
virtual osg::Node * loadNode (const std::string &filenameParam, const std::string &resourcePathList)
 
- Protected Member Functions inherited from makVrv::DtParticleSystemModelInstance
 DtParticleSystemModelInstance (DtDe &de)
 
- Protected Member Functions inherited from makVrv::DtOsgModelInstance
 DtOsgModelInstance (DtDe &de)
 
virtual void updateColorBlending ()
 
virtual void updateColorBlending (osg::Node *node)
 
virtual void enableTexture (osg::Node *root, bool onOff)
 
virtual void updateBoundingBoxViaContents ()
 
virtual void setRootNode (osg::Node *node)
 
virtual void setUpDepthTest (osg::StateSet *stateSet)
 

Protected Attributes

osg::ref_ptr
< DtOsgParticleSystemEffect
myEffect
 
osg::ref_ptr
< osg::MatrixTransform > 
myDiguySystemUpdater
 
DtFxParticleSystemmyDiguySystem
 
bool myIgnoreModelScaling
 
DtVector myOffset
 
int myArtPart
 
bool myStartEmit
 
bool myIsRotorWash
 
double myLifetime
 
- 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
 
- 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
 

Additional Inherited Members

- Public Types inherited from makVrv::DtOsgModelInstance
enum  AlphaToCoverageState { USE_GLOBAL, FORCE_OFF, FORCE_ON }
 
typedef std::unordered_map
< std::string, bool
SensorRegionStateMap
 
- 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
 
boost::signalslib::signal
< void(const std::string
&, bool) > 
signal_dynamicSensorRegionChanged
 
boost::signalslib::signal
< void(bool)> 
signal_atcModeEnableChanged
 
- Public Attributes inherited from makVrv::DtModelInstance
boost::signalslib::signal
< void(DtModelInstance *)> 
signal_modelInstanceChanged
 

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 DtOsgParticleSystemEffect* 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<DtOsgParticleSystemEffect> 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
double makVrv::DtFxParticleSystemModelInstance::myLifetime
protected

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

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)