
|
Note, osg::GeoSet is now deprecated, please use osg::Geometry instead.
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* libraryName() const
-
virtual const char* className() const
-
inline void setNumPrims( int n )
-
inline int getNumPrims() const
-
void setPrimType( PrimitiveType type )
-
inline PrimitiveType getPrimType() const
-
inline void setPrimLengths( int* lens )
-
inline int* getPrimLengths() const
-
void computeNumVerts() const
-
inline 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 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, GLushort* ci )
- set the coords (ie the geometry) and ushort indices of the geoset.
-
void setCoords( Vec3* cp, GLuint* 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 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, GLushort* ni )
- set the normals and normal indices of the geoset
-
void setNormals( Vec3* np, GLuint* 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( BindingType binding )
- set the normals binding to the vertices/primitives/overall
-
inline BindingType getNormalBinding() const
-
inline 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, GLushort* li )
- set the colors and color indices of the geoset
-
void setColors( Vec4* cp, GLuint* 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( BindingType binding )
- set the color binding to the vertices/primitives/overall
-
inline BindingType getColorBinding() const
-
inline 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 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, GLushort* ti )
- set the texture coords and texture coord indices of the geoset
-
void setTextureCoords( Vec2* tc, GLuint* 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( BindingType binding )
- set the texture coord binding to the vertices/primitives/overall
-
inline BindingType getTextureBinding() const
-
inline 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 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 InterleaveArrayType getInterleavedFormat() const
- get the interleaved array storage format.
-
void setInterleavedArray( InterleaveArrayType format, float* ia )
- set the interleaved arrays of the geoset
-
void setInterleavedArray( InterleaveArrayType format, float* ia, GLushort* iai )
-
void setInterleavedArray( InterleaveArrayType format, float* ia, GLuint* iai )
-
void setInterleavedArray( InterleaveArrayType format, float* ia, IndexPointer& iai )
-
virtual void drawImplementation(State& state) const
- draw geoset directly ignoring an OpenGL display list which could be attached.
-
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
-
virtual bool supports(AttributeFunctor&) const
- return true, osg::GeoSet 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::GeoSet 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::GeoSet does support accept(PrimitiveFunctor&)
-
virtual void accept(PrimitiveFunctor& pf) const
- accept a PrimtiveFunctor and call its methods to tell it about the interal primtives that this Drawable has
-
Geometry* convertToGeometry()
- convinience function for converting GeoSet's to equivilant Geometry nodes
Public Members-
enum PrimitiveType
-
enum BindingType
-
enum InterleaveArrayType
-
struct SG_EXPORT IndexPointer
-
struct SG_EXPORT 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
-
mutable 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 bool computeBound() const
-
void set_fast_path( void )
-
void draw_fast_path( State& state ) const
-
void draw_alternate_path( State& state ) const
Public Methods-
virtual Geometry* asGeometry()
-
virtual const Geometry* asGeometry() const
-
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 dirtyDisplayList()
-
virtual void compile(State& state) const
-
void setUpdateCallback(UpdateCallback* ac)
-
UpdateCallback* getUpdateCallback()
-
void setAppCallback(AppCallback* ac)
-
AppCallback* getAppCallback()
-
const AppCallback* getAppCallback() const
-
void setCullCallback(CullCallback* cc)
-
CullCallback* getCullCallback()
-
const CullCallback* getCullCallback() const
-
void setDrawCallback(DrawCallback* dc)
-
DrawCallback* getDrawCallback()
-
const DrawCallback* getDrawCallback() const
-
static void deleteDisplayList(uint contextID, uint globj)
-
static void flushDeletedDisplayLists(uint contextID)
-
inline void draw(State& state) const
Public Members-
typedef std::vector<Node*> ParentList
-
struct UpdateCallback: public virtual osg::Referenced
-
struct AppCallback: public UpdateCallback
-
struct CullCallback: public virtual osg::Referenced
-
struct DrawCallback: public virtual osg::Referenced
-
enum AttributeType
-
class AttributeFunctor
-
class ConstAttributeFunctor
-
class PrimitiveFunctor
Protected Fields-
ParentList _parents
-
ref_ptr<StateSet> _stateset
-
mutable BoundingBox _bbox
-
mutable bool _bbox_computed
-
ref_ptr<Shape> _shape
-
bool _supportsDisplayList
-
bool _useDisplayList
-
mutable GLObjectList _globjList
-
ref_ptr<UpdateCallback> _updateCallback
-
ref_ptr<DrawCallback> _drawCallback
-
ref_ptr<CullCallback> _cullCallback
Protected Methods-
void addParent(osg::Node* node)
-
void removeParent(osg::Node* node)
Protected Members-
typedef osg::buffered_value<uint> 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
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.
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 SG_EXPORT IndexPointer
mutable uint _size
bool _is_ushort
union _TPtr
GLushort* _ushort
GLuint* _uint
IndexPointer()
inline bool operator == (const IndexPointer& ip) const
inline bool valid() const
inline bool null() const
inline void setToNull()
inline void set(uint size, GLushort* data)
void set(uint size, GLuint* data)
inline uint maxIndex() const
inline GLint operator [] (const GLuint 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* libraryName() const
virtual const char* className() const
inline void setNumPrims( int n )
inline int getNumPrims() const
void setPrimType( PrimitiveType type )
inline PrimitiveType getPrimType() const
inline void setPrimLengths( int* lens )
inline int* getPrimLengths() const
void computeNumVerts() const
inline 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 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, 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.
void 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.
void setCoords( Vec3* cp, IndexPointer& ip )
- set the coords (ie the geometry) and indices of the geoset
inline 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, GLushort* ni )
- set the normals and normal indices of the geoset
void setNormals( Vec3* np, GLuint* 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( BindingType binding )
- set the normals binding to the vertices/primitives/overall
inline BindingType getNormalBinding() const
inline 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, GLushort* li )
- set the colors and color indices of the geoset
void setColors( Vec4* cp, GLuint* 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( BindingType binding )
- set the color binding to the vertices/primitives/overall
inline BindingType getColorBinding() const
inline 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 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, GLushort* ti )
- set the texture coords and texture coord indices of the geoset
void setTextureCoords( Vec2* tc, GLuint* 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( BindingType binding )
- set the texture coord binding to the vertices/primitives/overall
inline BindingType getTextureBinding() const
inline 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 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 InterleaveArrayType getInterleavedFormat() const
- get the interleaved array storage format.
void setInterleavedArray( InterleaveArrayType format, float* ia )
- set the interleaved arrays of the geoset
void setInterleavedArray( InterleaveArrayType format, float* ia, GLushort* iai )
void setInterleavedArray( InterleaveArrayType format, float* ia, GLuint* iai )
void setInterleavedArray( InterleaveArrayType format, float* ia, IndexPointer& iai )
virtual 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.
bool check() const
struct SG_EXPORT 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
virtual bool supports(AttributeFunctor&) const
- return true, osg::GeoSet 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::GeoSet 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::GeoSet does support accept(PrimitiveFunctor&)
virtual void accept(PrimitiveFunctor& pf) const
- accept a PrimtiveFunctor and call its methods to tell it about the interal primtives that this Drawable has
Geometry* convertToGeometry()
- convinience function for converting GeoSet's to equivilant Geometry nodes
GeoSet& operator = (const GeoSet&)
virtual ~GeoSet()
virtual 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
mutable 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( State& state ) const
void 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++.
|