class SG_EXPORT osg::GeoSet

Note, osg::GeoSet is now deprecated, please use osg::Geometry instead.

Inheritance:


Public Methods

[more] GeoSet()
[more] GeoSet(const GeoSet& geoset, 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]inline void setNumPrims( int n )
[more]inline int getNumPrims() const
[more]void setPrimType( PrimitiveType type )
[more]inline PrimitiveType getPrimType() const
[more]inline void setPrimLengths( int* lens )
[more]inline int* getPrimLengths() const
[more]void computeNumVerts() const
[more]inline int getNumCoords() const
get the number of coords required by the defined primitives.
[more]inline Vec3* getCoords()
get a pointer to Vec3 coord array.
[more]inline const Vec3* getCoords() const
get a const pointer to Vec3 coord array.
[more]inline int getNumCoordIndices() const
get the number of indices required by the defined primitives.
[more]inline IndexPointer& getCoordIndices()
get the coord index array.
[more]inline const IndexPointer& getCoordIndices() const
get the const coord index array.
[more]void setCoords( Vec3* cp )
set the coords (ie the geometry) of the geoset
[more]void setCoords( Vec3* cp, GLushort* ci )
set the coords (ie the geometry) and ushort indices of the geoset.
[more]void setCoords( Vec3* cp, GLuint* ci )
set the coords (ie the geometry) and uint indices of the geoset.
[more]void setCoords( Vec3* cp, IndexPointer& ip )
set the coords (ie the geometry) and indices of the geoset
[more]inline int getNumNormals() const
get the number of normals required by the defined primitives and normals binding
[more]inline Vec3* getNormals()
get a pointer to Vec3 normal array.
[more]inline const Vec3* getNormals() const
get a const pointer to Vec3 normal array.
[more]inline int getNumNormalIndices() const
get the number of normal indices required by the defined primitives and normals binding
[more]inline IndexPointer& getNormalIndices()
get the normal index array.
[more]inline const IndexPointer& getNormalIndices() const
get the const normal index array.
[more]void setNormals( Vec3* np )
set the normals of the geoset
[more]void setNormals( Vec3* np, GLushort* ni )
set the normals and normal indices of the geoset
[more]void setNormals( Vec3* np, GLuint* ni )
set the normals and normal indices of the geoset
[more]void setNormals( Vec3* np, IndexPointer& ip )
set the normals and normal indices of the geoset
[more]void setNormalBinding( BindingType binding )
set the normals binding to the vertices/primitives/overall
[more]inline BindingType getNormalBinding() const
[more]inline int getNumColors() const
get the number of colors required by the defined primitives and color binding
[more]inline Vec4* getColors()
get a pointer to Vec4 color array.
[more]inline const Vec4* getColors() const
get a pointer to Vec4 color array.
[more]inline int getNumColorIndices() const
get the number of colors indices required by the defined primitives and color binding
[more]inline IndexPointer& getColorIndices()
get the color index array.
[more]inline const IndexPointer& getColorIndices() const
get the const color index array.
[more]void setColors( Vec4* cp )
set the colors of the geoset
[more]void setColors( Vec4* cp, GLushort* li )
set the colors and color indices of the geoset
[more]void setColors( Vec4* cp, GLuint* li )
set the colors and color indices of the geoset
[more]void setColors( Vec4* cp, IndexPointer& ip )
set the colors and color indices of the geoset
[more]void setColorBinding( BindingType binding )
set the color binding to the vertices/primitives/overall
[more]inline BindingType getColorBinding() const
[more]inline int getNumTextureCoords() const
get the number of texture coords required by the defined primitives and textures binding
[more]inline Vec2* getTextureCoords()
get a pointer to Vec4 color array.
[more]inline const Vec2* getTextureCoords() const
get a pointer to Vec4 color array.
[more]inline int getNumTextureIndices() const
get the number of texture coord indices required by the defined primitives and texture binding
[more]inline IndexPointer& getTextureIndices()
get the texture index array.
[more]inline const IndexPointer& getTextureIndices() const
get the texture index array.
[more]void setTextureCoords( Vec2* tc )
set the texture coords of the geoset
[more]void setTextureCoords( Vec2* tc, GLushort* ti )
set the texture coords and texture coord indices of the geoset
[more]void setTextureCoords( Vec2* tc, GLuint* ti )
set the texture coords and texture coord indices of the geoset
[more]void setTextureCoords( Vec2* tc, IndexPointer& ip )
set the texture coords and texture indices of the geoset
[more]void setTextureBinding( BindingType binding )
set the texture coord binding to the vertices/primitives/overall
[more]inline BindingType getTextureBinding() const
[more]inline int getNumInterleavedCoords() const
get the number of texture coords required by the defined primitives and textures binding
[more]inline void* getInterleavedArray()
get a pointer to interleaved float array.
[more]inline const void* getInterleavedArray() const
get a const pointer to interleaved float array.
[more]inline int getNumInterleavedIndices() const
get the number of texture coord indices required by the defined primitives and texture binding
[more]inline IndexPointer& getInterleavedIndices()
get the texture index array.
[more]inline const IndexPointer& getInterleavedIndices() const
get the interleaved index array.
[more]inline InterleaveArrayType getInterleavedFormat() const
get the interleaved array storage format.
[more]void setInterleavedArray( InterleaveArrayType format, float* ia )
set the interleaved arrays of the geoset
[more]void setInterleavedArray( InterleaveArrayType format, float* ia, GLushort* iai )
[more]void setInterleavedArray( InterleaveArrayType format, float* ia, GLuint* iai )
[more]void setInterleavedArray( InterleaveArrayType format, float* ia, IndexPointer& iai )
[more]virtual void drawImplementation(State& state) const
draw geoset directly ignoring an OpenGL display list which could be attached.
[more]bool check() const
[more]void setAttributeDeleteFunctor(AttributeDeleteFunctor* adf)
set an alternative AttributeDeleteFunction to handle attribute arrays attached to this Geoset
[more]AttributeDeleteFunctor* getAttributeDeleteFunctor()
get the current AttributeDeleteFunction to handle attribute arrays attached to this Geoset
[more]const AttributeDeleteFunctor* getAttributeDeleteFunctor() const
get the current AttributeDeleteFunction to handle attribute arrays attached to this Geoset
[more]virtual bool supports(AttributeFunctor&) const
return true, osg::GeoSet 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::GeoSet 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::GeoSet does support accept(PrimitiveFunctor&)
[more]virtual void accept(PrimitiveFunctor& pf) const
accept a PrimtiveFunctor and call its methods to tell it about the interal primtives that this Drawable has
[more]Geometry* convertToGeometry()
convinience function for converting GeoSet's to equivilant Geometry nodes

