openscenegraph
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
osgParticle::OrbitOperator Class Reference
Inheritance diagram for osgParticle::OrbitOperator:
osgParticle::Operator osg::Object osg::Referenced

Public Member Functions

 OrbitOperator ()
 OrbitOperator (const OrbitOperator &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 META_Object (osgParticle, OrbitOperator)
void setCenter (const osg::Vec3 &c)
 Set the center of orbit.
const osg::Vec3getCenter () const
 Get the center of orbit.
void setMagnitude (float mag)
 Set the acceleration scale.
float getMagnitude () const
 Get the acceleration scale.
void setEpsilon (float eps)
 Set the acceleration epsilon.
float getEpsilon () const
 Get the acceleration epsilon.
void setMaxRadius (float max)
 Set max radius between the center and the particle.
float getMaxRadius () const
 Get max radius between the center and the particle.
void operate (Particle *P, double dt)
 Apply the acceleration to a particle. Do not call this method manually.
void beginOperate (Program *prg)
 Perform some initializations. Do not call this method manually.
- Public Member Functions inherited from osgParticle::Operator
 Operator ()
 Operator (const Operator &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
virtual const char * libraryName () const
virtual const char * className () const
virtual bool isSameKindAs (const osg::Object *obj) const
bool isEnabled () const
 Get whether this operator is enabled.
void setEnabled (bool v)
 Enable or disable this operator.
virtual void operateParticles (ParticleSystem *ps, double dt)
virtual void endOperate ()
 Do something after all particles have been processed.
- Public Member Functions inherited from osg::Object
 Object ()
 Object (bool threadSafeRefUnref)
 Object (const Object &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
virtual ObjectcloneType () const =0
virtual Objectclone (const CopyOp &) const =0
virtual void setThreadSafeRefUnref (bool threadSafe)
virtual void setName (const std::string &name)
void setName (const char *name)
const std::string & getName () const
void setDataVariance (DataVariance dv)
DataVariance getDataVariance () const
virtual void computeDataVariance ()
void setUserDataContainer (osg::UserDataContainer *udc)
osg::UserDataContainergetUserDataContainer ()
const osg::UserDataContainergetUserDataContainer () const
osg::UserDataContainergetOrCreateUserDataContainer ()
virtual void setUserData (Referenced *obj)
virtual ReferencedgetUserData ()
virtual const ReferencedgetUserData () const
template<typename T >
bool getUserValue (const std::string &name, T &value) const
template<typename T >
void setUserValue (const std::string &name, const T &value)
virtual void resizeGLObjectBuffers (unsigned int)
virtual void releaseGLObjects (osg::State *=0) const
- Public Member Functions inherited from osg::Referenced
 Referenced ()
 Referenced (bool threadSafeRefUnref)
 Referenced (const Referenced &)
Referencedoperator= (const Referenced &)
bool getThreadSafeRefUnref () const
OpenThreads::MutexgetRefMutex () const
int ref () const
int unref () const
int unref_nodelete () const
int referenceCount () const
ObserverSetgetObserverSet () const
ObserverSetgetOrCreateObserverSet () const
void addObserver (Observer *observer) const
void removeObserver (Observer *observer) const

Protected Member Functions

virtual ~OrbitOperator ()
OrbitOperatoroperator= (const OrbitOperator &)
- Protected Member Functions inherited from osgParticle::Operator
virtual ~Operator ()
Operatoroperator= (const Operator &)
- Protected Member Functions inherited from osg::Object
virtual ~Object ()
- Protected Member Functions inherited from osg::Referenced
virtual ~Referenced ()
void signalObserversAndDelete (bool signalDelete, bool doDelete) const
void deleteUsingDeleteHandler () const

Protected Attributes

osg::Vec3 _center
osg::Vec3 _xf_center
float _magnitude
float _epsilon
float _maxRadius

Additional Inherited Members

- Public Types inherited from osg::Object
enum  DataVariance { DYNAMIC, STATIC, UNSPECIFIED }
- Static Public Member Functions inherited from osg::Referenced
static OpenThreads::MutexgetGlobalReferencedMutex ()
static void setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting)
static bool getThreadSafeReferenceCounting ()
static void setDeleteHandler (DeleteHandler *handler)
static DeleteHandlergetDeleteHandler ()

Detailed Description

An orbit operator forces particles in the orbit around a point. Refer to David McAllister's Particle System API (http://www.particlesystems.org)

Constructor & Destructor Documentation

osgParticle::OrbitOperator::OrbitOperator ( )
inline
osgParticle::OrbitOperator::OrbitOperator ( const OrbitOperator copy,
const osg::CopyOp copyop = osg::CopyOp::SHALLOW_COPY 
)
inline
virtual osgParticle::OrbitOperator::~OrbitOperator ( )
inlineprotectedvirtual

Member Function Documentation

void osgParticle::OrbitOperator::beginOperate ( Program prg)
inlinevirtual
const osg::Vec3& osgParticle::OrbitOperator::getCenter ( ) const
inline

Get the center of orbit.

References _center.

float osgParticle::OrbitOperator::getEpsilon ( ) const
inline

Get the acceleration epsilon.

References _epsilon.

float osgParticle::OrbitOperator::getMagnitude ( ) const
inline

Get the acceleration scale.

References _magnitude.

float osgParticle::OrbitOperator::getMaxRadius ( ) const
inline

Get max radius between the center and the particle.

References _maxRadius.

osgParticle::OrbitOperator::META_Object ( osgParticle  ,
OrbitOperator   
)
void osgParticle::OrbitOperator::operate ( Particle P,
double  dt 
)
inlinevirtual

Apply the acceleration to a particle. Do not call this method manually.

Implements osgParticle::Operator.

References _epsilon, _magnitude, _maxRadius, _xf_center, osgParticle::Particle::addVelocity(), osgParticle::Particle::getPosition(), and osg::Vec3f::length().

OrbitOperator& osgParticle::OrbitOperator::operator= ( const OrbitOperator )
inlineprotected
void osgParticle::OrbitOperator::setCenter ( const osg::Vec3 c)
inline

Set the center of orbit.

References _center.

void osgParticle::OrbitOperator::setEpsilon ( float  eps)
inline

Set the acceleration epsilon.

References _epsilon.

void osgParticle::OrbitOperator::setMagnitude ( float  mag)
inline

Set the acceleration scale.

References _magnitude.

void osgParticle::OrbitOperator::setMaxRadius ( float  max)
inline

Set max radius between the center and the particle.

References _maxRadius.

Member Data Documentation

osg::Vec3 osgParticle::OrbitOperator::_center
protected

Referenced by beginOperate(), getCenter(), and setCenter().

float osgParticle::OrbitOperator::_epsilon
protected

Referenced by getEpsilon(), operate(), and setEpsilon().

float osgParticle::OrbitOperator::_magnitude
protected

Referenced by getMagnitude(), operate(), and setMagnitude().

float osgParticle::OrbitOperator::_maxRadius
protected

Referenced by getMaxRadius(), operate(), and setMaxRadius().

osg::Vec3 osgParticle::OrbitOperator::_xf_center
protected

Referenced by beginOperate(), and operate().


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