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( const int n )
[more]inline const int getNumPrims() const
[more]void setPrimType( const PrimitiveType type )
[more]inline const PrimitiveType getPrimType() const
[more]inline void setPrimLengths( int* lens )
[more]inline int* getPrimLengths()
[more]inline const int* getPrimLengths() const
[more]void computeNumVerts() const
[more]inline const 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 const 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 const 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( const BindingType binding )
set the normals binding to the vertices/primitives/overall
[more]inline const BindingType getNormalBinding() const
[more]inline const 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( const BindingType binding )
set the color binding to the vertices/primitives/overall
[more]inline BindingType getColorBinding() const
[more]inline const 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 const 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( const BindingType binding )
set the texture coord binding to the vertices/primitives/overall
[more]inline const BindingType getTextureBinding() const
[more]inline const 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 const 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 const InterleaveArrayType getInterleavedFormat() const
get the interleaved array storage format.
[more]void setInterleavedArray( const InterleaveArrayType format, float* ia )
set the interleaved arrays of the geoset
[more]void setInterleavedArray( const InterleaveArrayType format, float* ia, GLushort* iai )
[more]void setInterleavedArray( const InterleaveArrayType format, float* ia, GLuint* iai )
[more]void setInterleavedArray( const InterleaveArrayType format, float* ia, IndexPointer& iai )
[more]virtual void drawImmediateMode(State& state)
draw geoset directly ignoring an OpenGL display list which could be attached.
[more]const 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 void accept(AttributeFunctor& af)
accept an AttributeFunctor and call its methods to tell it about the interal attributes that this Drawable has
[more]virtual void accept(PrimitiveFunctor& pf)
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]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 const bool computeBound() const
[more]void set_fast_path( void )
[more]void draw_fast_path( State& state )
[more]void draw_alternate_path( State& state )


Inherited from Drawable:

Public Methods

oinline const ParentList& getParents() const
oinline ParentList getParents()
oinline Node* getParent(const unsigned int i)
oinline const Node* getParent(const unsigned int i) const
oinline const unsigned int getNumParents() const
oinline void setStateSet(StateSet* state)
oinline StateSet* getStateSet()
oinline const StateSet* getStateSet() const
ovoid setSupportsDisplayList(const bool flag)
oinline const bool getSupportsDisplayList() const
ovoid setUseDisplayList(const bool flag)
oinline const bool getUseDisplayList() const
ovoid dirtyDisplayList()
ovoid dirtyBound()
oinline const BoundingBox& getBound() const
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 PrimitiveFunctor

Protected Fields

oParentList _parents
oref_ptr<StateSet> _dstate
obool _supportsDisplayList
obool _useDisplayList
omutable BoundingBox _bbox
omutable bool _bbox_computed
oref_ptr<AppCallback> _appCallback
oref_ptr<DrawCallback> _drawCallback
oref_ptr<CullCallback> _cullCallback

Protected Methods

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

Protected Members

otypedef std::vector<uint> GLObjectList mutable GLObjectList _globjList
otypedef std::map<uint,std::set<uint> >static DeletedDisplayListCache DeletedDisplayListCache s_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 const int referenceCount() const

Protected Fields

omutable int _refCount


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 const bool operator == (const IndexPointer& ip) const

oinline const bool valid() const

oinline const bool null() const

oinline void setToNull()

oinline void set(uint size, GLushort* data)

ovoid set(const uint size, GLuint* data)

oinline const uint maxIndex() const

oinline const 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( const int n )

oinline const int getNumPrims() const

ovoid setPrimType( const PrimitiveType type )

oinline const PrimitiveType getPrimType() const

oinline void setPrimLengths( int* lens )

oinline int* getPrimLengths()

oinline const int* getPrimLengths() const

ovoid computeNumVerts() const

oinline const 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 const 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 const 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( const BindingType binding )
set the normals binding to the vertices/primitives/overall

oinline const BindingType getNormalBinding() const

oinline const 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( const BindingType binding )
set the color binding to the vertices/primitives/overall

oinline BindingType getColorBinding() const

oinline const 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 const 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( const BindingType binding )
set the texture coord binding to the vertices/primitives/overall

oinline const BindingType getTextureBinding() const

oinline const 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 const 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 const InterleaveArrayType getInterleavedFormat() const
get the interleaved array storage format.

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

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

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

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

ovirtual void drawImmediateMode(State& state)
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.

oconst bool 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 void accept(AttributeFunctor& af)
accept an AttributeFunctor and call its methods to tell it about the interal attributes that this Drawable has

ovirtual void accept(PrimitiveFunctor& pf)
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 const 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

oIndexPointer _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 )

ovoid draw_alternate_path( State& state )


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



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