Public Types |
typedef std::vector< Vec3 > | PositionList |
| PositionList represents a list of pivot points for each drawable.
|
enum | Mode { POINT_ROT_EYE,
POINT_ROT_WORLD,
AXIAL_ROT
} |
Public Methods |
| Billboard () |
| Billboard (const Billboard &, const CopyOp ©op=CopyOp::SHALLOW_COPY) |
| Copy constructor using CopyOp to manage deep vs shallow copy.
|
| META_Node (osg, Billboard) |
void | setMode (const Mode mode) |
| Set the billboard rotation mode.
|
const Mode | getMode () const |
| Get the billboard rotation mode.
|
void | setAxis (const Vec3 &axis) |
| Set the axis about which all the billboard's drawable rotate.
|
const Vec3 & | getAxis () const |
| Get the axis about which all the billboard's drawable rotate.
|
void | setNormal (const Vec3 &normal) |
| Set the normal which defines the billboard's drawable front face, when unrotated.
|
const Vec3 & | getNormal () const |
| Get the normal of billboard's drawable front face.
|
void | setPos (int i, const Vec3 &pos) |
| Set the position of specified drawable.
|
const Vec3 & | getPos (int i) const |
| Get the position of specified drawable.
|
PositionList & | getPositionList () |
| Get the PositionList from the billboard.
|
const PositionList & | getPositionList () const |
| Get a const PositionList from the billboard.
|
virtual const bool | addDrawable (Drawable *gset) |
| Add Drawable to Billboard with default position(0,0,0); If gset not NULL and is not contained in Billboard then increment its reference count, and dirty the bounding box to cause it to recompute on next getBound() and return true for success.
|
virtual const bool | addDrawable (Drawable *gset, const Vec3 &pos) |
| Add Drawable to Geode at position pos.
|
virtual const bool | removeDrawable (Drawable *gset) |
| Remove Drawable and associated position from Billboard.
|
const bool | getMatrix (Matrix &modelview, const Vec3 &eye_local, const Vec3 &pos_local) const |
virtual const bool | computeMatrix (Matrix &modelview, const Vec3 &eye_local, const Vec3 &pos_local) const |
Protected Types |
enum | AxisAligned { AXIAL_ROT_X_AXIS = AXIAL_ROT+1,
AXIAL_ROT_Y_AXIS,
AXIAL_ROT_Z_AXIS,
CACHE_DIRTY
} |
Protected Methods |
virtual | ~Billboard () |
virtual const bool | computeBound () const |
| Compute the bounding sphere around Node's geometry or children.
|
void | updateCache () |
Protected Attributes |
Mode | _mode |
Vec3 | _axis |
Vec3 | _normal |
PositionList | _positionList |
int | _cachedMode |
Vec3 | _side |
Typical uses are for trees, or particle explosions.