Inheritance:
Public Fields
-
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
-
Geometry()
-
Geometry(const Geometry& geometry, const CopyOp& copyop=CopyOp::SHALLOW_COPY)
- Copy constructor using CopyOp to manage deep vs shallow copy
-
virtual Object* cloneType() const
-
virtual Object* clone(const CopyOp& copyop) const
-
virtual bool isSameKindAs(const Object* obj) const
-
virtual const char* libraryName() const
-
virtual const char* className() const
-
virtual Geometry* asGeometry()
-
virtual const Geometry* asGeometry() const
-
void setVertexArray(Array* array)
-
Array* getVertexArray()
-
const Array* getVertexArray() const
-
void setVertexIndices(IndexArray* array)
-
IndexArray* getVertexIndices()
-
const IndexArray* getVertexIndices() const
-
void setVertexData(const ArrayData& arrayData)
-
ArrayData& getVertexData()
-
const ArrayData& getVertexData() const
-
void setNormalBinding(AttributeBinding ab)
-
AttributeBinding getNormalBinding() const
-
void setNormalArray(Vec3Array* array)
-
Vec3Array* getNormalArray()
-
const Vec3Array* getNormalArray() const
-
void setNormalIndices(IndexArray* array)
-
IndexArray* getNormalIndices()
-
const IndexArray* getNormalIndices() const
-
void setNormalData(const Vec3ArrayData& arrayData)
-
Vec3ArrayData& getNormalData()
-
const Vec3ArrayData& getNormalData() const
-
void setColorBinding(AttributeBinding ab)
-
AttributeBinding getColorBinding() const
-
void setColorArray(Array* array)
-
Array* getColorArray()
-
const Array* getColorArray() const
-
void setColorIndices(IndexArray* array)
-
IndexArray* getColorIndices()
-
const IndexArray* getColorIndices() const
-
void setColorData(const ArrayData& arrayData)
-
ArrayData& getColorData()
-
const ArrayData& getColorData() const
-
void setSecondaryColorBinding(AttributeBinding ab)
-
AttributeBinding getSecondaryColorBinding() const
-
void setSecondaryColorArray(Array* array)
-
Array* getSecondaryColorArray()
-
const Array* getSecondaryColorArray() const
-
void setSecondaryColorIndices(IndexArray* array)
-
IndexArray* getSecondaryColorIndices()
-
const IndexArray* getSecondaryColorIndices() const
-
void setSecondaryColorData(const ArrayData& arrayData)
-
ArrayData& getSecondaryColorData()
-
const ArrayData& getSecondaryColorData() const
-
void setFogCoordBinding(AttributeBinding ab)
-
AttributeBinding getFogCoordBinding() const
-
void setFogCoordArray(Array* array)
-
Array* getFogCoordArray()
-
const Array* getFogCoordArray() const
-
void setFogCoordIndices(IndexArray* array)
-
IndexArray* getFogCoordIndices()
-
const IndexArray* getFogCoordIndices() const
-
void setFogCoordData(const ArrayData& arrayData)
-
ArrayData& setFogCoordData()
-
const ArrayData& setFogCoordData() const
-
void setTexCoordArray(unsigned int unit, Array*)
-
Array* getTexCoordArray(unsigned int unit)
-
const Array* getTexCoordArray(unsigned int unit) const
-
void setTexCoordIndices(unsigned int unit, IndexArray*)
-
IndexArray* getTexCoordIndices(unsigned int unit)
-
const IndexArray* getTexCoordIndices(unsigned int unit) const
-
void setTexCoordData(unsigned int index, const ArrayData& arrayData)
-
ArrayData& getTexCoordData(unsigned int index)
-
const ArrayData& getTexCoordData(unsigned int index) const
-
unsigned int getNumTexCoordArrays() const
-
ArrayList& getTexCoordArrayList()
-
const ArrayList& getTexCoordArrayList() const
-
void setVertexAttribArray(unsigned int index, Array* array)
-
Array* getVertexAttribArray(unsigned int index)
-
const Array* getVertexAttribArray(unsigned int index) const
-
void setVertexAttribIndices(unsigned int index, IndexArray* array)
-
IndexArray* getVertexAttribIndices(unsigned int index)
-
const IndexArray* getVertexAttribIndices(unsigned int index) const
-
void setVertexAttribBinding(unsigned int index, AttributeBinding ab)
-
AttributeBinding getVertexAttribBinding(unsigned int index) const
-
void setVertexAttribNormalize(unsigned int index, GLboolean norm)
-
GLboolean getVertexAttribNormalize(unsigned int index) const
-
void setVertexAttribData(unsigned int index, const ArrayData& arrayData)
-
ArrayData& getVertexAttribData(unsigned int index)
-
const ArrayData& getVertexAttribData(unsigned int index) const
-
unsigned int getNumVertexAttribArrays() const
-
ArrayList& getVertexAttribArrayList()
-
const ArrayList& getVertexAttribArrayList() const
-
void setPrimitiveSetList(const PrimitiveSetList& primitives)
-
PrimitiveSetList& getPrimitiveSetList()
-
const PrimitiveSetList& getPrimitiveSetList() const
-
unsigned int getNumPrimitiveSets() const
-
PrimitiveSet* getPrimitiveSet(unsigned int pos)
-
const PrimitiveSet* getPrimitiveSet(unsigned int pos) const
-
bool addPrimitiveSet(PrimitiveSet* primitiveset)
- Add a primitive set to the geometry
-
bool setPrimitiveSet(unsigned int i, PrimitiveSet* primitiveset)
- Set a primitive set to the specified position in geometry's primitive set list
-
bool insertPrimitiveSet(unsigned int i, PrimitiveSet* primitiveset)
- Insert a primitive set to the specified position in geometry's primitive set list
-
bool removePrimitiveSet(unsigned int i, unsigned int numElementsToRemove=1)
- Remove primitive set(s) from the specified position in geometry's primitive set list
-
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().
-
void setFastPathHint(bool on)
- Set whether fast paths should be used when supported
-
bool getFastPathHint() const
- Get whether fast paths should be used when supported
-
inline bool areFastPathsUsed() const
- return true if OpenGL fast paths will be used with drawing this Geometry.
-
bool computeFastPathsUsed()
-
bool verifyBindings() const
-
void computeCorrectBindingsAndArraySizes()
-
bool suitableForOptimization() const
-
void copyToAndOptimize(Geometry& target)
-
void computeInternalOptimizedGeometry()
-
void removeInternalOptimizedGeometry()
-
void setInternalOptimizedGeometry(osg::Geometry* geometry)
-
osg::Geometry* getInternalOptimizedGeometry()
-
const osg::Geometry* getInternalOptimizedGeometry() const
-
virtual void drawImplementation(State& state) const
- draw Geometry directly ignoring an OpenGL display list which could be attached.
-
virtual bool supports(AttributeFunctor&) const
- return true, osg::Geometry does support accept(AttributeFunctor&)
-
virtual void accept(AttributeFunctor& af)
- accept an AttributeFunctor and call its methods to tell it about the interal attributes that this Drawable has
-
virtual bool supports(ConstAttributeFunctor&) const
- return true, osg::Geometry does support accept(ConstAttributeFunctor&)
-
virtual void accept(ConstAttributeFunctor& af) const
- accept an ConstAttributeFunctor and call its methods to tell it about the interal attributes that this Drawable has
-
virtual bool supports(PrimitiveFunctor&) const
- return true, osg::Geometry does support accept(PrimitiveFunctor&)
-
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
-
enum AttributeBinding
-
struct ArrayData
-
struct Vec3ArrayData
-
typedef std::vector< ArrayData > ArrayList
-
typedef std::vector< ref_ptr<PrimitiveSet> > PrimitiveSetList
Protected Fields
-
PrimitiveSetList _primitives
-
ArrayData _vertexData
-
Vec3ArrayData _normalData
-
ArrayData _colorData
-
ArrayData _secondaryColorData
-
ArrayData _fogCoordData
-
ArrayList _texCoordList
-
ArrayList _vertexAttribList
-
mutable bool _fastPath
-
bool _fastPathHint
-
ref_ptr<Geometry> _internalOptimizedGeometry
Protected Methods
-
Geometry& operator = (const Geometry&)
-
virtual ~Geometry()
-
bool verifyBindings(const ArrayData& arrayData) const
-
bool verifyBindings(const Vec3ArrayData& arrayData) const
-
void computeCorrectBindingsAndArraySizes(ArrayData& arrayData, const char* arrayName)
-
void computeCorrectBindingsAndArraySizes(Vec3ArrayData& arrayData, const char* arrayName)
Public Methods
-
inline const ParentList& getParents() const
-
inline ParentList getParents()
-
inline Node* getParent(unsigned int i)
-
inline const Node* getParent(unsigned int i) const
-
inline unsigned int getNumParents() const
-
inline void setStateSet(StateSet* state)
-
inline StateSet* getStateSet()
-
inline const StateSet* getStateSet() const
-
StateSet* getOrCreateStateSet()
-
void dirtyBound()
-
inline const BoundingBox& getBound() const
-
inline void setShape(Shape* shape)
-
inline Shape* getShape()
-
inline const Shape* getShape() const
-
void setSupportsDisplayList(bool flag)
-
inline bool getSupportsDisplayList() const
-
void setUseDisplayList(bool flag)
-
inline bool getUseDisplayList() const
-
void setUseVertexBufferObjects(bool flag)
-
inline bool getUseVertexBufferObjects() const
-
void dirtyDisplayList()
-
virtual void compile(State& state) const
-
void setUpdateCallback(UpdateCallback* ac)
-
UpdateCallback* getUpdateCallback()
-
void setCullCallback(CullCallback* cc)
-
CullCallback* getCullCallback()
-
const CullCallback* getCullCallback() const
-
void setDrawCallback(DrawCallback* dc)
-
DrawCallback* getDrawCallback()
-
const DrawCallback* getDrawCallback() const
-
static void deleteDisplayList(unsigned int contextID, GLuint globj)
-
static void flushDeletedDisplayLists(unsigned int contextID, double currentTime, double& availableTime)
-
static void deleteVertexBufferObject(unsigned int contextID, GLuint globj)
-
static void flushDeletedVertexBufferObjects(unsigned int contextID, double currentTime, double& availableTime)
-
static Extensions* getExtensions(unsigned int contextID, bool createIfNotInitalized)
-
static void setExtensions(unsigned int contextID, Extensions* extensions)
-
inline void draw(State& state) const
Public Members
-
typedef std::vector<Node*> ParentList
-
struct UpdateCallback: public virtual osg::Referenced
-
struct CullCallback: public virtual osg::Referenced
-
struct DrawCallback: public virtual osg::Referenced
-
typedef unsigned int AttributeType
-
enum 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
-
ParentList _parents
-
ref_ptr<StateSet> _stateset
-
mutable BoundingBox _bbox
-
mutable bool _bbox_computed
-
ref_ptr<Shape> _shape
-
bool _supportsDisplayList
-
bool _useDisplayList
-
bool _supportsVertexBufferObjects
-
bool _useVertexBufferObjects
-
mutable GLObjectList _globjList
-
mutable GLObjectList _vboList
-
ref_ptr<UpdateCallback> _updateCallback
-
ref_ptr<DrawCallback> _drawCallback
-
ref_ptr<CullCallback> _cullCallback
Protected Methods
-
virtual bool computeBound() const
-
void setBound(const BoundingBox& bb) const
-
void addParent(osg::Node* node)
-
void removeParent(osg::Node* node)
Protected Members
-
typedef osg::buffered_value<GLuint> GLObjectList
Inherited from Object:
Public Methods
-
inline void setDataVariance(DataVariance dv)
-
inline DataVariance getDataVariance() const
-
inline void setUserData(Referenced* obj)
-
inline Referenced* getUserData()
-
inline const Referenced* getUserData() const
Public Members
-
enum DataVariance
Protected Fields
-
DataVariance _dataVariance
-
ref_ptr<Referenced> _userData
Public Methods
-
static void setDeleteHandler(DeleteHandler* handler)
-
static DeleteHandler* getDeleteHandler()
-
inline void ref() const
-
inline void unref_nodelete() const
-
inline int referenceCount() const
-
inline void unref() const
Protected Fields
-
mutable int _refCount
Documentation
Geometry()
Geometry(const Geometry& geometry, const CopyOp& copyop=CopyOp::SHALLOW_COPY)
- Copy constructor using CopyOp to manage deep vs shallow copy
virtual Object* cloneType() const
virtual Object* clone(const CopyOp& copyop) const
virtual bool isSameKindAs(const Object* obj) const
virtual const char* libraryName() const
virtual const char* className() const
virtual Geometry* asGeometry()
virtual const Geometry* asGeometry() const
enum AttributeBinding
BIND_OFF
BIND_OVERALL
BIND_PER_PRIMITIVE_SET
BIND_PER_PRIMITIVE
BIND_PER_VERTEX
struct ArrayData
ArrayData()
ArrayData(Array* a, AttributeBinding b, GLboolean n = GL_FALSE)
ArrayData(Array* a, IndexArray* i, AttributeBinding b, GLboolean n = GL_FALSE)
ArrayData& operator = (const ArrayData& rhs)
ref_ptr<Array> array
ref_ptr<IndexArray> indices
AttributeBinding binding
GLboolean normalize
mutable unsigned int offset
struct Vec3ArrayData
Vec3ArrayData()
Vec3ArrayData(Vec3Array* a, AttributeBinding b, GLboolean n = GL_FALSE)
Vec3ArrayData(Vec3Array* a, IndexArray* i, AttributeBinding b, GLboolean n = GL_FALSE)
Vec3ArrayData& operator = (const Vec3ArrayData& rhs)
ref_ptr<Vec3Array> array
ref_ptr<IndexArray> indices
AttributeBinding binding
GLboolean normalize
mutable unsigned int offset
static const ArrayData s_InvalidArrayData
- static ArrayData which is returned get getTexCoordData(i) const and getVertexAttribData(i) const
when i is out of range
typedef std::vector< ArrayData > ArrayList
void setVertexArray(Array* array)
Array* getVertexArray()
const Array* getVertexArray() const
void setVertexIndices(IndexArray* array)
IndexArray* getVertexIndices()
const IndexArray* getVertexIndices() const
void setVertexData(const ArrayData& arrayData)
ArrayData& getVertexData()
const ArrayData& getVertexData() const
void setNormalBinding(AttributeBinding ab)
AttributeBinding getNormalBinding() const
void setNormalArray(Vec3Array* array)
Vec3Array* getNormalArray()
const Vec3Array* getNormalArray() const
void setNormalIndices(IndexArray* array)
IndexArray* getNormalIndices()
const IndexArray* getNormalIndices() const
void setNormalData(const Vec3ArrayData& arrayData)
Vec3ArrayData& getNormalData()
const Vec3ArrayData& getNormalData() const
void setColorBinding(AttributeBinding ab)
AttributeBinding getColorBinding() const
void setColorArray(Array* array)
Array* getColorArray()
const Array* getColorArray() const
void setColorIndices(IndexArray* array)
IndexArray* getColorIndices()
const IndexArray* getColorIndices() const
void setColorData(const ArrayData& arrayData)
ArrayData& getColorData()
const ArrayData& getColorData() const
void setSecondaryColorBinding(AttributeBinding ab)
AttributeBinding getSecondaryColorBinding() const
void setSecondaryColorArray(Array* array)
Array* getSecondaryColorArray()
const Array* getSecondaryColorArray() const
void setSecondaryColorIndices(IndexArray* array)
IndexArray* getSecondaryColorIndices()
const IndexArray* getSecondaryColorIndices() const
void setSecondaryColorData(const ArrayData& arrayData)
ArrayData& getSecondaryColorData()
const ArrayData& getSecondaryColorData() const
void setFogCoordBinding(AttributeBinding ab)
AttributeBinding getFogCoordBinding() const
void setFogCoordArray(Array* array)
Array* getFogCoordArray()
const Array* getFogCoordArray() const
void setFogCoordIndices(IndexArray* array)
IndexArray* getFogCoordIndices()
const IndexArray* getFogCoordIndices() const
void setFogCoordData(const ArrayData& arrayData)
ArrayData& setFogCoordData()
const ArrayData& setFogCoordData() const
void setTexCoordArray(unsigned int unit, Array*)
Array* getTexCoordArray(unsigned int unit)
const Array* getTexCoordArray(unsigned int unit) const
void setTexCoordIndices(unsigned int unit, IndexArray*)
IndexArray* getTexCoordIndices(unsigned int unit)
const IndexArray* getTexCoordIndices(unsigned int unit) const
void setTexCoordData(unsigned int index, const ArrayData& arrayData)
ArrayData& getTexCoordData(unsigned int index)
const ArrayData& getTexCoordData(unsigned int index) const
unsigned int getNumTexCoordArrays() const
ArrayList& getTexCoordArrayList()
const ArrayList& getTexCoordArrayList() const
void setVertexAttribArray(unsigned int index, Array* array)
Array* getVertexAttribArray(unsigned int index)
const Array* getVertexAttribArray(unsigned int index) const
void setVertexAttribIndices(unsigned int index, IndexArray* array)
IndexArray* getVertexAttribIndices(unsigned int index)
const IndexArray* getVertexAttribIndices(unsigned int index) const
void setVertexAttribBinding(unsigned int index, AttributeBinding ab)
AttributeBinding getVertexAttribBinding(unsigned int index) const
void setVertexAttribNormalize(unsigned int index, GLboolean norm)
GLboolean getVertexAttribNormalize(unsigned int index) const
void setVertexAttribData(unsigned int index, const ArrayData& arrayData)
ArrayData& getVertexAttribData(unsigned int index)
const ArrayData& getVertexAttribData(unsigned int index) const
unsigned int getNumVertexAttribArrays() const
ArrayList& getVertexAttribArrayList()
const ArrayList& getVertexAttribArrayList() const
typedef std::vector< ref_ptr<PrimitiveSet> > PrimitiveSetList
void setPrimitiveSetList(const PrimitiveSetList& primitives)
PrimitiveSetList& getPrimitiveSetList()
const PrimitiveSetList& getPrimitiveSetList() const
unsigned int getNumPrimitiveSets() const
PrimitiveSet* getPrimitiveSet(unsigned int pos)
const PrimitiveSet* getPrimitiveSet(unsigned int pos) const
bool addPrimitiveSet(PrimitiveSet* primitiveset)
- Add a primitive set to the geometry
bool setPrimitiveSet(unsigned int i, PrimitiveSet* primitiveset)
- Set a primitive set to the specified position in geometry's primitive set list
bool insertPrimitiveSet(unsigned int i, PrimitiveSet* primitiveset)
- Insert a primitive set to the specified position in geometry's primitive set list
bool removePrimitiveSet(unsigned int i, unsigned int numElementsToRemove=1)
- Remove primitive set(s) from the specified position in geometry's primitive set list
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().
When checking for a valid find value use if ((value=geoemtry->getPrimitiveSetIndex(primitive))!=geometry.getNumPrimitiveSet()) as
void setFastPathHint(bool on)
- Set whether fast paths should be used when supported
bool getFastPathHint() const
- Get whether fast paths should be used when supported
inline 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.
bool computeFastPathsUsed()
bool verifyBindings() const
void computeCorrectBindingsAndArraySizes()
bool suitableForOptimization() const
void copyToAndOptimize(Geometry& target)
void computeInternalOptimizedGeometry()
void removeInternalOptimizedGeometry()
void setInternalOptimizedGeometry(osg::Geometry* geometry)
osg::Geometry* getInternalOptimizedGeometry()
const osg::Geometry* getInternalOptimizedGeometry() const
virtual 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.
virtual bool supports(AttributeFunctor&) const
- return true, osg::Geometry does support accept(AttributeFunctor&)
virtual void accept(AttributeFunctor& af)
- accept an AttributeFunctor and call its methods to tell it about the interal attributes that this Drawable has
virtual bool supports(ConstAttributeFunctor&) const
- return true, osg::Geometry does support accept(ConstAttributeFunctor&)
virtual void accept(ConstAttributeFunctor& af) const
- accept an ConstAttributeFunctor and call its methods to tell it about the interal attributes that this Drawable has
virtual bool supports(PrimitiveFunctor&) const
- return true, osg::Geometry does support accept(PrimitiveFunctor&)
virtual void accept(PrimitiveFunctor& pf) const
- accept a PrimitiveFunctor and call its methods to tell it about the interal primitives that this Drawable has
Geometry& operator = (const Geometry&)
virtual ~Geometry()
bool verifyBindings(const ArrayData& arrayData) const
bool verifyBindings(const Vec3ArrayData& arrayData) const
void computeCorrectBindingsAndArraySizes(ArrayData& arrayData, const char* arrayName)
void computeCorrectBindingsAndArraySizes(Vec3ArrayData& arrayData, const char* arrayName)
PrimitiveSetList _primitives
ArrayData _vertexData
Vec3ArrayData _normalData
ArrayData _colorData
ArrayData _secondaryColorData
ArrayData _fogCoordData
ArrayList _texCoordList
ArrayList _vertexAttribList
mutable bool _fastPath
bool _fastPathHint
ref_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++.