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& matrix, const Vec3& eye_local, const Vec3& up_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& matrix, const Vec3& eye_local, const Vec3& up_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
Inherited from Node:
Public Methods
-
virtual Object* cloneType() const
-
virtual Object* clone(const CopyOp& copyop) const
-
virtual bool isSameKindAs(const Object* obj) const
-
virtual const char* className() const
-
virtual void accept(NodeVisitor& nv)
-
virtual void ascend(NodeVisitor& nv)
-
virtual void traverse(NodeVisitor& )
-
inline void setName( const std::string& name )
-
inline void setName( const char* name )
-
inline const std::string& getName() const
-
inline const ParentList& getParents() const
-
inline ParentList getParents()
-
inline Group* getParent(const int i)
-
inline const Group* getParent(const int i) const
-
inline const int getNumParents() const
-
void setAppCallback(NodeCallback* nc)
-
inline NodeCallback* getAppCallback()
-
inline const NodeCallback* getAppCallback() const
-
inline const int getNumChildrenRequiringAppTraversal() const
-
void setCullingActive(const bool active)
-
inline const bool getCullingActive() const
-
inline const int getNumChildrenWithCullingDisabled() const
-
inline void setUserData(osg::Referenced* obj)
-
inline Referenced* getUserData()
-
inline const Referenced* getUserData() const
-
inline void setNodeMask(const NodeMask nm)
-
inline const NodeMask getNodeMask() const
-
inline const DescriptionList& getDescriptions() const
-
inline DescriptionList& getDescriptions()
-
inline const std::string& getDescription(const int i) const
-
inline std::string& getDescription(const int i)
-
inline const int getNumDescriptions() const
-
void addDescription(const std::string& desc)
-
inline void setStateSet(osg::StateSet* dstate)
-
inline osg::StateSet* getStateSet()
-
inline const osg::StateSet* getStateSet() const
-
inline const BoundingSphere& getBound() const
-
void dirtyBound()
Public Members
-
typedef std::vector<Group*> ParentList
-
typedef std::vector<std::string> DescriptionList
Protected Fields
-
mutable BoundingSphere _bsphere
-
mutable bool _bsphere_computed
-
std::string _name
-
ParentList _parents
-
ref_ptr<NodeCallback> _appCallback
-
int _numChildrenRequiringAppTraversal
-
bool _cullingActive
-
int _numChildrenWithCullingDisabled
-
osg::ref_ptr<Referenced> _userData
-
NodeMask _nodeMask
-
DescriptionList _descriptions
-
ref_ptr<StateSet> _dstate
Protected Methods
-
void addParent(osg::Group* node)
-
void removeParent(osg::Group* node)
-
void setNumChildrenRequiringAppTraversal(const int num)
-
void setNumChildrenWithCullingDisabled(const int num)
Inherited from Object:
Public Methods
-
inline Referenced& operator = (Referenced&)
-
inline void ref() const
-
inline void unref() const
-
inline const int referenceCount() const
Protected Fields
-
mutable int _refCount
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& matrix, const Billboard* billboard, const Vec3& eye_local, const Vec3& up_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& matrix, const Vec3& eye_local, const Vec3& up_local, const Vec3& pos_local) const
- virtual ~Billboard()
- virtual const bool computeBound() const
- virtual const bool computeMatrix(Matrix& matrix, const Vec3& eye_local, const Vec3& up_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++.