This is an OSG Drawable object that directly renders point-sprites. More...
Public Member Functions | |
| META_Object (Palomino, MediumParticleDrawable) MediumParticleDrawable(const RGBA color | |
| const fp const fp const fp | mColor (color) |
| const fp const fp const fp | mRange (range) |
| const fp const fp const fp | mRangeInv (1.0f/range) |
| const fp const fp const fp | mMinWidth (minWidth) |
| const fp const fp const fp | mMaxWidth (maxWidth) |
| const fp const fp const fp | mVertexArray () |
| const fp const fp const fp | mBoundingBox () |
| MediumParticleDrawable (void) | |
| MediumParticleDrawable (const MediumParticleDrawable &other, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
| virtual | ~MediumParticleDrawable () |
| virtual void | drawImplementation (osg::RenderInfo &renderInfo) const |
| osg::BoundingBox | computeBound () const |
| void | AttachParticle (const osg::Vec3 &v) |
| uint | GetVertexCount (void) const |
| void | SetColorAll (const RGBA color) |
Public Attributes | |
| const fp | range |
| const fp const fp | minWidth |
| const fp const fp const fp | maxWidth: osg::Drawable() |
Private Member Functions | |
| void | Init (void) |
| DECLARE_TYPESIG (TYPESIG_MEDIUM_PARTICLE_DRAWABLE) | |
Private Attributes | |
| RGBA | mColor |
| color of all point sprites | |
| const fp | mRange |
| width of point-sprite is minimized at limit of range | |
| const fp | mRangeInv |
| const fp | mMinWidth |
| minimum size of point-sprites | |
| const fp | mMaxWidth |
| maximum size of point-sprites | |
| std::vector< osg::Vec3 > | mVertexArray |
| not osg::Vec3Array which lacks swap() | |
| osg::BoundingBox | mBoundingBox |
| no need for ref_ptr (isn't derived from osg::Referenced) | |
This is an OSG Drawable object that directly renders point-sprites.
The reason for directly-rendering is to that the size of every point-sprite needs to be computed individually. Issuing glPointSize() for every particle is faster and less-cumbersome than composing nodes with various point sizes.
When OSG has called drawImplementation(), OSG has set OpenGL state for rendering OpenGL "point sprites".
| fx::MediumParticleDrawable::MediumParticleDrawable | ( | void | ) | [inline] |
| fx::MediumParticleDrawable::MediumParticleDrawable | ( | const MediumParticleDrawable & | other, | |
| const osg::CopyOp & | copyop = osg::CopyOp::SHALLOW_COPY | |||
| ) | [inline] |
| virtual fx::MediumParticleDrawable::~MediumParticleDrawable | ( | ) | [inline, virtual] |
| void fx::MediumParticleDrawable::AttachParticle | ( | const osg::Vec3 & | v | ) | [inline] |
Add particle.
| osg::BoundingBox fx::MediumParticleDrawable::computeBound | ( | ) | const [inline] |
Compute bound of medium particles. Which is the fastest? Bounding all point-sprites in one box or dividing them into multiple boxes (?).
| fx::MediumParticleDrawable::DECLARE_TYPESIG | ( | TYPESIG_MEDIUM_PARTICLE_DRAWABLE | ) | [private] |
| virtual void fx::MediumParticleDrawable::drawImplementation | ( | osg::RenderInfo & | renderInfo | ) | const [inline, virtual] |
Draw array of medium particles.
| uint fx::MediumParticleDrawable::GetVertexCount | ( | void | ) | const [inline] |
| void fx::MediumParticleDrawable::Init | ( | void | ) | [inline, private] |
ctor subroutine.
| const fp const fp const fp fx::MediumParticleDrawable::mBoundingBox | ( | ) | [inline] |
| const fp const fp const fp fx::MediumParticleDrawable::mColor | ( | color | ) |
| fx::MediumParticleDrawable::META_Object | ( | Palomino | , | |
| MediumParticleDrawable | ||||
| ) | const |
ctor/dtor.
| color | Applied to all particles. | |
| range | Distance in world space where particle is scaled-down to mediumest size. | |
| minWidth,maxWidth | Limits of point size scaled by distance of their vertex from viewpoint. This simulates 3D:2D projection. |
| const fp const fp const fp fx::MediumParticleDrawable::mMaxWidth | ( | maxWidth | ) |
| const fp const fp const fp fx::MediumParticleDrawable::mMinWidth | ( | minWidth | ) |
| const fp const fp const fp fx::MediumParticleDrawable::mRange | ( | range | ) |
| const fp const fp const fp fx::MediumParticleDrawable::mRangeInv | ( | 1.0f/ | range | ) |
| const fp const fp const fp fx::MediumParticleDrawable::mVertexArray | ( | ) |
| void fx::MediumParticleDrawable::SetColorAll | ( | const RGBA | color | ) | [inline] |
Set color of all particles.
| const fp const fp const fp fx::MediumParticleDrawable::maxWidth |
osg::BoundingBox fx::MediumParticleDrawable::mBoundingBox [private] |
no need for ref_ptr (isn't derived from osg::Referenced)
RGBA fx::MediumParticleDrawable::mColor [private] |
color of all point sprites
| const fp const fp fx::MediumParticleDrawable::minWidth |
const fp fx::MediumParticleDrawable::mMaxWidth [private] |
maximum size of point-sprites
const fp fx::MediumParticleDrawable::mMinWidth [private] |
minimum size of point-sprites
const fp fx::MediumParticleDrawable::mRange [private] |
width of point-sprite is minimized at limit of range
const fp fx::MediumParticleDrawable::mRangeInv [private] |
std::vector<osg::Vec3> fx::MediumParticleDrawable::mVertexArray [private] |
not osg::Vec3Array which lacks swap()
Palomino Flight Simulator documents generated by doxygen 1.7.1 on Tue May 15 2012 22:40:11