OpenSceneGraph  3.0.1
Public Member Functions | Protected Member Functions
osgParticle::SegmentPlacer Class Reference

A segment-shaped particle placer. More...

Inheritance diagram for osgParticle::SegmentPlacer:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 SegmentPlacer ()
 SegmentPlacer (const SegmentPlacer &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 META_Object (osgParticle, SegmentPlacer)
const osg::Vec3getVertexA () const
 get vertex A.
void setVertexA (const osg::Vec3 &v)
 Set vertex A of the segment as a vector.
void setVertexA (float x, float y, float z)
 Set vertex A of the segment as three floats.
const osg::Vec3getVertexB () const
 get vertex B.
void setVertexB (const osg::Vec3 &v)
 Set vertex B of the segment as a vector.
void setVertexB (float x, float y, float z)
 Set vertex B of the segment as three floats.
void setSegment (const osg::Vec3 &A, const osg::Vec3 &B)
 Set both vertices.
void place (Particle *P) const
 Place a particle. This method is called by ModularEmitter, do not call it manually.
float volume () const
 return the length of the segment
osg::Vec3 getControlPosition () const
 return the control position

Protected Member Functions

virtual ~SegmentPlacer ()
SegmentPlaceroperator= (const SegmentPlacer &)

Detailed Description

A segment-shaped particle placer.

To use this placer you have to define a segment, by setting its two vertices (A and B); when an emitter requests a SegmentPlacer to place a particle, the position is chosen randomly within that segment.


Constructor & Destructor Documentation

osgParticle::SegmentPlacer::SegmentPlacer ( ) [inline]
osgParticle::SegmentPlacer::SegmentPlacer ( const SegmentPlacer copy,
const osg::CopyOp copyop = osg::CopyOp::SHALLOW_COPY 
) [inline]
virtual osgParticle::SegmentPlacer::~SegmentPlacer ( ) [inline, protected, virtual]

Member Function Documentation

osg::Vec3 osgParticle::SegmentPlacer::getControlPosition ( ) const [inline, virtual]

return the control position

Implements osgParticle::Placer.

const osg::Vec3 & osgParticle::SegmentPlacer::getVertexA ( ) const [inline]

get vertex A.

const osg::Vec3 & osgParticle::SegmentPlacer::getVertexB ( ) const [inline]

get vertex B.

osgParticle::SegmentPlacer::META_Object ( osgParticle  ,
SegmentPlacer   
)
SegmentPlacer& osgParticle::SegmentPlacer::operator= ( const SegmentPlacer ) [inline, protected]
void osgParticle::SegmentPlacer::place ( Particle P) const [inline, virtual]

Place a particle. This method is called by ModularEmitter, do not call it manually.

Implements osgParticle::Placer.

References osgParticle::Particle::setPosition().

void osgParticle::SegmentPlacer::setSegment ( const osg::Vec3 A,
const osg::Vec3 B 
) [inline]

Set both vertices.

void osgParticle::SegmentPlacer::setVertexA ( const osg::Vec3 v) [inline]

Set vertex A of the segment as a vector.

void osgParticle::SegmentPlacer::setVertexA ( float  x,
float  y,
float  z 
) [inline]

Set vertex A of the segment as three floats.

References osg::Vec3f::set().

void osgParticle::SegmentPlacer::setVertexB ( const osg::Vec3 v) [inline]

Set vertex B of the segment as a vector.

void osgParticle::SegmentPlacer::setVertexB ( float  x,
float  y,
float  z 
) [inline]

Set vertex B of the segment as three floats.

References osg::Vec3f::set().

float osgParticle::SegmentPlacer::volume ( ) const [inline, virtual]

return the length of the segment

Reimplemented from osgParticle::Placer.


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

osg logo
Generated at Mon Oct 3 2011 12:39:48 for the OpenSceneGraph by doxygen 1.7.5.