OpenSceneGraph
3.0.1
|
A domain operator which accepts different domain shapes as the parameter. More...
Classes | |
struct | Domain |
Public Member Functions | |
DomainOperator () | |
DomainOperator (const DomainOperator ©, const osg::CopyOp ©op=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 | beginOperate (Program *prg) |
Perform some initializations. Do not call this method manually. | |
void | endOperate () |
Perform some post-operations. Do not call this method manually. | |
Protected Member Functions | |
virtual | ~DomainOperator () |
DomainOperator & | operator= (const DomainOperator &) |
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) |
void | computeNewBasis (const osg::Vec3 &, const osg::Vec3 &, osg::Vec3 &, osg::Vec3 &) |
void | ignore (const std::string &func) |
Protected Attributes | |
std::vector< Domain > | _domains |
std::vector< Domain > | _backupDomains |
A domain operator which accepts different domain shapes as the parameter.
It can be derived to implement operators that require particles interacting with domains. Refer to David McAllister's Particle System API (http://www.particlesystems.org)
osgParticle::DomainOperator::DomainOperator | ( | ) | [inline] |
osgParticle::DomainOperator::DomainOperator | ( | const DomainOperator & | copy, |
const osg::CopyOp & | copyop = osg::CopyOp::SHALLOW_COPY |
||
) | [inline] |
virtual osgParticle::DomainOperator::~DomainOperator | ( | ) | [inline, protected, virtual] |
void osgParticle::DomainOperator::addBoxDomain | ( | const osg::Vec3 & | min, |
const osg::Vec3 & | max | ||
) | [inline] |
Add a box domain.
References osgParticle::DomainOperator::Domain::BOX_DOMAIN, and _domains.
void osgParticle::DomainOperator::addDiskDomain | ( | const osg::Vec3 & | c, |
const osg::Vec3 & | n, | ||
float | r1, | ||
float | r2 = 0.0f |
||
) | [inline] |
Add a disk domain.
References osgParticle::DomainOperator::Domain::DISK_DOMAIN, and _domains.
void osgParticle::DomainOperator::addDomain | ( | const Domain & | domain | ) | [inline] |
Add a domain object directly, used by the .osg wrappers and serializers.
void osgParticle::DomainOperator::addLineSegmentDomain | ( | const osg::Vec3 & | v1, |
const osg::Vec3 & | v2 | ||
) | [inline] |
Add a line segment domain.
References osgParticle::DomainOperator::Domain::LINE_DOMAIN, and _domains.
void osgParticle::DomainOperator::addPlaneDomain | ( | const osg::Plane & | plane | ) | [inline] |
Add a plane domain.
References osgParticle::DomainOperator::Domain::PLANE_DOMAIN, and _domains.
void osgParticle::DomainOperator::addPointDomain | ( | const osg::Vec3 & | p | ) | [inline] |
Add a point domain.
References osgParticle::DomainOperator::Domain::POINT_DOMAIN, and _domains.
void osgParticle::DomainOperator::addRectangleDomain | ( | const osg::Vec3 & | corner, |
const osg::Vec3 & | w, | ||
const osg::Vec3 & | h | ||
) | [inline] |
Add a rectangle domain.
References osgParticle::DomainOperator::Domain::RECT_DOMAIN, computeNewBasis(), and _domains.
void osgParticle::DomainOperator::addSphereDomain | ( | const osg::Vec3 & | c, |
float | r | ||
) | [inline] |
Add a sphere domain.
References osgParticle::DomainOperator::Domain::SPHERE_DOMAIN, and _domains.
void osgParticle::DomainOperator::addTriangleDomain | ( | const osg::Vec3 & | v1, |
const osg::Vec3 & | v2, | ||
const osg::Vec3 & | v3 | ||
) | [inline] |
Add a triangle domain.
References osgParticle::DomainOperator::Domain::TRI_DOMAIN, computeNewBasis(), and _domains.
void osgParticle::DomainOperator::beginOperate | ( | Program * | prg | ) | [virtual] |
Perform some initializations. Do not call this method manually.
Reimplemented from osgParticle::Operator.
Reimplemented in osgParticle::SinkOperator.
void osgParticle::DomainOperator::computeNewBasis | ( | const osg::Vec3 & | u, |
const osg::Vec3 & | v, | ||
osg::Vec3 & | s1, | ||
osg::Vec3 & | s2 | ||
) | [inline, protected] |
References osg::Vec3f::z(), osg::Vec3f::x(), osg::Vec3f::y(), and osg::Vec3f::set().
Referenced by addTriangleDomain(), and addRectangleDomain().
void osgParticle::DomainOperator::endOperate | ( | ) | [virtual] |
Perform some post-operations. Do not call this method manually.
Reimplemented from osgParticle::Operator.
const Domain& osgParticle::DomainOperator::getDomain | ( | unsigned int | i | ) | const [inline] |
Get a domain object directly, used by the .osg wrappers and serializers.
unsigned int osgParticle::DomainOperator::getNumDomains | ( | ) | const [inline] |
Get number of domains.
virtual void osgParticle::DomainOperator::handleBox | ( | const Domain & | domain, |
Particle * | P, | ||
double | dt | ||
) | [inline, protected, virtual] |
Reimplemented in osgParticle::SinkOperator.
virtual void osgParticle::DomainOperator::handleDisk | ( | const Domain & | domain, |
Particle * | P, | ||
double | dt | ||
) | [inline, protected, virtual] |
Reimplemented in osgParticle::SinkOperator, and osgParticle::BounceOperator.
virtual void osgParticle::DomainOperator::handleLineSegment | ( | const Domain & | domain, |
Particle * | P, | ||
double | dt | ||
) | [inline, protected, virtual] |
Reimplemented in osgParticle::SinkOperator.
virtual void osgParticle::DomainOperator::handlePlane | ( | const Domain & | domain, |
Particle * | P, | ||
double | dt | ||
) | [inline, protected, virtual] |
Reimplemented in osgParticle::SinkOperator, and osgParticle::BounceOperator.
virtual void osgParticle::DomainOperator::handlePoint | ( | const Domain & | domain, |
Particle * | P, | ||
double | dt | ||
) | [inline, protected, virtual] |
Reimplemented in osgParticle::SinkOperator.
virtual void osgParticle::DomainOperator::handleRectangle | ( | const Domain & | domain, |
Particle * | P, | ||
double | dt | ||
) | [inline, protected, virtual] |
Reimplemented in osgParticle::SinkOperator, and osgParticle::BounceOperator.
virtual void osgParticle::DomainOperator::handleSphere | ( | const Domain & | domain, |
Particle * | P, | ||
double | dt | ||
) | [inline, protected, virtual] |
Reimplemented in osgParticle::SinkOperator, and osgParticle::BounceOperator.
virtual void osgParticle::DomainOperator::handleTriangle | ( | const Domain & | domain, |
Particle * | P, | ||
double | dt | ||
) | [inline, protected, virtual] |
Reimplemented in osgParticle::SinkOperator, and osgParticle::BounceOperator.
void osgParticle::DomainOperator::ignore | ( | const std::string & | func | ) | [inline, protected] |
References OSG_NOTICE, and osgParticle::Operator::className().
osgParticle::DomainOperator::META_Object | ( | osgParticle | , |
DomainOperator | |||
) |
void osgParticle::DomainOperator::operate | ( | Particle * | P, |
double | dt | ||
) | [virtual] |
Apply the acceleration to a particle. Do not call this method manually.
Implements osgParticle::Operator.
DomainOperator& osgParticle::DomainOperator::operator= | ( | const DomainOperator & | ) | [inline, protected] |
void osgParticle::DomainOperator::removeAllDomains | ( | ) | [inline] |
Remove all existing domains.
void osgParticle::DomainOperator::removeDomain | ( | unsigned int | i | ) | [inline] |
Remove a domain at specific index.
std::vector<Domain> osgParticle::DomainOperator::_backupDomains [protected] |
std::vector<Domain> osgParticle::DomainOperator::_domains [protected] |
![]() | Generated at Mon Oct 3 2011 12:39:48 for the OpenSceneGraph by doxygen 1.7.5. |