Encapsulates OpenGL drawing primitives, geometry and optional binding of normal, color and texture coordinates.
Inheritance:
Public Methods
-
GeoSet()
-
GeoSet(const GeoSet& geoset, 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* className() const
-
inline void setNumPrims( const int n )
-
inline const int getNumPrims() const
-
void setPrimType( const PrimitiveType type )
-
inline const PrimitiveType getPrimType() const
-
inline void setPrimLengths( int* lens )
-
inline int* getPrimLengths()
-
inline const int* getPrimLengths() const
-
void computeNumVerts() const
-
inline const int getNumCoords() const
- get the number of coords required by the defined primitives.
-
inline Vec3* getCoords()
- get a pointer to Vec3 coord array.
-
inline const Vec3* getCoords() const
- get a const pointer to Vec3 coord array.
-
inline const int getNumCoordIndices() const
- get the number of indices required by the defined primitives.
-
inline IndexPointer& getCoordIndices()
- get the coord index array.
-
inline const IndexPointer& getCoordIndices() const
- get the const coord index array.
-
void setCoords( Vec3* cp )
- set the coords (ie the geometry) of the geoset
-
void setCoords( Vec3* cp, ushort* ci )
- set the coords (ie the geometry) and ushort indices of the geoset.
-
void setCoords( Vec3* cp, uint* ci )
- set the coords (ie the geometry) and uint indices of the geoset.
-
void setCoords( Vec3* cp, IndexPointer& ip )
- set the coords (ie the geometry) and indices of the geoset
-
inline const int getNumNormals() const
- get the number of normals required by the defined primitives and normals binding
-
inline Vec3* getNormals()
- get a pointer to Vec3 normal array.
-
inline const Vec3* getNormals() const
- get a const pointer to Vec3 normal array.
-
inline int getNumNormalIndices() const
- get the number of normal indices required by the defined primitives and normals binding
-
inline IndexPointer& getNormalIndices()
- get the normal index array.
-
inline const IndexPointer& getNormalIndices() const
- get the const normal index array.
-
void setNormals( Vec3* np )
- set the normals of the geoset
-
void setNormals( Vec3* np, ushort* ni )
- set the normals and normal indices of the geoset
-
void setNormals( Vec3* np, uint* ni )
- set the normals and normal indices of the geoset
-
void setNormals( Vec3* np, IndexPointer& ip )
- set the normals and normal indices of the geoset
-
void setNormalBinding( const BindingType binding )
- set the normals binding to the vertices/primitives/overall
-
inline const BindingType getNormalBinding() const
-
inline const int getNumColors() const
- get the number of colors required by the defined primitives and color binding
-
inline Vec4* getColors()
- get a pointer to Vec4 color array.
-
inline const Vec4* getColors() const
- get a pointer to Vec4 color array.
-
inline int getNumColorIndices() const
- get the number of colors indices required by the defined primitives and color binding
-
inline IndexPointer& getColorIndices()
- get the color index array.
-
inline const IndexPointer& getColorIndices() const
- get the const color index array.
-
void setColors( Vec4* cp )
- set the colors of the geoset
-
void setColors( Vec4* cp, ushort* li )
- set the colors and color indices of the geoset
-
void setColors( Vec4* cp, uint* li )
- set the colors and color indices of the geoset
-
void setColors( Vec4* cp, IndexPointer& ip )
- set the colors and color indices of the geoset
-
void setColorBinding( const BindingType binding )
- set the color binding to the vertices/primitives/overall
-
inline BindingType getColorBinding() const
-
inline const int getNumTextureCoords() const
- get the number of texture coords required by the defined primitives and textures binding
-
inline Vec2* getTextureCoords()
- get a pointer to Vec4 color array.
-
inline const Vec2* getTextureCoords() const
- get a pointer to Vec4 color array.
-
inline const int getNumTextureIndices() const
- get the number of texture coord indices required by the defined primitives and texture binding
-
inline IndexPointer& getTextureIndices()
- get the texture index array.
-
inline const IndexPointer& getTextureIndices() const
- get the texture index array.
-
void setTextureCoords( Vec2* tc )
- set the texture coords of the geoset
-
void setTextureCoords( Vec2* tc, ushort* ti )
- set the texture coords and texture coord indices of the geoset
-
void setTextureCoords( Vec2* tc, uint* ti )
- set the texture coords and texture coord indices of the geoset
-
void setTextureCoords( Vec2* tc, IndexPointer& ip )
- set the texture coords and texture indices of the geoset
-
void setTextureBinding( const BindingType binding )
- set the texture coord binding to the vertices/primitives/overall
-
inline const BindingType getTextureBinding() const
-
inline const int getNumInterleavedCoords() const
- get the number of texture coords required by the defined primitives and textures binding
-
inline void* getInterleavedArray()
- get a pointer to interleaved float array.
-
inline const void* getInterleavedArray() const
- get a const pointer to interleaved float array.
-
inline const int getNumInterleavedIndices() const
- get the number of texture coord indices required by the defined primitives and texture binding
-
inline IndexPointer& getInterleavedIndices()
- get the texture index array.
-
inline const IndexPointer& getInterleavedIndices() const
- get the interleaved index array.
-
inline const InterleaveArrayType getInterleavedFormat() const
- get the interleaved array storage format.
-
void setInterleavedArray( const InterleaveArrayType format, float* ia )
- set the interleaved arrays of the geoset
-
void setInterleavedArray( const InterleaveArrayType format, float* ia, ushort* iai )
-
void setInterleavedArray( const InterleaveArrayType format, float* ia, uint* iai )
-
void setInterleavedArray( const InterleaveArrayType format, float* ia, IndexPointer& iai )
-
virtual void drawImmediateMode(State& state)
- draw geoset directly ignoring an OpenGL display list which could be attached.
-
const bool check() const
-
void setAttributeDeleteFunctor(AttributeDeleteFunctor* adf)
- set an alternative AttributeDeleteFunction to handle attribute arrays attached to this Geoset
-
AttributeDeleteFunctor* getAttributeDeleteFunctor()
- get the current AttributeDeleteFunction to handle attribute arrays attached to this Geoset
-
const AttributeDeleteFunctor* getAttributeDeleteFunctor() const
- get the current AttributeDeleteFunction to handle attribute arrays attached to this Geoset
-
bool getStats(Statistics &)
- Statistics collection for each drawable- 260901
-
virtual AttributeBitMask suppportsAttributeOperation() const
- return the attributes supported by applyAttrbuteUpdate() as an AttributeBitMask
-
virtual AttributeBitMask applyAttributeOperation(AttributeFunctor& auf)
- return the attributes successully applied in applyAttributeUpdate
Public Members
-
enum PrimitiveType
-
enum BindingType
-
enum InterleaveArrayType
-
struct IndexPointer
-
struct AttributeDeleteFunctor: public osg::Referenced
- function object which is used to handling the clean up of attribute arrays associated with GeoSet's.
Protected Fields
-
ref_ptr<AttributeDeleteFunctor> _adf
-
int _numprims
-
PrimitiveType _primtype
-
int _needprimlen
-
unsigned int _oglprimtype
-
int* _primLengths
-
mutable unsigned char _primlength
-
unsigned char _flat_shaded_skip
-
mutable int _numcoords
-
Vec3* _coords
-
IndexPointer _cindex
-
BindingType _normal_binding
-
mutable int _numnormals
-
Vec3* _normals
-
IndexPointer _nindex
-
BindingType _color_binding
-
mutable int _numcolors
-
Vec4* _colors
-
IndexPointer _colindex
-
BindingType _texture_binding
-
mutable int _numtcoords
-
Vec2* _tcoords
-
IndexPointer _tindex
-
void* _iarray
-
IndexPointer _iaindex
-
InterleaveArrayType _iaformat
-
unsigned int _ogliaformat
-
int _fast_path
Protected Methods
-
GeoSet& operator = (const GeoSet&)
-
virtual ~GeoSet()
-
virtual const bool computeBound() const
-
void set_fast_path( void )
-
void draw_fast_path( void )
-
void draw_alternate_path( void )
Public Methods
-
inline const ParentList& getParents() const
-
inline ParentList getParents()
-
inline Node* getParent(const int i)
-
inline const Node* getParent(const int i) const
-
inline const int getNumParents() const
-
inline void setStateSet(StateSet* state)
-
inline StateSet* getStateSet()
-
inline const StateSet* getStateSet() const
-
void setSupportsDisplayList(const bool flag)
-
inline const bool getSupportsDisplayList() const
-
void setUseDisplayList(const bool flag)
-
inline const bool getUseDisplayList() const
-
void dirtyDisplayList()
-
void dirtyBound()
-
inline const BoundingBox& getBound() const
-
void compile(State& state)
-
void setDrawCallback(DrawCallback* dc)
-
DrawCallback* getDrawCallback()
-
const DrawCallback* getDrawCallback() const
-
void setCullCallback(CullCallback* cc)
-
CullCallback* getCullCallback()
-
const CullCallback* getCullCallback() const
-
static void deleteDisplayList(uint contextID, uint globj)
-
static void flushDeletedDisplayLists(uint contextID)
-
inline void draw(State& state)
Public Members
-
typedef std::vector<Node*> ParentList
-
struct DrawCallback: public osg::Referenced
-
struct CullCallback: public osg::Referenced
-
typedef uint AttributeBitMaskenum AttributeBitMaskValues
-
class AttributeFunctor
Protected Fields
-
ParentList _parents
-
ref_ptr<StateSet> _dstate
-
bool _supportsDisplayList
-
bool _useDisplayList
-
mutable BoundingBox _bbox
-
mutable bool _bbox_computed
-
ref_ptr<DrawCallback> _drawCallback
-
ref_ptr<CullCallback> _cullCallback
Protected Methods
-
void addParent(osg::Node* node)
-
void removeParent(osg::Node* node)
Protected Members
-
typedef std::vector<uint> GLObjectList mutable GLObjectList _globjList
-
typedef std::map<uint,std::set<uint> >static DeletedDisplayListCache DeletedDisplayListCache s_deletedDisplayListCache
Inherited from Object:
Public Methods
-
inline void setDataVariance(const DataVariance dv)
-
inline const DataVariance getDataVariance() const
Public Members
-
enum DataVariance
Protected Fields
-
DataVariance _dataVariance
Public Methods
-
inline void ref() const
-
inline void unref() const
-
inline void unref_nodelete() const
-
inline const int referenceCount() const
Protected Fields
-
mutable int _refCount
Documentation
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.
- enum PrimitiveType
- NO_TYPE
- POINTS
- LINES
- LINE_STRIP
- FLAT_LINE_STRIP
- LINE_LOOP
- TRIANGLES
- TRIANGLE_STRIP
- FLAT_TRIANGLE_STRIP
- TRIANGLE_FAN
- FLAT_TRIANGLE_FAN
- QUADS
- QUAD_STRIP
- POLYGON
- enum BindingType
- BIND_OFF
- BIND_OVERALL
- BIND_PERPRIM
- BIND_PERVERTEX
- BIND_DEFAULT
- enum InterleaveArrayType
- IA_OFF
- IA_V2F
- IA_V3F
- IA_C4UB_V2F
- IA_C4UB_V3F
- IA_C3F_V3F
- IA_N3F_V3F
- IA_C4F_N3F_V3F
- IA_T2F_V3F
- IA_T4F_V4F
- IA_T2F_C4UB_V3F
- IA_T2F_C3F_V3F
- IA_T2F_N3F_V3F
- IA_T2F_C4F_N3F_V3F
- IA_T4F_C4F_N3F_V4F
- struct IndexPointer
- mutable uint _size
- bool _is_ushort
- union
- ushort* _ushort
- uint* _uint
- IndexPointer()
- inline const bool operator == (const IndexPointer& ip) const
- inline const bool valid() const
- inline const bool null() const
- inline void setToNull()
- inline void set(uint size, ushort* data)
- void set(const uint size, uint* data)
- inline const uint maxIndex() const
- inline const uint operator [] (const uint pos) const
- GeoSet()
- GeoSet(const GeoSet& geoset, 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* className() const
- inline void setNumPrims( const int n )
- inline const int getNumPrims() const
- void setPrimType( const PrimitiveType type )
- inline const PrimitiveType getPrimType() const
- inline void setPrimLengths( int* lens )
- inline int* getPrimLengths()
- inline const int* getPrimLengths() const
- void computeNumVerts() const
- inline const int getNumCoords() const
- get the number of coords required by the defined primitives.
- inline Vec3* getCoords()
- get a pointer to Vec3 coord array.
- inline const Vec3* getCoords() const
- get a const pointer to Vec3 coord array.
- inline const int getNumCoordIndices() const
- get the number of indices required by the defined primitives.
- inline IndexPointer& getCoordIndices()
- get the coord index array.
- inline const IndexPointer& getCoordIndices() const
- get the const coord index array.
- void setCoords( Vec3* cp )
- set the coords (ie the geometry) of the geoset
- void setCoords( Vec3* cp, ushort* 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.
- void setCoords( Vec3* cp, uint* 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.
- void setCoords( Vec3* cp, IndexPointer& ip )
- set the coords (ie the geometry) and indices of the geoset
- inline const int getNumNormals() const
- get the number of normals required by the defined primitives and normals binding
- inline Vec3* getNormals()
- get a pointer to Vec3 normal array.
- inline const Vec3* getNormals() const
- get a const pointer to Vec3 normal array.
- inline int getNumNormalIndices() const
- get the number of normal indices required by the defined primitives and normals binding
- inline IndexPointer& getNormalIndices()
- get the normal index array.
- inline const IndexPointer& getNormalIndices() const
- get the const normal index array.
- void setNormals( Vec3* np )
- set the normals of the geoset
- void setNormals( Vec3* np, ushort* ni )
- set the normals and normal indices of the geoset
- void setNormals( Vec3* np, uint* ni )
- set the normals and normal indices of the geoset
- void setNormals( Vec3* np, IndexPointer& ip )
- set the normals and normal indices of the geoset
- void setNormalBinding( const BindingType binding )
- set the normals binding to the vertices/primitives/overall
- inline const BindingType getNormalBinding() const
- inline const int getNumColors() const
- get the number of colors required by the defined primitives and color binding
- inline Vec4* getColors()
- get a pointer to Vec4 color array.
- inline const Vec4* getColors() const
- get a pointer to Vec4 color array.
- inline int getNumColorIndices() const
- get the number of colors indices required by the defined primitives and color binding
- inline IndexPointer& getColorIndices()
- get the color index array.
- inline const IndexPointer& getColorIndices() const
- get the const color index array.
- void setColors( Vec4* cp )
- set the colors of the geoset
- void setColors( Vec4* cp, ushort* li )
- set the colors and color indices of the geoset
- void setColors( Vec4* cp, uint* li )
- set the colors and color indices of the geoset
- void setColors( Vec4* cp, IndexPointer& ip )
- set the colors and color indices of the geoset
- void setColorBinding( const BindingType binding )
- set the color binding to the vertices/primitives/overall
- inline BindingType getColorBinding() const
- inline const int getNumTextureCoords() const
- get the number of texture coords required by the defined primitives and textures binding
- inline Vec2* getTextureCoords()
- get a pointer to Vec4 color array.
- inline const Vec2* getTextureCoords() const
- get a pointer to Vec4 color array.
- inline const int getNumTextureIndices() const
- get the number of texture coord indices required by the defined primitives and texture binding
- inline IndexPointer& getTextureIndices()
- get the texture index array.
- inline const IndexPointer& getTextureIndices() const
- get the texture index array.
- void setTextureCoords( Vec2* tc )
- set the texture coords of the geoset
- void setTextureCoords( Vec2* tc, ushort* ti )
- set the texture coords and texture coord indices of the geoset
- void setTextureCoords( Vec2* tc, uint* ti )
- set the texture coords and texture coord indices of the geoset
- void setTextureCoords( Vec2* tc, IndexPointer& ip )
- set the texture coords and texture indices of the geoset
- void setTextureBinding( const BindingType binding )
- set the texture coord binding to the vertices/primitives/overall
- inline const BindingType getTextureBinding() const
- inline const int getNumInterleavedCoords() const
- get the number of texture coords required by the defined primitives and textures binding
- inline void* getInterleavedArray()
- get a pointer to interleaved float array.
- inline const void* getInterleavedArray() const
- get a const pointer to interleaved float array.
- inline const int getNumInterleavedIndices() const
- get the number of texture coord indices required by the defined primitives and texture binding
- inline IndexPointer& getInterleavedIndices()
- get the texture index array.
- inline const IndexPointer& getInterleavedIndices() const
- get the interleaved index array.
- inline const InterleaveArrayType getInterleavedFormat() const
- get the interleaved array storage format.
- void setInterleavedArray( const InterleaveArrayType format, float* ia )
- set the interleaved arrays of the geoset
- void setInterleavedArray( const InterleaveArrayType format, float* ia, ushort* iai )
- void setInterleavedArray( const InterleaveArrayType format, float* ia, uint* iai )
- void setInterleavedArray( const InterleaveArrayType format, float* ia, IndexPointer& iai )
- virtual 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.
- const bool check() const
- struct 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.
- virtual void operator() (GeoSet* gset)
- void setAttributeDeleteFunctor(AttributeDeleteFunctor* adf)
- set an alternative AttributeDeleteFunction to handle attribute arrays attached to this Geoset
- AttributeDeleteFunctor* getAttributeDeleteFunctor()
- get the current AttributeDeleteFunction to handle attribute arrays attached to this Geoset
- const AttributeDeleteFunctor* getAttributeDeleteFunctor() const
- get the current AttributeDeleteFunction to handle attribute arrays attached to this Geoset
- bool getStats(Statistics &)
- Statistics collection for each drawable- 260901
- virtual AttributeBitMask suppportsAttributeOperation() const
- return the attributes supported by applyAttrbuteUpdate() as an AttributeBitMask
- virtual AttributeBitMask applyAttributeOperation(AttributeFunctor& auf)
- return the attributes successully applied in applyAttributeUpdate
- GeoSet& operator = (const GeoSet&)
- virtual ~GeoSet()
- virtual const bool computeBound() const
- ref_ptr<AttributeDeleteFunctor> _adf
- int _numprims
- PrimitiveType _primtype
- int _needprimlen
- unsigned int _oglprimtype
- int* _primLengths
- mutable unsigned char _primlength
- unsigned char _flat_shaded_skip
- mutable int _numcoords
- Vec3* _coords
- IndexPointer _cindex
- BindingType _normal_binding
- mutable int _numnormals
- Vec3* _normals
- IndexPointer _nindex
- BindingType _color_binding
- mutable int _numcolors
- Vec4* _colors
- IndexPointer _colindex
- BindingType _texture_binding
- mutable int _numtcoords
- Vec2* _tcoords
- IndexPointer _tindex
- void* _iarray
- IndexPointer _iaindex
- InterleaveArrayType _iaformat
- unsigned int _ogliaformat
- int _fast_path
- void set_fast_path( void )
- void draw_fast_path( void )
- void draw_alternate_path( void )
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.