![]() |
VR-Forces 5.0.2 Developer's Guide
|
A particle operator to simply translate the particles each frame.
This class operates on each particle in a particle system by translating each particle in a given direction each frame. The translation amount, adjusted for delta-time since last frame, is added to the positions of each particle. The particles' given velocity is not effected. This operator can be used to simulate a simple wind effect on particle clouds such as smoke. No real physics is applied to the particles.
This particle operator is modeled after the osgParticle::AccelOperator found in the Open Scene Graph library.

Public Member Functions | |
| DtTranslateOperator (const osg::Vec3 &vec=osg::Vec3(0.0f, 0.0f, 0.0f)) | |
| DtTranslateOperator (const DtTranslateOperator ©, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
| META_Object (makVrv, DtTranslateOperator) | |
| osg::Vec3 & | vector () |
| const osg::Vec3 & | vector () const |
| void | setVector (const osg::Vec3 &vec) |
| void | operate (osgParticle::Particle *ptcl, double dt) |
| void | beginOperate (osgParticle::Program *prg) |
Protected Member Functions | |
| virtual | ~DtTranslateOperator () |
Private Member Functions | |
| DtTranslateOperator & | operator= (const DtTranslateOperator &) |
Private Attributes | |
| osg::Vec3 | myVector |
| osg::Vec3 | myXfVector |
| makVrv::DtTranslateOperator::DtTranslateOperator | ( | const osg::Vec3 & | vec = osg::Vec3(0.0f, 0.0f, 0.0f) | ) |
Default constructor.
| [in] | vec | is the direction and magnitude for translation, in db-units per second. |
| makVrv::DtTranslateOperator::DtTranslateOperator | ( | const DtTranslateOperator & | copy, |
| const osg::CopyOp & | copyop = osg::CopyOp::SHALLOW_COPY |
||
| ) |
Copy constructor.
| [in] | copy | is the object to copy from. |
| [in] | copyop | is a flag describing the type of copy. |
|
protectedvirtual |
Virtual destructor.
| makVrv::DtTranslateOperator::META_Object | ( | makVrv | , |
| DtTranslateOperator | |||
| ) |
|
inline |
Get the current translation direction and magnitude.
|
inline |
|
inline |
Set the current translation direction and magnitude.
| [in] | vec | is the direction and magnitude for translation, in db-units per second. |
|
inline |
Apply the translation to a particle.
| [in] | ptcl | is the particle being operated on. |
| [in] | dt | is the delta time since last operation. |
|
inline |
Perform some initializations.
| [in] | prg | is the program which is calling this operator. |
|
private |
Private copy operator to prevent assignment.
|
private |
|
private |