Public Members

[more]enum PrimitiveType
[more]enum BindingType
[more]enum InterleaveArrayType
[more]struct IndexPointer
[more]struct AttributeDeleteFunctor: public osg::Referenced
function object which is used to handling the clean up of attribute arrays associated with GeoSet's.

Protected Fields

[more]ref_ptr<AttributeDeleteFunctor> _adf
[more]int _numprims
[more]PrimitiveType _primtype
[more]int _needprimlen
[more]unsigned int _oglprimtype
[more]int* _primLengths
[more]mutable unsigned char _primlength
[more]unsigned char _flat_shaded_skip
[more]mutable int _numcoords
[more]Vec3* _coords
[more]mutable IndexPointer _cindex
[more]BindingType _normal_binding
[more]mutable int _numnormals
[more]Vec3* _normals
[more]IndexPointer _nindex
[more]BindingType _color_binding
[more]mutable int _numcolors
[more]Vec4* _colors
[more]IndexPointer _colindex
[more]BindingType _texture_binding
[more]mutable int _numtcoords
[more]Vec2* _tcoords
[more]IndexPointer _tindex
[more]void* _iarray
[more]IndexPointer _iaindex
[more]InterleaveArrayType _iaformat
[more]unsigned int _ogliaformat
[more]int _fast_path

Protected Methods

[more]GeoSet& operator = (const GeoSet&)
[more]virtual ~GeoSet()
[more]virtual bool computeBound() const
[more]void set_fast_path( void )
[more]void draw_fast_path( State& state ) const
[more]void draw_alternate_path( State& state ) const


