osgParticle::SinkOperator Class Reference

`#include <SinkOperator>`

Inheritance diagram for osgParticle::SinkOperator:

## Public Types

enum | SinkTarget { SINK_POSITION , SINK_VELOCITY , SINK_ANGULAR_VELOCITY }
enum | SinkStrategy { SINK_INSIDE , SINK_OUTSIDE }
Public Types inherited from osg::Object
enum | DataVariance { DYNAMIC , STATIC , UNSPECIFIED }

## Public Member Functions

| SinkOperator ()
| SinkOperator (const SinkOperator &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
| META_Object (osgParticle, SinkOperator)
void | setSinkTarget (SinkTarget so)
| Set the sink strategy.
SinkTarget | getSinkTarget () const
| Get the sink strategy.
void | setSinkStrategy (SinkStrategy ss)
| Set the sink strategy.
SinkStrategy | getSinkStrategy () const
| Get the sink strategy.
void | beginOperate (Program *prg)
| Perform some initializations. Do not call this method manually.
Public Member Functions inherited from osgParticle::DomainOperator
| DomainOperator ()
| DomainOperator (const DomainOperator &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
| META_Object (osgParticle, DomainOperator)
void | addPointDomain (const osg::Vec3 &p)
| Add a point domain.
void | addLineSegmentDomain (const osg::Vec3 &v1, const osg::Vec3 &v2)
| Add a line segment domain.
void | addTriangleDomain (const osg::Vec3 &v1, const osg::Vec3 &v2, const osg::Vec3 &v3)
| Add a triangle domain.
void | addRectangleDomain (const osg::Vec3 &corner, const osg::Vec3 &w, const osg::Vec3 &h)
| Add a rectangle domain.
void | addPlaneDomain (const osg::Plane &plane)
| Add a plane domain.
void | addSphereDomain (const osg::Vec3 &c, float r)
| Add a sphere domain.
void | addBoxDomain (const osg::Vec3 &min, const osg::Vec3 &max)
| Add a box domain.
void | addDiskDomain (const osg::Vec3 &c, const osg::Vec3 &n, float r1, float r2=0.0f)
| Add a disk domain.
void | addDomain (const Domain &domain)
| Add a domain object directly, used by the .osg wrappers and serializers.
const Domain & | getDomain (unsigned int i) const
| Get a domain object directly, used by the .osg wrappers and serializers.
void | removeDomain (unsigned int i)
| Remove a domain at specific index.
void | removeAllDomains ()
| Remove all existing domains.
unsigned int | getNumDomains () const
| Get number of domains.
void | operate (Particle *P, double dt)
| Apply the acceleration to a particle. Do not call this method manually.
void | endOperate ()
| Perform some post-operations. 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)
Public Member Functions inherited from osg::Object
| Object ()
| Object (bool threadSafeRefUnref)
| Object (const Object &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
virtual Object * | cloneType () const =0
virtual Object * | clone (const CopyOp &) const =0
std::string | getCompoundClassName () const
virtual Node * | asNode ()
virtual const Node * | asNode () const
virtual NodeVisitor * | asNodeVisitor ()
virtual const NodeVisitor * | asNodeVisitor () const
virtual StateSet * | asStateSet ()
virtual const StateSet * | asStateSet () const
virtual StateAttribute * | asStateAttribute ()
virtual const StateAttribute * | asStateAttribute () const
virtual Uniform * | asUniform ()
virtual const Uniform * | asUniform () const
virtual Camera * | asCamera ()
virtual const Camera * | asCamera () const
virtual Drawable * | asDrawable ()
virtual const Drawable * | asDrawable () const
virtual Callback * | asCallback ()
virtual const Callback * | asCallback () const
virtual CallbackObject * | asCallbackObject ()
virtual const CallbackObject * | asCallbackObject () const
virtual UserDataContainer * | asUserDataContainer ()
virtual const UserDataContainer * | asUserDataContainer () const
virtual ValueObject * | asValueObject ()
virtual const ValueObject * | asValueObject () const
virtual Image * | asImage ()
virtual const Image * | asImage () const
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)
template<class T>
void | setUserDataContainer (const ref_ptr< T > &udc)
osg::UserDataContainer * | getUserDataContainer ()
const osg::UserDataContainer * | getUserDataContainer () const
osg::UserDataContainer * | getOrCreateUserDataContainer ()
virtual void | setUserData (Referenced *obj)
template<class T>
void | setUserData (const ref_ptr< T > &ud)
virtual Referenced * | getUserData ()
virtual const Referenced * | getUserData () 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
template<typename T>
BoolValueObject UCharValueObject UShortValueObject UIntValueObject DoubleValueObject Vec3fValueObject Vec2dValueObject Vec4dValueObject PlaneValueObject MatrixdValueObject BoundingBoxdValueObject BoundingSpheredValueObject bool | getUserValue (const std::string &name, T &value) const
Public Member Functions inherited from osg::Referenced
| Referenced ()
| Referenced (bool threadSafeRefUnref)
| Referenced (const Referenced &)
Referenced & | operator= (const Referenced &)
bool | getThreadSafeRefUnref () const
OpenThreads::Mutex * | getRefMutex () const
int | ref () const
int | unref () const
int | unref_nodelete () const
int | referenceCount () const
ObserverSet * | getObserverSet () const
ObserverSet * | getOrCreateObserverSet () const
void | addObserver (Observer *observer) const
void | removeObserver (Observer *observer) const

## Protected Member Functions

virtual | ~SinkOperator ()
SinkOperator & | operator= (const SinkOperator &)
virtual void | handlePoint (const Domain &domain, Particle *P, double dt)
virtual void | handleLineSegment (const Domain &domain, Particle *P, double dt)
virtual void | handleTriangle (const Domain &domain, Particle *P, double dt)
virtual void | handleRectangle (const Domain &domain, Particle *P, double dt)
virtual void | handlePlane (const Domain &domain, Particle *P, double dt)
virtual void | handleSphere (const Domain &domain, Particle *P, double dt)
virtual void | handleBox (const Domain &domain, Particle *P, double dt)
virtual void | handleDisk (const Domain &domain, Particle *P, double dt)
const osg::Vec3 & | getValue (Particle *P)
void | kill (Particle *P, bool insideDomain)
Protected Member Functions inherited from osgParticle::DomainOperator
virtual | ~DomainOperator ()
DomainOperator & | operator= (const DomainOperator &)
void | computeNewBasis (const osg::Vec3 &, const osg::Vec3 &, osg::Vec3 &, osg::Vec3 &)
void | ignore (const std::string &func)
Protected Member Functions inherited from osgParticle::Operator
virtual | ~Operator ()
Operator & | operator= (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

SinkTarget | _sinkTarget
SinkStrategy | _sinkStrategy
Protected Attributes inherited from osgParticle::DomainOperator
std::vector< Domain > | _domains
std::vector< Domain > | _backupDomains
Protected Attributes inherited from osg::Object
std::string | _name
DataVariance | _dataVariance
osg::UserDataContainer * | _userDataContainer
Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr | _observerSet
OpenThreads::Atomic | _refCount

## Additional Inherited Members

Static Public Member Functions inherited from osg::Referenced
static OpenThreads::Mutex * | getGlobalReferencedMutex ()
static void | setDeleteHandler (DeleteHandler *handler)
static DeleteHandler * | getDeleteHandler ()

## Detailed Description

A sink operator kills particles if positions or velocities inside/outside the specified domain. Refer to David McAllister's Particle System API (http://www.particlesystems.org)

## Member Enumeration Documentation

## SinkStrategy

enum osgParticle::SinkOperator::SinkStrategy

Enumerator
SINK_INSIDE |
SINK_OUTSIDE |

## SinkTarget

enum osgParticle::SinkOperator::SinkTarget

Enumerator
SINK_POSITION |
SINK_VELOCITY |
SINK_ANGULAR_VELOCITY |

## Constructor & Destructor Documentation

## SinkOperator() [1/2]

osgParticle::SinkOperator::SinkOperator | ( |  | ) |

inline

References _sinkStrategy, _sinkTarget, osgParticle::DomainOperator::DomainOperator(), SINK_INSIDE, and SINK_POSITION.

Referenced by META_Object(), operator=(), and SinkOperator().

## SinkOperator() [2/2]

osgParticle::SinkOperator::SinkOperator | ( | const SinkOperator & | copy,
|  | const osg::CopyOp & | copyop = osg::CopyOp::SHALLOW_COPY )

inline

References _sinkStrategy, _sinkTarget, osgParticle::DomainOperator::DomainOperator(), osg::CopyOp::SHALLOW_COPY, and SinkOperator().

## ~SinkOperator()

virtual osgParticle::SinkOperator::~SinkOperator | ( |  | ) |

inline protected virtual

## Member Function Documentation

## beginOperate()

void osgParticle::SinkOperator::beginOperate | ( | Program * | prg | ) |

virtual

Perform some initializations. Do not call this method manually.

Reimplemented from osgParticle::DomainOperator.

## getSinkStrategy()

SinkStrategy osgParticle::SinkOperator::getSinkStrategy | ( |  | ) | const

inline

Get the sink strategy.

References _sinkStrategy.

## getSinkTarget()

SinkTarget osgParticle::SinkOperator::getSinkTarget | ( |  | ) | const

inline

Get the sink strategy.

References _sinkTarget.

## getValue()

const osg::Vec3 & osgParticle::SinkOperator::getValue | ( | Particle * | P | ) |

inline protected

References _sinkTarget, osgParticle::Particle::getAngularVelocity(), osgParticle::Particle::getPosition(), osgParticle::Particle::getVelocity(), SINK_ANGULAR_VELOCITY, SINK_POSITION, and SINK_VELOCITY.

Referenced by handleDisk().

## handleBox()

virtual void osgParticle::SinkOperator::handleBox | ( | const Domain & | domain,
|  | Particle * | P,
|  | double | dt )

protected virtual

Reimplemented from osgParticle::DomainOperator.

## handleDisk()

virtual void osgParticle::SinkOperator::handleDisk | ( | const Domain & | domain,
|  | Particle * | P,
|  | double | dt )

protected virtual

Reimplemented from osgParticle::DomainOperator.

References getValue(), and kill().

## handleLineSegment()

virtual void osgParticle::SinkOperator::handleLineSegment | ( | const Domain & | domain,
|  | Particle * | P,
|  | double | dt )

protected virtual

Reimplemented from osgParticle::DomainOperator.

## handlePlane()

virtual void osgParticle::SinkOperator::handlePlane | ( | const Domain & | domain,
|  | Particle * | P,
|  | double | dt )

protected virtual

Reimplemented from osgParticle::DomainOperator.

## handlePoint()

virtual void osgParticle::SinkOperator::handlePoint | ( | const Domain & | domain,
|  | Particle * | P,
|  | double | dt )

protected virtual

Reimplemented from osgParticle::DomainOperator.

## handleRectangle()

virtual void osgParticle::SinkOperator::handleRectangle | ( | const Domain & | domain,
|  | Particle * | P,
|  | double | dt )

protected virtual

Reimplemented from osgParticle::DomainOperator.

## handleSphere()

virtual void osgParticle::SinkOperator::handleSphere | ( | const Domain & | domain,
|  | Particle * | P,
|  | double | dt )

protected virtual

Reimplemented from osgParticle::DomainOperator.

## handleTriangle()

virtual void osgParticle::SinkOperator::handleTriangle | ( | const Domain & | domain,
|  | Particle * | P,
|  | double | dt )

protected virtual

Reimplemented from osgParticle::DomainOperator.

## kill()

void osgParticle::SinkOperator::kill | ( | Particle * | P,
|  | bool | insideDomain )

inline protected

References _sinkStrategy, osgParticle::Particle::kill(), and SINK_INSIDE.

Referenced by handleDisk().

## META_Object()

osgParticle::SinkOperator::META_Object | ( | osgParticle | ,
|  | SinkOperator | )

References SinkOperator().

## operator=()

SinkOperator & osgParticle::SinkOperator::operator= | ( | const SinkOperator & |  | ) |

inline protected

References SinkOperator().

## setSinkStrategy()

void osgParticle::SinkOperator::setSinkStrategy | ( | SinkStrategy | ss | ) |

inline

Set the sink strategy.

References _sinkStrategy.

## setSinkTarget()

void osgParticle::SinkOperator::setSinkTarget | ( | SinkTarget | so | ) |

inline

Set the sink strategy.

References _sinkTarget.

## Member Data Documentation

## _sinkStrategy

SinkStrategy osgParticle::SinkOperator::_sinkStrategy

protected

Referenced by getSinkStrategy(), kill(), setSinkStrategy(), SinkOperator(), and SinkOperator().

## _sinkTarget

SinkTarget osgParticle::SinkOperator::_sinkTarget

protected

Referenced by getSinkTarget(), getValue(), setSinkTarget(), SinkOperator(), and SinkOperator().

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

- SinkOperator