class SG_EXPORT osg::LOD: public Group

LOD - Level Of Detail group node which allows switching between children depending on distance from eye point.

Inheritance:


Public Methods

[more] LOD()
[more]virtual Object* clone() const
[more]virtual bool isSameKindAs(Object* obj)
[more]virtual const char* className() const
[more]virtual void accept(NodeVisitor& nv)
[more]virtual void traverse(NodeVisitor& nv)
[more]void setRange(unsigned int index, float range)
Sets the value of range list element index to range which is a floating point distance specified in world coordinates.
[more]float getRange(unsigned int index)
pfLOD::getRange returns the range element index
[more]int getNumRanges()
returns the number of ranges currently set
[more]void setCenter(const Vec3 &center)
Sets the object-space point which defines the center of the osg::LOD.
[more]const Vec3& getCenter()
return the LOD center point.
[more]int evaluate(const Vec3& eye_local, float bias=1.0f)
return the child to traverse.

Protected Fields

[more]RangeList _rangeList
[more]RangeList _rangeList2
[more]Vec3 _center

Protected Methods

[more]virtual ~LOD()
[more]virtual bool readLocalData(Input& fr)
[more]virtual bool writeLocalData(Output& fw)

Protected

[more]typedef std::vector<float> RangeList


Inherited from Group:

Public Methods

ovirtual bool addChild( Node *child )
ovirtual bool removeChild( Node *child )
ovirtual bool replaceChild( Node *origChild, Node* newChild )
oint getNumChildren( void )
oNode* getChild( int i )
obool containsNode( Node* node )
oChildList::iterator findNode( Node* node )

Public

otypedef std::vector<ref_ptr<Node> > ChildList

Protected Fields

oChildList _children

Protected Methods

obool computeBound( void )


Inherited from Node:

Public Methods

oNode* cloneNode() const
ovirtual void ascend(NodeVisitor& nv)
ovoid setName( const std::string& name )
ovoid setName( const char* name )
oconst std::string& getName( void )
oconst ParentList& getParents() const
oGroup* getParent(int i) const
oint getNumParents() const
ovoid setUserData(void* data, MemoryAdapter* ma=0L)
ovoid* getUserData() const
oMemoryAdapter* getMemoryAdapter() const
ovoid setNodeMask(NodeMask nm)
oNodeMask getNodeMask()
oconst DescriptionList& getDescriptions() const
oDescriptionList& getDescriptions()
oconst std::string& getDescription(int i) const
ostd::string& getDescription(int i)
oint getNumDescriptions() const
ovoid addDescription(const std::string& desc)
oconst BoundingSphere& getBound()
ovoid dirtyBound()

Public

otypedef std::vector<Group*> ParentList
otypedef unsigned int NodeMask
otypedef std::vector<std::string> DescriptionList

Protected Fields

oBoundingSphere _bsphere
obool _bsphere_computed
ostd::string _name
oParentList _parents
ofriend Group
ovoid* _userData
oref_ptr<MemoryAdapter> _memoryAdapter
oNodeMask _nodeMask
oDescriptionList _descriptions


Inherited from Object:

Public Methods

ovirtual Object* readClone(Input& fr)
ovirtual bool write(Output& fw)


Inherited from Referenced:

Public Methods

oReferenced& operator = (Referenced&)
ovoid ref()
ovoid unref()
oint referenceCount()

Protected Fields

oint _refCount


Documentation

LOD - Level Of Detail group node which allows switching between children depending on distance from eye point. Typical uses are for load balancing - objects further away from the eye point are rendered at a lower level of detail, and at times of high stress on the graphics pipeline lower levels of detail can also be chosen.
o LOD()

ovirtual Object* clone() const

ovirtual bool isSameKindAs(Object* obj)

ovirtual const char* className() const

ovirtual void accept(NodeVisitor& nv)

ovirtual void traverse(NodeVisitor& nv)

ovoid setRange(unsigned int index, float range)
Sets the value of range list element index to range which is a floating point distance specified in world coordinates. Range list automatically expands to accomodate values beyond the current getNumRanges().

ofloat getRange(unsigned int index)
pfLOD::getRange returns the range element index

oint getNumRanges()
returns the number of ranges currently set

ovoid setCenter(const Vec3 &center)
Sets the object-space point which defines the center of the osg::LOD. center is affected by any transforms in the hierarchy above the osg::LOD.

oconst Vec3& getCenter()
return the LOD center point.

oint evaluate(const Vec3& eye_local, float bias=1.0f)
return the child to traverse. Selected by the distance between the eye point in local coordinates and the LOD center, mutliplied by the bias.

ovirtual ~LOD()

ovirtual bool readLocalData(Input& fr)

ovirtual bool writeLocalData(Output& fw)

otypedef std::vector<float> RangeList

oRangeList _rangeList

oRangeList _rangeList2

oVec3 _center


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.