Inherited from Drawable:

Public Methods

ovirtual Geometry* asGeometry()
ovirtual const Geometry* asGeometry() const
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 dirtyDisplayList()
ovoid compile(State& state)
ovoid setAppCallback(AppCallback* ac)
oAppCallback* getAppCallback()
oconst AppCallback* getAppCallback() const
ovoid setCullCallback(CullCallback* cc)
oCullCallback* getCullCallback()
oconst CullCallback* getCullCallback() const
ovoid setDrawCallback(DrawCallback* dc)
oDrawCallback* getDrawCallback()
oconst DrawCallback* getDrawCallback() const
ostatic void deleteDisplayList(uint contextID, uint globj)
ostatic void flushDeletedDisplayLists(uint contextID)
oinline void draw(State& state)

Public Members

otypedef std::vector<Node*> ParentList
ostruct AppCallback: public osg::Referenced
ostruct CullCallback: public osg::Referenced
ostruct DrawCallback: public osg::Referenced
oenum AttributeType
class AttributeFunctor
class ConstAttributeFunctor
class PrimitiveFunctor

Protected Fields

oParentList _parents
oref_ptr<StateSet> _stateset
omutable BoundingBox _bbox
omutable bool _bbox_computed
oref_ptr<Shape> _shape
obool _supportsDisplayList
obool _useDisplayList
omutable GLObjectList _globjList
oref_ptr<AppCallback> _appCallback
oref_ptr<DrawCallback> _drawCallback
oref_ptr<CullCallback> _cullCallback
ostatic DeletedDisplayListCache s_deletedDisplayListCache

Protected Methods

ovoid addParent(osg::Node* node)
ovoid removeParent(osg::Node* node)

Protected Members

otypedef std::vector<uint> GLObjectList
otypedef std::map<uint,std::set<uint> > DeletedDisplayListCache


Inherited from Object:

Public Methods

oinline void setDataVariance(const DataVariance dv)
oinline const 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

oinline void ref() const
oinline void unref() const
oinline void unref_nodelete() const
oinline int referenceCount() const
oinline static int createdCount()
oinline static int deletedCount()

Protected Fields

omutable int _refCount
ostatic int _createdCount
ostatic int _deletedCount


Documentation

Note, osg::GeoSet is now deprecated, please use osg::Geometry instead. osg::GeoSet will be kept through to the beta release for backwards compatability only.

Encapsulates OpenGL drawing primitives, geometry and optional binding of normal, color and texture coordinates. Used for representing the visible objects in the scene. State attributes for a GeoSet are maintained in StateSet which the GeoSet maintains a referenced counted pointer to. Both GeoSet's and StateSet's can be shared for optimal memory usage and graphics performance.

oenum PrimitiveType

o NO_TYPE

o POINTS

o LINES

o LINE_STRIP

o FLAT_LINE_STRIP

o LINE_LOOP

o TRIANGLES

o TRIANGLE_STRIP

o FLAT_TRIANGLE_STRIP

o TRIANGLE_FAN

o FLAT_TRIANGLE_FAN

o QUADS

o QUAD_STRIP

o POLYGON

oenum BindingType

o BIND_OFF

o BIND_OVERALL

o BIND_PERPRIM

o BIND_PERVERTEX

o BIND_DEFAULT

oenum InterleaveArrayType

o IA_OFF

o IA_V2F

o IA_V3F

o IA_C4UB_V2F

o IA_C4UB_V3F

o IA_C3F_V3F

o IA_N3F_V3F

o IA_C4F_N3F_V3F

o IA_T2F_V3F

o IA_T4F_V4F

o IA_T2F_C4UB_V3F

o IA_T2F_C3F_V3F

o IA_T2F_N3F_V3F

o IA_T2F_C4F_N3F_V3F

o IA_T4F_C4F_N3F_V4F

ostruct IndexPointer

omutable uint _size

obool _is_ushort

ounion

oGLushort* _ushort

oGLuint* _uint

o IndexPointer()

