Billboard - a Geode which orientates its child osg::Drawable's to face the eye point.
Inheritance:
Public Methods
-
Billboard()
-
Billboard(const Billboard&, const CopyOp& copyop=CopyOp::SHALLOW_COPY)
- Copy constructor using CopyOp to manage deep vs shallow copy
-
META_Node(Billboard)
-
void setMode(const Mode mode)
- Set the billboard rotation mode.
-
inline 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.
-
inline const Vec3& getAxis() const
- Get the axis about which all the billboard's drawable rotate.
-
inline void setPos(int i, const Vec3& pos)
- Set the position of specified drawable.
-
inline const Vec3& getPos(int i) const
- Get the position of specified drawable.
-
inline PositionList& getPositionList()
- Get the PositionList from the billboard
-
inline 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.
-
void setComputeBillboardCallback(ComputeBillboardCallback* ctc)
- Set the ComputeBillboardCallback which allows users to attach custom computation of the local transformation as seen by cull traversers and alike
-
ComputeBillboardCallback* getComputeBillboardCallback()
- Get the non const ComputeBillboardCallback
-
const ComputeBillboardCallback* getComputeBillboardCallback() const
- Get the const ComputeBillboardCallback
-
inline const bool getMatrix(Matrix& modelview, const Vec3& eye_local, const Vec3& pos_local) const
Public Members
-
enum Mode
-
typedef std::vector<Vec3> PositionList
- PositionList represents a list of pivot points for each drawable
-
struct ComputeBillboardCallback: public osg::Referenced
- Callback attached to an Billboard which allows the users to customize the billboard orientation calculation during cull traversal
Protected Fields
-
Mode _mode
-
Vec3 _axis
-
PositionList _positionList
-
ref_ptr<ComputeBillboardCallback> _computeBillboardCallback
-
int _cachedMode
Protected Methods
-
virtual ~Billboard()
-
virtual const bool computeBound() const
-
virtual const bool computeMatrix(Matrix& modelview, const Vec3& eye_local, const Vec3& pos_local) const
-
void setCachedMode()
Protected Members
-
enum AxisAligned
Inherited from Geode:
Public Methods
-
virtual const bool replaceDrawable( Drawable* origDraw, Drawable* newDraw )
-
inline const int getNumDrawables() const
-
inline Drawable* getDrawable( const int i )
-
inline const Drawable* getDrawable( const int i ) const
-
inline const bool containsDrawable(const Drawable* gset) const
-
inline DrawableList::iterator findDrawable(const Drawable* gset)
-
inline DrawableList::const_iterator findDrawable(const Drawable* gset) const
-
void compileDrawables(State& state)
Protected Fields
-
DrawableList _drawables
Documentation
Billboard - a Geode which orientates its child osg::Drawable's to face
the eye point. Typical uses are for trees, or particle explosions.
- enum Mode
- POINT_ROT_EYE
- POINT_ROT_WORLD
- AXIAL_ROT
- Billboard()
- Billboard(const Billboard&, const CopyOp& copyop=CopyOp::SHALLOW_COPY)
- Copy constructor using CopyOp to manage deep vs shallow copy
- META_Node(Billboard)
- void setMode(const Mode mode)
- Set the billboard rotation mode.
- inline 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.
- inline const Vec3& getAxis() const
- Get the axis about which all the billboard's drawable rotate.
- inline void setPos(int i, const Vec3& pos)
- Set the position of specified drawable.
- inline const Vec3& getPos(int i) const
- Get the position of specified drawable.
- typedef std::vector<Vec3> PositionList
- PositionList represents a list of pivot points for each drawable
- inline PositionList& getPositionList()
- Get the PositionList from the billboard
- inline 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. Otherwise return false.
- virtual const bool addDrawable(Drawable* gset, const Vec3& pos)
- Add Drawable to Geode at position pos.
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. Otherwise return false.
- virtual const bool removeDrawable( Drawable* gset )
- Remove Drawable and associated position from Billboard.
If gset is contained in Billboard then remove it from the geoset
list and decrement its reference count, and dirty the
bounding box to cause it to recompute on next getBound() and
return true for success. If gset is not found then return false
and do not the reference count of gset is left unchanged.
- struct ComputeBillboardCallback: public osg::Referenced
- Callback attached to an Billboard which allows the users to customize the billboard orientation calculation during cull traversal
- virtual const bool computeMatrix(const Matrix& modelview, const Billboard* billboard, const Vec3& eye_local, const Vec3& pos_local) const
- Get the transformation matrix which moves from local coords to world coords
- void setComputeBillboardCallback(ComputeBillboardCallback* ctc)
- Set the ComputeBillboardCallback which allows users to attach custom computation of the local transformation as
seen by cull traversers and alike
- ComputeBillboardCallback* getComputeBillboardCallback()
- Get the non const ComputeBillboardCallback
- const ComputeBillboardCallback* getComputeBillboardCallback() const
- Get the const ComputeBillboardCallback
- inline const bool getMatrix(Matrix& modelview, const Vec3& eye_local, const Vec3& pos_local) const
- virtual ~Billboard()
- virtual const bool computeBound() const
- virtual const bool computeMatrix(Matrix& modelview, const Vec3& eye_local, const Vec3& pos_local) const
- enum AxisAligned
- AXIAL_ROT_X_AXIS
- AXIAL_ROT_Y_AXIS
- AXIAL_ROT_Z_AXIS
- Mode _mode
- Vec3 _axis
- PositionList _positionList
- ref_ptr<ComputeBillboardCallback> _computeBillboardCallback
- int _cachedMode
- void setCachedMode()
- This class has no child classes.
- Friends:
- struct osg::Billboard::ComputeBillboardCallback
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.