class SG_EXPORT osg::Geometry


Inheritance:


Public Methods

[more] Geometry()
[more] Geometry(const Geometry& geometry, const CopyOp& copyop=CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy
[more]virtual Object* cloneType() const
[more]virtual Object* clone(const CopyOp& copyop) const
[more]virtual bool isSameKindAs(const Object* obj) const
[more]virtual const char* libraryName() const
[more]virtual const char* className() const
[more]virtual Geometry* asGeometry()
[more]virtual const Geometry* asGeometry() const
[more]void setVertexArray(Array* array)
[more]Array* getVertexArray()
[more]const Array* getVertexArray() const
[more]void setVertexIndices(IndexArray* array)
[more]IndexArray* getVertexIndices()
[more]const IndexArray* getVertexIndices() const
[more]void setNormalBinding(AttributeBinding ab)
[more]AttributeBinding getNormalBinding() const
[more]void setNormalArray(Vec3Array* array)
[more]Vec3Array* getNormalArray()
[more]const Vec3Array* getNormalArray() const
[more]void setNormalIndices(IndexArray* array)
[more]IndexArray* getNormalIndices()
[more]const IndexArray* getNormalIndices() const
[more]void setColorBinding(AttributeBinding ab)
[more]AttributeBinding getColorBinding() const
[more]void setColorArray(Array* array)
[more]Array* getColorArray()
[more]const Array* getColorArray() const
[more]void setColorIndices(IndexArray* array)
[more]IndexArray* getColorIndices()
[more]const IndexArray* getColorIndices() const
[more]void setSecondaryColorBinding(AttributeBinding ab)
[more]AttributeBinding getSecondaryColorBinding() const
[more]void setSecondaryColorArray(Array* array)
[more]Array* getSecondaryColorArray()
[more]const Array* getSecondaryColorArray() const
[more]void setSecondaryColorIndices(IndexArray* array)
[more]IndexArray* getSecondaryColorIndices()
[more]const IndexArray* getSecondaryColorIndices() const
[more]void setFogCoordBinding(AttributeBinding ab)
[more]AttributeBinding getFogCoordBinding() const
[more]void setFogCoordArray(Array* array)
[more]Array* getFogCoordArray()
[more]const Array* getFogCoordArray() const
[more]void setFogCoordIndices(IndexArray* array)
[more]IndexArray* getFogCoordIndices()
[more]const IndexArray* getFogCoordIndices() const
[more]void setTexCoordArray(unsigned int unit, Array*)
[more]Array* getTexCoordArray(unsigned int unit)
[more]const Array* getTexCoordArray(unsigned int unit) const
[more]void setTexCoordIndices(unsigned int unit, IndexArray*)
[more]IndexArray* getTexCoordIndices(unsigned int unit)
[more]const IndexArray* getTexCoordIndices(unsigned int unit) const
[more]unsigned int getNumTexCoordArrays() const
[more]TexCoordArrayList& getTexCoordArrayList()
[more]const TexCoordArrayList& getTexCoordArrayList() const
[more]void setArray(AttributeType type, Array* array)
[more]Array* getArray(AttributeType type)
[more]const Array* getArray(AttributeType type) const
[more]void setIndices(AttributeType type, IndexArray* indices)
[more]IndexArray* getIndices(AttributeType type)
[more]const IndexArray* getIndices(AttributeType type) const
[more]void setNormalize(AttributeType type, GLboolean normalize)
[more]GLboolean getNormalize(AttributeType type) const
[more]void setBinding(AttributeType type, AttributeBinding binding)
[more]AttributeBinding getBinding(AttributeType type) const
[more]unsigned int getNumArrays() const
[more]AttributeData& getAttributeData(unsigned int type)
[more]const AttributeData& getAttributeData(unsigned int type) const
[more]void setAttributeList(AttributeList& al)
[more]AttributeList& getAttributeList()
[more]const AttributeList& getAttributeList() const
[more]void setVertexAttribArray(unsigned int index, bool normalize, Array* array, AttributeBinding ab=BIND_OFF)
[more]Array* getVertexAttribArray(unsigned int index)
[more]const Array* getVertexAttribArray(unsigned int index) const
[more]bool getVertexAttribNormalize(unsigned int index, GLboolean &ret) const
[more]bool getVertexAttribBinding(unsigned int index, AttributeBinding& ab) const
[more]void setVertexAttribIndices(unsigned int index, IndexArray* array)
[more]IndexArray* getVertexAttribIndices(unsigned int index)
[more]const IndexArray* getVertexAttribIndices(unsigned int index) const
[more]unsigned int getNumVertexAttribArrays() const
[more]VertexAttribArrayList& getVertexAttribArrayList()
[more]const VertexAttribArrayList& getVertexAttribArrayList() const
[more]void setPrimitiveSetList(const PrimitiveSetList& primitives)
[more]PrimitiveSetList& getPrimitiveSetList()
[more]const PrimitiveSetList& getPrimitiveSetList() const
[more]unsigned int getNumPrimitiveSets() const
[more]PrimitiveSet* getPrimitiveSet(unsigned int pos)
[more]const PrimitiveSet* getPrimitiveSet(unsigned int pos) const
[more]bool addPrimitiveSet(PrimitiveSet* primitiveset)
Add a primitive set to the geometry
[more]bool setPrimitiveSet(unsigned int i, PrimitiveSet* primitiveset)
Set a primitive set to the specified position in geometry's primitive set list
[more]bool insertPrimitiveSet(unsigned int i, PrimitiveSet* primitiveset)
Insert a primitive set to the specified position in geometry's primitive set list
[more]bool removePrimitiveSet(unsigned int i, unsigned int numElementsToRemove=1)
Remove primitive set(s) from the specified position in geometry's primitive set list
[more]unsigned int getPrimitiveSetIndex(const PrimitiveSet* primitiveset) const
Get the index number of a primitive set, return a value between 0 and getNumPrimitiveSet()-1 if found, if not found then return getNumPrimitiveSet().
[more]inline bool areFastPathsUsed() const
return true if OpenGL fast paths will be used with drawing this Geometry.
[more]bool computeFastPathsUsed()
[more]bool verifyBindings() const
[more]void computeCorrectBindingsAndArraySizes()
[more]virtual void drawImplementation(State& state) const
draw Geometry directly ignoring an OpenGL display list which could be attached.
[more]virtual bool supports(AttributeFunctor&) const
return true, osg::Geometry does support accept(AttributeFunctor&)
[more]virtual void accept(AttributeFunctor& af)
accept an AttributeFunctor and call its methods to tell it about the interal attributes that this Drawable has
[more]virtual bool supports(ConstAttributeFunctor&) const
return true, osg::Geometry does support accept(ConstAttributeFunctor&)
[more]virtual void accept(ConstAttributeFunctor& af) const
accept an ConstAttributeFunctor and call its methods to tell it about the interal attributes that this Drawable has
[more]virtual bool supports(PrimitiveFunctor&) const
return true, osg::Geometry does support accept(PrimitiveFunctor&)
[more]virtual void accept(PrimitiveFunctor& pf) const
accept a PrimitiveFunctor and call its methods to tell it about the interal primitives that this Drawable has

Public Members

[more]enum AttributeBinding
[more]template<typename T> struct AttributeData
[more]struct ArrayPair
[more]typedef std::vector< ArrayPair > TexCoordArrayList
[more]typedef std::vector<AttributeData> AttributeList
[more]typedef std::pair< GLboolean, ArrayPair > VertexAttribNormArrayPair
[more]typedef std::vector< VertexAttribNormArrayPair > VertexAttribArrayList
[more]typedef std::vector< AttributeBinding > VertexAttribBindingList
[more]typedef std::vector< ref_ptr<PrimitiveSet> > PrimitiveSetList

Protected Fields

[more]PrimitiveSetList _primitives
[more]AttributeList _attributeList
[more]ref_ptr<Array> _vertexArray
[more]ref_ptr<IndexArray> _vertexIndices
[more]mutable unsigned int _vertexOffset
[more]mutable AttributeBinding _normalBinding
[more]ref_ptr<Vec3Array> _normalArray
[more]ref_ptr<IndexArray> _normalIndices
[more]mutable unsigned int _normalOffset
[more]mutable AttributeBinding _colorBinding
[more]ref_ptr<Array> _colorArray
[more]ref_ptr<IndexArray> _colorIndices
[more]mutable unsigned int _colorOffset
[more]mutable AttributeBinding _secondaryColorBinding
[more]ref_ptr<Array> _secondaryColorArray
[more]ref_ptr<IndexArray> _secondaryColorIndices
[more]mutable unsigned int _secondaryColorOffset
[more]mutable AttributeBinding _fogCoordBinding
[more]ref_ptr<Array> _fogCoordArray
[more]ref_ptr<IndexArray> _fogCoordIndices
[more]mutable unsigned int _fogCoordOffset
[more]TexCoordArrayList _texCoordList
[more]VertexAttribArrayList _vertexAttribList
[more]mutable VertexAttribBindingList _vertexAttribBindingList
[more]mutable bool _fastPath

Protected Methods

[more]Geometry& operator = (const Geometry&)
[more]virtual ~Geometry()


Inherited from Drawable:

Public Methods

oinline const ParentList& getParents() const
oinline ParentList getParents()
oinline Node* getParent(unsigned int i)
oinline const Node* getParent(unsigned int i) const
oinline unsigned int getNumParents() const
oinline void setStateSet(StateSet* state)
oinline StateSet* getStateSet()
oinline const StateSet* getStateSet() const
oStateSet* getOrCreateStateSet()
ovoid dirtyBound()
oinline const BoundingBox& getBound() const
oinline void setShape(Shape* shape)
oinline Shape* getShape()
oinline const Shape* getShape() const
ovoid setSupportsDisplayList(bool flag)
oinline bool getSupportsDisplayList() const
ovoid setUseDisplayList(bool flag)
oinline bool getUseDisplayList() const
ovoid setUseVertexBufferObjects(bool flag)
oinline bool getUseVertexBufferObjects() const
ovoid dirtyDisplayList()
ovirtual void compile(State& state) const
ovoid setUpdateCallback(UpdateCallback* ac)
oUpdateCallback* getUpdateCallback()
ovoid setCullCallback(CullCallback* cc)
oCullCallback* getCullCallback()
oconst CullCallback* getCullCallback() const
ovoid setDrawCallback(DrawCallback* dc)
oDrawCallback* getDrawCallback()
oconst DrawCallback* getDrawCallback() const
ostatic void deleteDisplayList(unsigned int contextID, GLuint globj)
ostatic void flushDeletedDisplayLists(unsigned int contextID, double currentTime, double& availableTime)
ostatic void deleteVertexBufferObject(unsigned int contextID, GLuint globj)
ostatic void flushDeletedVertexBufferObjects(unsigned int contextID, double currentTime, double& availableTime)
ostatic Extensions* getExtensions(unsigned int contextID, bool createIfNotInitalized)
ostatic void setExtensions(unsigned int contextID, Extensions* extensions)
oinline void draw(State& state) const

Public Members

otypedef std::vector<Node*> ParentList
ostruct UpdateCallback: public virtual osg::Referenced
ostruct CullCallback: public virtual osg::Referenced
ostruct DrawCallback: public virtual osg::Referenced
otypedef unsigned int AttributeType
oenum AttributeTypes
class AttributeFunctor
class ConstAttributeFunctor
class PrimitiveFunctor
class SG_EXPORT Extensions: public osg::Referenced
Extensions class which encapsulates the querring of extensions and associated function pointers, and provide convinience wrappers to check for the extensions or use the associated functions

Protected Fields

oParentList _parents
oref_ptr<StateSet> _stateset
omutable BoundingBox _bbox
omutable bool _bbox_computed
oref_ptr<Shape> _shape
obool _supportsDisplayList
obool _useDisplayList
obool _supportsVertexBufferObjects
obool _useVertexBufferObjects
omutable GLObjectList _globjList
omutable GLObjectList _vboList
oref_ptr<UpdateCallback> _updateCallback
oref_ptr<DrawCallback> _drawCallback
oref_ptr<CullCallback> _cullCallback

Protected Methods

ovirtual bool computeBound() const
ovoid setBound(const BoundingBox& bb) const
ovoid addParent(osg::Node* node)
ovoid removeParent(osg::Node* node)

Protected Members

otypedef osg::buffered_value<GLuint> GLObjectList


Inherited from Object:

Public Methods

oinline void setDataVariance(DataVariance dv)
oinline DataVariance getDataVariance() const
oinline void setUserData(Referenced* obj)
oinline Referenced* getUserData()
oinline const Referenced* getUserData() const

Public Members

oenum DataVariance

Protected Fields

oDataVariance _dataVariance
oref_ptr<Referenced> _userData


Inherited from Referenced:

Public Methods

ostatic void setDeleteHandler(DeleteHandler* handler)
ostatic DeleteHandler* getDeleteHandler()
oinline void ref() const
oinline void unref_nodelete() const
oinline int referenceCount() const
oinline void unref() const

Protected Fields

omutable int _refCount


Documentation

o Geometry()

o Geometry(const Geometry& geometry, const CopyOp& copyop=CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy

ovirtual Object* cloneType() const

ovirtual Object* clone(const CopyOp& copyop) const

ovirtual bool isSameKindAs(const Object* obj) const

ovirtual const char* libraryName() const

ovirtual const char* className() const

ovirtual Geometry* asGeometry()

ovirtual const Geometry* asGeometry() const

oenum AttributeBinding

o BIND_OFF

o BIND_OVERALL

o BIND_PER_PRIMITIVE_SET

o BIND_PER_PRIMITIVE

o BIND_PER_VERTEX

otemplate<typename T> struct AttributeData

o AttributeData()

oref_ptr<T> _array

oref_ptr<IndexArray> _indices

oAttributeBinding _binding

oGLboolean _normalize

ounsigned int _offset

ovoid setVertexArray(Array* array)

oArray* getVertexArray()

oconst Array* getVertexArray() const

ovoid setVertexIndices(IndexArray* array)

oIndexArray* getVertexIndices()

oconst IndexArray* getVertexIndices() const

ovoid setNormalBinding(AttributeBinding ab)

oAttributeBinding getNormalBinding() const

ovoid setNormalArray(Vec3Array* array)

oVec3Array* getNormalArray()

oconst Vec3Array* getNormalArray() const

ovoid setNormalIndices(IndexArray* array)

oIndexArray* getNormalIndices()

oconst IndexArray* getNormalIndices() const

ovoid setColorBinding(AttributeBinding ab)

oAttributeBinding getColorBinding() const

ovoid setColorArray(Array* array)

oArray* getColorArray()

oconst Array* getColorArray() const

ovoid setColorIndices(IndexArray* array)

oIndexArray* getColorIndices()

oconst IndexArray* getColorIndices() const

ovoid setSecondaryColorBinding(AttributeBinding ab)

oAttributeBinding getSecondaryColorBinding() const

ovoid setSecondaryColorArray(Array* array)

oArray* getSecondaryColorArray()

oconst Array* getSecondaryColorArray() const

ovoid setSecondaryColorIndices(IndexArray* array)

oIndexArray* getSecondaryColorIndices()

oconst IndexArray* getSecondaryColorIndices() const

ovoid setFogCoordBinding(AttributeBinding ab)

oAttributeBinding getFogCoordBinding() const

ovoid setFogCoordArray(Array* array)

oArray* getFogCoordArray()

oconst Array* getFogCoordArray() const

ovoid setFogCoordIndices(IndexArray* array)

oIndexArray* getFogCoordIndices()

oconst IndexArray* getFogCoordIndices() const

ostruct ArrayPair

o ArrayPair()

o ArrayPair(const ArrayPair& rhs)

oArrayPair& operator = (const ArrayPair& rhs)

oref_ptr<Array> first

oref_ptr<IndexArray> second

omutable unsigned int offset

otypedef std::vector< ArrayPair > TexCoordArrayList

ovoid setTexCoordArray(unsigned int unit, Array*)

oArray* getTexCoordArray(unsigned int unit)

oconst Array* getTexCoordArray(unsigned int unit) const

ovoid setTexCoordIndices(unsigned int unit, IndexArray*)

oIndexArray* getTexCoordIndices(unsigned int unit)

oconst IndexArray* getTexCoordIndices(unsigned int unit) const

ounsigned int getNumTexCoordArrays() const

oTexCoordArrayList& getTexCoordArrayList()

oconst TexCoordArrayList& getTexCoordArrayList() const

ovoid setArray(AttributeType type, Array* array)

oArray* getArray(AttributeType type)

oconst Array* getArray(AttributeType type) const

ovoid setIndices(AttributeType type, IndexArray* indices)

oIndexArray* getIndices(AttributeType type)

oconst IndexArray* getIndices(AttributeType type) const

ovoid setNormalize(AttributeType type, GLboolean normalize)

oGLboolean getNormalize(AttributeType type) const

ovoid setBinding(AttributeType type, AttributeBinding binding)

oAttributeBinding getBinding(AttributeType type) const

ounsigned int getNumArrays() const

oAttributeData& getAttributeData(unsigned int type)

oconst AttributeData& getAttributeData(unsigned int type) const

otypedef std::vector<AttributeData> AttributeList

ovoid setAttributeList(AttributeList& al)

oAttributeList& getAttributeList()

oconst AttributeList& getAttributeList() const

otypedef std::pair< GLboolean, ArrayPair > VertexAttribNormArrayPair

otypedef std::vector< VertexAttribNormArrayPair > VertexAttribArrayList

otypedef std::vector< AttributeBinding > VertexAttribBindingList

ovoid setVertexAttribArray(unsigned int index, bool normalize, Array* array, AttributeBinding ab=BIND_OFF)

oArray* getVertexAttribArray(unsigned int index)

oconst Array* getVertexAttribArray(unsigned int index) const

obool getVertexAttribNormalize(unsigned int index, GLboolean &ret) const

obool getVertexAttribBinding(unsigned int index, AttributeBinding& ab) const

ovoid setVertexAttribIndices(unsigned int index, IndexArray* array)

oIndexArray* getVertexAttribIndices(unsigned int index)

oconst IndexArray* getVertexAttribIndices(unsigned int index) const

ounsigned int getNumVertexAttribArrays() const

oVertexAttribArrayList& getVertexAttribArrayList()

oconst VertexAttribArrayList& getVertexAttribArrayList() const

otypedef std::vector< ref_ptr<PrimitiveSet> > PrimitiveSetList

ovoid setPrimitiveSetList(const PrimitiveSetList& primitives)

oPrimitiveSetList& getPrimitiveSetList()

oconst PrimitiveSetList& getPrimitiveSetList() const

ounsigned int getNumPrimitiveSets() const

oPrimitiveSet* getPrimitiveSet(unsigned int pos)

oconst PrimitiveSet* getPrimitiveSet(unsigned int pos) const

obool addPrimitiveSet(PrimitiveSet* primitiveset)
Add a primitive set to the geometry

obool setPrimitiveSet(unsigned int i, PrimitiveSet* primitiveset)
Set a primitive set to the specified position in geometry's primitive set list

obool insertPrimitiveSet(unsigned int i, PrimitiveSet* primitiveset)
Insert a primitive set to the specified position in geometry's primitive set list

obool removePrimitiveSet(unsigned int i, unsigned int numElementsToRemove=1)
Remove primitive set(s) from the specified position in geometry's primitive set list

ounsigned int getPrimitiveSetIndex(const PrimitiveSet* primitiveset) const
Get the index number of a primitive set, return a value between 0 and getNumPrimitiveSet()-1 if found, if not found then return getNumPrimitiveSet(). When checking for a valid find value use if ((value=geoemtry->getPrimitiveSetIndex(primitive))!=geometry.getNumPrimitiveSet()) as

oinline bool areFastPathsUsed() const
return true if OpenGL fast paths will be used with drawing this Geometry. Fast paths use vertex arrays, and glDrawArrays/glDrawElements. Slow paths use glBegin()/glVertex.../glEnd(). Use of per primitive bindings or per vertex indexed arrays will drop the rendering path off the fast path.

obool computeFastPathsUsed()

obool verifyBindings() const

ovoid computeCorrectBindingsAndArraySizes()

ovirtual void drawImplementation(State& state) const
draw Geometry directly ignoring an OpenGL display list which could be attached. This is the internal draw method which does the drawing itself, and is the method to override when deriving from Geometry for user-drawn objects.

ovirtual bool supports(AttributeFunctor&) const
return true, osg::Geometry does support accept(AttributeFunctor&)

ovirtual void accept(AttributeFunctor& af)
accept an AttributeFunctor and call its methods to tell it about the interal attributes that this Drawable has

ovirtual bool supports(ConstAttributeFunctor&) const
return true, osg::Geometry does support accept(ConstAttributeFunctor&)

ovirtual void accept(ConstAttributeFunctor& af) const
accept an ConstAttributeFunctor and call its methods to tell it about the interal attributes that this Drawable has

ovirtual bool supports(PrimitiveFunctor&) const
return true, osg::Geometry does support accept(PrimitiveFunctor&)

ovirtual void accept(PrimitiveFunctor& pf) const
accept a PrimitiveFunctor and call its methods to tell it about the interal primitives that this Drawable has

oGeometry& operator = (const Geometry&)

ovirtual ~Geometry()

oPrimitiveSetList _primitives

oAttributeList _attributeList

oref_ptr<Array> _vertexArray

oref_ptr<IndexArray> _vertexIndices

omutable unsigned int _vertexOffset

omutable AttributeBinding _normalBinding

oref_ptr<Vec3Array> _normalArray

oref_ptr<IndexArray> _normalIndices

omutable unsigned int _normalOffset

omutable AttributeBinding _colorBinding

oref_ptr<Array> _colorArray

oref_ptr<IndexArray> _colorIndices

omutable unsigned int _colorOffset

omutable AttributeBinding _secondaryColorBinding

oref_ptr<Array> _secondaryColorArray

oref_ptr<IndexArray> _secondaryColorIndices

omutable unsigned int _secondaryColorOffset

omutable AttributeBinding _fogCoordBinding

oref_ptr<Array> _fogCoordArray

oref_ptr<IndexArray> _fogCoordIndices

omutable unsigned int _fogCoordOffset

oTexCoordArrayList _texCoordList

oVertexAttribArrayList _vertexAttribList

omutable VertexAttribBindingList _vertexAttribBindingList

omutable bool _fastPath


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



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