class SG_EXPORT osg::Geometry


Inheritance:


Public Classes

[more]enum AttributeBinding
[more]struct ArrayData
[more]struct Vec3ArrayData

Public Fields

[more]static const ArrayData s_InvalidArrayData
static ArrayData which is returned get getTexCoordData(i) const and getVertexAttribData(i) const when i is out of range

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]bool empty() 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 setVertexData(const ArrayData& arrayData)
[more]ArrayData& getVertexData()
[more]const ArrayData& getVertexData() 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 setNormalData(const Vec3ArrayData& arrayData)
[more]Vec3ArrayData& getNormalData()
[more]const Vec3ArrayData& getNormalData() 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 setColorData(const ArrayData& arrayData)
[more]ArrayData& getColorData()
[more]const ArrayData& getColorData() 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 setSecondaryColorData(const ArrayData& arrayData)
[more]ArrayData& getSecondaryColorData()
[more]const ArrayData& getSecondaryColorData() 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 setFogCoordData(const ArrayData& arrayData)
[more]ArrayData& getFogCoordData()
[more]const ArrayData& getFogCoordData() 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]void setTexCoordData(unsigned int index, const ArrayData& arrayData)
[more]ArrayData& getTexCoordData(unsigned int index)
[more]const ArrayData& getTexCoordData(unsigned int index) const
[more]unsigned int getNumTexCoordArrays() const
[more]ArrayList& getTexCoordArrayList()
[more]const ArrayList& getTexCoordArrayList() const
[more]void setVertexAttribArray(unsigned int index, Array* array)
[more]Array* getVertexAttribArray(unsigned int index)
[more]const Array* getVertexAttribArray(unsigned int index) const
[more]void setVertexAttribIndices(unsigned int index, IndexArray* array)
[more]IndexArray* getVertexAttribIndices(unsigned int index)
[more]const IndexArray* getVertexAttribIndices(unsigned int index) const
[more]void setVertexAttribBinding(unsigned int index, AttributeBinding ab)
[more]AttributeBinding getVertexAttribBinding(unsigned int index) const
[more]void setVertexAttribNormalize(unsigned int index, GLboolean norm)
[more]GLboolean getVertexAttribNormalize(unsigned int index) const
[more]void setVertexAttribData(unsigned int index, const ArrayData& arrayData)
[more]ArrayData& getVertexAttribData(unsigned int index)
[more]const ArrayData& getVertexAttribData(unsigned int index) const
[more]unsigned int getNumVertexAttribArrays() const
[more]ArrayList& getVertexAttribArrayList()
[more]const ArrayList& 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]void setFastPathHint(bool on)
Set whether fast paths should be used when supported
[more]bool getFastPathHint() const
Get whether fast paths should be used when supported
[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]bool suitableForOptimization() const
[more]void copyToAndOptimize(Geometry& target)
[more]void computeInternalOptimizedGeometry()
[more]void removeInternalOptimizedGeometry()
[more]void setInternalOptimizedGeometry(osg::Geometry* geometry)
[more]osg::Geometry* getInternalOptimizedGeometry()
[more]const osg::Geometry* getInternalOptimizedGeometry() const
[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
[more]virtual bool supports(PrimitiveIndexFunctor&) const
return true, osg::Geometry does support accept(PrimitiveIndexFunctor&)
[more]virtual void accept(PrimitiveIndexFunctor& pf) const
accept a PrimitiveFunctor and call its methods to tell it about the interal primitives that this Drawable has

Public

[more]typedef std::vector< ArrayData > ArrayList
[more]typedef std::vector< ref_ptr<PrimitiveSet> > PrimitiveSetList

Protected Fields

[more]PrimitiveSetList _primitives
[more]ArrayData _vertexData
[more]Vec3ArrayData _normalData
[more]ArrayData _colorData
[more]ArrayData _secondaryColorData
[more]ArrayData _fogCoordData
[more]ArrayList _texCoordList
[more]ArrayList _vertexAttribList
[more]mutable bool _fastPath
[more]bool _fastPathHint
[more]ref_ptr<Geometry> _internalOptimizedGeometry

Protected Methods

[more]Geometry& operator = (const Geometry&)
[more]virtual ~Geometry()
[more]bool verifyBindings(const ArrayData& arrayData) const
[more]bool verifyBindings(const Vec3ArrayData& arrayData) const
[more]void computeCorrectBindingsAndArraySizes(ArrayData& arrayData, const char* arrayName)
[more]void computeCorrectBindingsAndArraySizes(Vec3ArrayData& arrayData, const char* arrayName)


Inherited from Drawable:

Public Classes

ostruct UpdateCallback: public virtual osg::Object
ostruct CullCallback: public virtual osg::Object
ostruct DrawCallback: public virtual osg::Object
oenum AttributeTypes
class AttributeFunctor
class ConstAttributeFunctor
class PrimitiveFunctor
class PrimitiveIndexFunctor
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

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 compileGLObjects(State& state) const
ovirtual void releaseGLObjects(State* state=0) const
ovoid setUpdateCallback(UpdateCallback* ac)
oUpdateCallback* getUpdateCallback()
oconst UpdateCallback* getUpdateCallback() const
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

otypedef std::vector<Node*> ParentList
otypedef unsigned int AttributeType

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<CullCallback> _cullCallback
oref_ptr<DrawCallback> _drawCallback

Protected Methods

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

Protected

otypedef osg::buffered_value<GLuint> GLObjectList


Inherited from Object:

Public Classes

oenum DataVariance

Public Methods

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

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 OpenThreads::Mutex _refMutex
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

obool empty() const

oenum AttributeBinding

o BIND_OFF

o BIND_OVERALL

o BIND_PER_PRIMITIVE_SET

o BIND_PER_PRIMITIVE

o BIND_PER_VERTEX

ostruct ArrayData

o ArrayData()

o ArrayData(const ArrayData& data, const CopyOp& copyop=CopyOp::SHALLOW_COPY)

o ArrayData(Array* a, AttributeBinding b, GLboolean n = GL_FALSE)

o ArrayData(Array* a, IndexArray* i, AttributeBinding b, GLboolean n = GL_FALSE)

oArrayData& operator = (const ArrayData& rhs)

oinline bool empty() const

oref_ptr<Array> array

oref_ptr<IndexArray> indices

oAttributeBinding binding

oGLboolean normalize

omutable unsigned int offset

ostruct Vec3ArrayData

o Vec3ArrayData()

o Vec3ArrayData(const Vec3ArrayData& data, const CopyOp& copyop=CopyOp::SHALLOW_COPY)

o Vec3ArrayData(Vec3Array* a, AttributeBinding b, GLboolean n = GL_FALSE)

o Vec3ArrayData(Vec3Array* a, IndexArray* i, AttributeBinding b, GLboolean n = GL_FALSE)

oVec3ArrayData& operator = (const Vec3ArrayData& rhs)

oinline bool empty() const

oref_ptr<Vec3Array> array

oref_ptr<IndexArray> indices

oAttributeBinding binding

oGLboolean normalize

omutable unsigned int offset

ostatic const ArrayData s_InvalidArrayData
static ArrayData which is returned get getTexCoordData(i) const and getVertexAttribData(i) const when i is out of range

otypedef std::vector< ArrayData > ArrayList

ovoid setVertexArray(Array* array)

oArray* getVertexArray()

oconst Array* getVertexArray() const

ovoid setVertexIndices(IndexArray* array)

oIndexArray* getVertexIndices()

oconst IndexArray* getVertexIndices() const

ovoid setVertexData(const ArrayData& arrayData)

oArrayData& getVertexData()

oconst ArrayData& getVertexData() 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 setNormalData(const Vec3ArrayData& arrayData)

oVec3ArrayData& getNormalData()

oconst Vec3ArrayData& getNormalData() 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 setColorData(const ArrayData& arrayData)

oArrayData& getColorData()

oconst ArrayData& getColorData() 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 setSecondaryColorData(const ArrayData& arrayData)

oArrayData& getSecondaryColorData()

oconst ArrayData& getSecondaryColorData() 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

ovoid setFogCoordData(const ArrayData& arrayData)

oArrayData& getFogCoordData()

oconst ArrayData& getFogCoordData() const

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

ovoid setTexCoordData(unsigned int index, const ArrayData& arrayData)

oArrayData& getTexCoordData(unsigned int index)

oconst ArrayData& getTexCoordData(unsigned int index) const

ounsigned int getNumTexCoordArrays() const

oArrayList& getTexCoordArrayList()

oconst ArrayList& getTexCoordArrayList() const

ovoid setVertexAttribArray(unsigned int index, Array* array)

oArray* getVertexAttribArray(unsigned int index)

oconst Array* getVertexAttribArray(unsigned int index) const

ovoid setVertexAttribIndices(unsigned int index, IndexArray* array)

oIndexArray* getVertexAttribIndices(unsigned int index)

oconst IndexArray* getVertexAttribIndices(unsigned int index) const

ovoid setVertexAttribBinding(unsigned int index, AttributeBinding ab)

oAttributeBinding getVertexAttribBinding(unsigned int index) const

ovoid setVertexAttribNormalize(unsigned int index, GLboolean norm)

oGLboolean getVertexAttribNormalize(unsigned int index) const

ovoid setVertexAttribData(unsigned int index, const ArrayData& arrayData)

oArrayData& getVertexAttribData(unsigned int index)

oconst ArrayData& getVertexAttribData(unsigned int index) const

ounsigned int getNumVertexAttribArrays() const

oArrayList& getVertexAttribArrayList()

oconst ArrayList& 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

ovoid setFastPathHint(bool on)
Set whether fast paths should be used when supported

obool getFastPathHint() const
Get whether fast paths should be used when supported

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()

obool suitableForOptimization() const

ovoid copyToAndOptimize(Geometry& target)

ovoid computeInternalOptimizedGeometry()

ovoid removeInternalOptimizedGeometry()

ovoid setInternalOptimizedGeometry(osg::Geometry* geometry)

oosg::Geometry* getInternalOptimizedGeometry()

oconst osg::Geometry* getInternalOptimizedGeometry() const

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

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

ovirtual void accept(PrimitiveIndexFunctor& 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()

obool verifyBindings(const ArrayData& arrayData) const

obool verifyBindings(const Vec3ArrayData& arrayData) const

ovoid computeCorrectBindingsAndArraySizes(ArrayData& arrayData, const char* arrayName)

ovoid computeCorrectBindingsAndArraySizes(Vec3ArrayData& arrayData, const char* arrayName)

oPrimitiveSetList _primitives

oArrayData _vertexData

oVec3ArrayData _normalData

oArrayData _colorData

oArrayData _secondaryColorData

oArrayData _fogCoordData

oArrayList _texCoordList

oArrayList _vertexAttribList

omutable bool _fastPath

obool _fastPathHint

oref_ptr<Geometry> _internalOptimizedGeometry


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



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