oinline bool operator == (const IndexPointer& ip) const

oinline bool valid() const

oinline bool null() const

oinline void setToNull()

oinline void set(uint size, GLushort* data)

ovoid set(uint size, GLuint* data)

oinline uint maxIndex() const

oinline GLint operator [] (const GLuint pos) const

o GeoSet()

o GeoSet(const GeoSet& geoset, 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

oinline void setNumPrims( int n )

oinline int getNumPrims() const

ovoid setPrimType( PrimitiveType type )

oinline PrimitiveType getPrimType() const

oinline void setPrimLengths( int* lens )

oinline int* getPrimLengths() const

ovoid computeNumVerts() const

oinline int getNumCoords() const
get the number of coords required by the defined primitives.

oinline Vec3* getCoords()
get a pointer to Vec3 coord array.

oinline const Vec3* getCoords() const
get a const pointer to Vec3 coord array.

oinline int getNumCoordIndices() const
get the number of indices required by the defined primitives.

oinline IndexPointer& getCoordIndices()
get the coord index array.

oinline const IndexPointer& getCoordIndices() const
get the const coord index array.

ovoid setCoords( Vec3* cp )
set the coords (ie the geometry) of the geoset

ovoid setCoords( Vec3* cp, GLushort* ci )
set the coords (ie the geometry) and ushort indices of the geoset. To reduce memory footprint and bandwidth for small datasets it is recommended the ushort indices are used instead of unit indices.

ovoid setCoords( Vec3* cp, GLuint* ci )
set the coords (ie the geometry) and uint indices of the geoset. Unless your data set exceeds 65536 indices prefer ushort indices over uint indices, only use this unit indices version if necessary.

ovoid setCoords( Vec3* cp, IndexPointer& ip )
set the coords (ie the geometry) and indices of the geoset

oinline int getNumNormals() const
get the number of normals required by the defined primitives and normals binding

oinline Vec3* getNormals()
get a pointer to Vec3 normal array.

oinline const Vec3* getNormals() const
get a const pointer to Vec3 normal array.

oinline int getNumNormalIndices() const
get the number of normal indices required by the defined primitives and normals binding

oinline IndexPointer& getNormalIndices()
get the normal index array.

oinline const IndexPointer& getNormalIndices() const
get the const normal index array.

ovoid setNormals( Vec3* np )
set the normals of the geoset

ovoid setNormals( Vec3* np, GLushort* ni )
set the normals and normal indices of the geoset

ovoid setNormals( Vec3* np, GLuint* ni )
set the normals and normal indices of the geoset

ovoid setNormals( Vec3* np, IndexPointer& ip )
set the normals and normal indices of the geoset

ovoid setNormalBinding( BindingType binding )
set the normals binding to the vertices/primitives/overall

oinline BindingType getNormalBinding() const

oinline int getNumColors() const
get the number of colors required by the defined primitives and color binding

oinline Vec4* getColors()
get a pointer to Vec4 color array.

oinline const Vec4* getColors() const
get a pointer to Vec4 color array.

oinline int getNumColorIndices() const
get the number of colors indices required by the defined primitives and color binding

oinline IndexPointer& getColorIndices()
get the color index array.

oinline const IndexPointer& getColorIndices() const
get the const color index array.

ovoid setColors( Vec4* cp )
set the colors of the geoset

ovoid setColors( Vec4* cp, GLushort* li )
set the colors and color indices of the geoset

ovoid setColors( Vec4* cp, GLuint* li )
set the colors and color indices of the geoset

ovoid setColors( Vec4* cp, IndexPointer& ip )
set the colors and color indices of the geoset

ovoid setColorBinding( BindingType binding )
set the color binding to the vertices/primitives/overall

oinline BindingType getColorBinding() const

oinline int getNumTextureCoords() const
get the number of texture coords required by the defined primitives and textures binding

oinline Vec2* getTextureCoords()
get a pointer to Vec4 color array.

oinline const Vec2* getTextureCoords() const
get a pointer to Vec4 color array.

oinline int getNumTextureIndices() const
get the number of texture coord indices required by the defined primitives and texture binding

oinline IndexPointer& getTextureIndices()
get the texture index array.

oinline const IndexPointer& getTextureIndices() const
get the texture index array.

ovoid setTextureCoords( Vec2* tc )
set the texture coords of the geoset

ovoid setTextureCoords( Vec2* tc, GLushort* ti )
set the texture coords and texture coord indices of the geoset

ovoid setTextureCoords( Vec2* tc, GLuint* ti )
set the texture coords and texture coord indices of the geoset

ovoid setTextureCoords( Vec2* tc, IndexPointer& ip )
set the texture coords and texture indices of the geoset

ovoid setTextureBinding( BindingType binding )
set the texture coord binding to the vertices/primitives/overall

oinline BindingType getTextureBinding() const

oinline int getNumInterleavedCoords() const
get the number of texture coords required by the defined primitives and textures binding

oinline void* getInterleavedArray()
get a pointer to interleaved float array.

oinline const void* getInterleavedArray() const
get a const pointer to interleaved float array.

oinline int getNumInterleavedIndices() const
get the number of texture coord indices required by the defined primitives and texture binding

oinline IndexPointer& getInterleavedIndices()
get the texture index array.

oinline const IndexPointer& getInterleavedIndices() const
get the interleaved index array.

oinline InterleaveArrayType getInterleavedFormat() const
get the interleaved array storage format.

ovoid setInterleavedArray( InterleaveArrayType format, float* ia )
set the interleaved arrays of the geoset

ovoid setInterleavedArray( InterleaveArrayType format, float* ia, GLushort* iai )

ovoid setInterleavedArray( InterleaveArrayType format, float* ia, GLuint* iai )

ovoid setInterleavedArray( InterleaveArrayType format, float* ia, IndexPointer& iai )

ovirtual void drawImplementation(State& state) const
draw geoset 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 GeoSet for user-drawn objects.

obool check() const

ostruct AttributeDeleteFunctor: public osg::Referenced
function object which is used to handling the clean up of attribute arrays associated with GeoSet's. A default is provided which assumes that all momory attached to the GeoSet is owned by this GeoSet and can be deleted using delete []. If this is not the cause derive your own AttributeDeleteFunctor a specify your own memory deletion operation.

ovirtual void operator() (GeoSet* gset)

ovoid setAttributeDeleteFunctor(AttributeDeleteFunctor* adf)
set an alternative AttributeDeleteFunction to handle attribute arrays attached to this Geoset

oAttributeDeleteFunctor* getAttributeDeleteFunctor()
get the current AttributeDeleteFunction to handle attribute arrays attached to this Geoset

oconst AttributeDeleteFunctor* getAttributeDeleteFunctor() const
get the current AttributeDeleteFunction to handle attribute arrays attached to this Geoset

ovirtual bool supports(AttributeFunctor&) const
return true, osg::GeoSet 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::GeoSet 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::GeoSet does support accept(PrimitiveFunctor&)

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

oGeometry* convertToGeometry()
convinience function for converting GeoSet's to equivilant Geometry nodes

oGeoSet& operator = (const GeoSet&)

ovirtual ~GeoSet()

ovirtual bool computeBound() const

oref_ptr<AttributeDeleteFunctor> _adf

oint _numprims

oPrimitiveType _primtype

oint _needprimlen

ounsigned int _oglprimtype

oint* _primLengths

omutable unsigned char _primlength

ounsigned char _flat_shaded_skip

omutable int _numcoords

oVec3* _coords

omutable IndexPointer _cindex

oBindingType _normal_binding

omutable int _numnormals

oVec3* _normals

oIndexPointer _nindex

oBindingType _color_binding

omutable int _numcolors

oVec4* _colors

oIndexPointer _colindex

oBindingType _texture_binding

omutable int _numtcoords

oVec2* _tcoords

oIndexPointer _tindex

ovoid* _iarray

oIndexPointer _iaindex

oInterleaveArrayType _iaformat

ounsigned int _ogliaformat

oint _fast_path

ovoid set_fast_path( void )

ovoid draw_fast_path( State& state ) const

ovoid draw_alternate_path( State& state ) const


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



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