List of all members.
Public Types |
enum | Mode { POINT_ROT_EYE,
POINT_ROT_WORLD,
AXIAL_ROT
} |
typedef std::vector< Vec3 > | PositionList |
Public Member Functions |
| Billboard () |
| Billboard (const Billboard &, const CopyOp ©op=CopyOp::SHALLOW_COPY) |
| META_Node (osg, Billboard) |
void | setMode (Mode mode) |
Mode | getMode () const |
void | setAxis (const Vec3 &axis) |
const Vec3 & | getAxis () const |
void | setNormal (const Vec3 &normal) |
const Vec3 & | getNormal () const |
void | setPosition (unsigned int i, const Vec3 &pos) |
const Vec3 & | getPosition (unsigned int i) const |
void | setPositionList (PositionList &pl) |
PositionList & | getPositionList () |
const PositionList & | getPositionList () const |
virtual bool | addDrawable (Drawable *gset) |
virtual bool | addDrawable (Drawable *gset, const Vec3 &pos) |
virtual bool | removeDrawable (Drawable *gset) |
bool | computeMatrix (Matrix &modelview, const Vec3 &eye_local, const Vec3 &pos_local) const |
virtual BoundingSphere | computeBound () const |
Protected Types |
enum | AxisAligned {
AXIAL_ROT_X_AXIS = AXIAL_ROT+1,
AXIAL_ROT_Y_AXIS,
AXIAL_ROT_Z_AXIS,
POINT_ROT_WORLD_Z_AXIS,
CACHE_DIRTY
} |
Protected Member Functions |
virtual | ~Billboard () |
void | updateCache () |
Protected Attributes |
Mode | _mode |
Vec3 | _axis |
Vec3 | _normal |
Matrix | _rotateNormalToZAxis |
PositionList | _positionList |
int | _cachedMode |
Vec3 | _side |
Detailed Description
Billboard is a derived form of Geode that orients its osg::Drawable children to face the eye point. Typical uses include trees and particle explosions,
Member Typedef Documentation
Type definition for pivot point position list.
Member Enumeration Documentation
- Enumerator:
AXIAL_ROT_X_AXIS |
|
AXIAL_ROT_Y_AXIS |
|
AXIAL_ROT_Z_AXIS |
|
POINT_ROT_WORLD_Z_AXIS |
|
CACHE_DIRTY |
|
- Enumerator:
POINT_ROT_EYE |
|
POINT_ROT_WORLD |
|
AXIAL_ROT |
|
Constructor & Destructor Documentation
osg::Billboard::Billboard |
( |
|
) |
|
osg::Billboard::Billboard |
( |
const Billboard & |
, |
|
|
const CopyOp & |
copyop = CopyOp::SHALLOW_COPY | |
|
) |
| | |
Copy constructor using CopyOp to manage deep vs shallow copy.
virtual osg::Billboard::~Billboard |
( |
|
) |
[protected, virtual] |
Member Function Documentation
virtual bool osg::Billboard::addDrawable |
( |
Drawable * |
gset |
) |
[virtual] |
Add a Drawable with a default position of Vec3(0,0,0). Call the base-class Geode::addDrawble() to add the given Drawable gset as a child. If Geode::addDrawable() returns true, add the default position to the pivot point position list and return true. Otherwise, return false.
Reimplemented from osg::Geode.
virtual bool osg::Billboard::addDrawable |
( |
Drawable * |
gset, |
|
|
const Vec3 & |
pos | |
|
) |
| | [virtual] |
Add a Drawable with a specified position. Call the base-class Geode::addDrawble() to add the given Drawable gset as a child. If Geode::addDrawable() returns true, add the given position pos to the pivot point position list and return true. Otherwise, return false.
virtual BoundingSphere osg::Billboard::computeBound |
( |
|
) |
const [virtual] |
Compute the bounding sphere around Node's geometry or children. This method is automatically called by getBound() when the bounding sphere has been marked dirty via dirtyBound().
Reimplemented from osg::Geode.
bool osg::Billboard::computeMatrix |
( |
Matrix & |
modelview, |
|
|
const Vec3 & |
eye_local, |
|
|
const Vec3 & |
pos_local | |
|
) |
| | const |
const Vec3& osg::Billboard::getAxis |
( |
|
) |
const [inline] |
Mode osg::Billboard::getMode |
( |
|
) |
const [inline] |
Get the billboard rotation mode.
const Vec3& osg::Billboard::getNormal |
( |
|
) |
const [inline] |
Get the front face direction normal.
const Vec3& osg::Billboard::getPosition |
( |
unsigned int |
i |
) |
const [inline] |
Get the specified child Drawable's position.
Get the list of pivot point positions.
const PositionList& osg::Billboard::getPositionList |
( |
|
) |
const [inline] |
Get a const list of pivot point positions.
osg::Billboard::META_Node |
( |
osg |
, |
|
|
Billboard |
| |
|
) |
| | |
virtual bool osg::Billboard::removeDrawable |
( |
Drawable * |
gset |
) |
[virtual] |
Remove a Drawable and its associated position. If gset is a child, remove it, decrement its reference count, remove its pivot point position. and return true. Otherwise, return false.
Reimplemented from osg::Geode.
void osg::Billboard::setAxis |
( |
const Vec3 & |
axis |
) |
|
Set the rotation axis for the billboard's child Drawables. Only utilized when mode==AXIAL_ROT.
void osg::Billboard::setMode |
( |
Mode |
mode |
) |
|
Set the billboard rotation mode.
void osg::Billboard::setNormal |
( |
const Vec3 & |
normal |
) |
|
This normal defines child Drawables' front face direction when unrotated.
void osg::Billboard::setPosition |
( |
unsigned int |
i, |
|
|
const Vec3 & |
pos | |
|
) |
| | [inline] |
Set the specified child Drawable's position.
void osg::Billboard::setPositionList |
( |
PositionList & |
pl |
) |
[inline] |
Set the list of pivot point positions.
void osg::Billboard::updateCache |
( |
|
) |
[protected] |
Member Data Documentation
The documentation for this class was generated from the following file: