Public Types |
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
} |
Public Methods |
| GeoSet () |
| GeoSet (const GeoSet &geoset, const CopyOp ©op=CopyOp::SHALLOW_COPY) |
| Copy constructor using CopyOp to manage deep vs shallow copy.
|
virtual Object * | cloneType () const |
| Clone the type of an object, with Object* return type.
|
virtual Object * | clone (const CopyOp ©op) const |
| Clone the an object, with Object* return type.
|
virtual bool | isSameKindAs (const Object *obj) const |
virtual const char * | libraryName () const |
| return the name of the object's library.
|
virtual const char * | className () const |
| return the name of the object's class type.
|
void | setNumPrims (const int n) |
const int | getNumPrims () const |
void | setPrimType (const PrimitiveType type) |
const PrimitiveType | getPrimType () const |
void | setPrimLengths (int *lens) |
int * | getPrimLengths () |
const int * | getPrimLengths () const |
void | computeNumVerts () const |
const int | getNumCoords () const |
| get the number of coords required by the defined primitives.
|
Vec3 * | getCoords () |
| get a pointer to Vec3 coord array.
|
const Vec3 * | getCoords () const |
| get a const pointer to Vec3 coord array.
|
const int | getNumCoordIndices () const |
| get the number of indices required by the defined primitives.
|
IndexPointer & | getCoordIndices () |
| get the coord index array.
|
const IndexPointer & | getCoordIndices () const |
| get the const coord index array.
|
void | setCoords (Vec3 *cp) |
| set the coords (i.e the geometry) of the geoset.
|
void | setCoords (Vec3 *cp, GLushort *ci) |
| set the coords (i.e the geometry) and ushort indices of the geoset.
|
void | setCoords (Vec3 *cp, GLuint *ci) |
| set the coords (i.e the geometry) and uint indices of the geoset.
|
void | setCoords (Vec3 *cp, IndexPointer &ip) |
| set the coords (i.e the geometry) and indices of the geoset.
|
const int | getNumNormals () const |
| get the number of normals required by the defined primitives and normals binding.
|
Vec3 * | getNormals () |
| get a pointer to Vec3 normal array.
|
const Vec3 * | getNormals () const |
| get a const pointer to Vec3 normal array.
|
int | getNumNormalIndices () const |
| get the number of normal indices required by the defined primitives and normals binding.
|
IndexPointer & | getNormalIndices () |
| get the normal index array.
|
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 (const BindingType binding) |
| set the normals binding to the vertices/primitives/overall.
|
const BindingType | getNormalBinding () const |
const int | getNumColors () const |
| get the number of colors required by the defined primitives and color binding.
|
Vec4 * | getColors () |
| get a pointer to Vec4 color array.
|
const Vec4 * | getColors () const |
| get a pointer to Vec4 color array.
|
int | getNumColorIndices () const |
| get the number of colors indices required by the defined primitives and color binding.
|
IndexPointer & | getColorIndices () |
| get the color index array.
|
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 (const BindingType binding) |
| set the color binding to the vertices/primitives/overall.
|
BindingType | getColorBinding () const |
const int | getNumTextureCoords () const |
| get the number of texture coords required by the defined primitives and textures binding.
|
Vec2 * | getTextureCoords () |
| get a pointer to Vec4 color array.
|
const Vec2 * | getTextureCoords () const |
| get a pointer to Vec4 color array.
|
const int | getNumTextureIndices () const |
| get the number of texture coord indices required by the defined primitives and texture binding.
|
IndexPointer & | getTextureIndices () |
| get the texture index array.
|
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 (const BindingType binding) |
| set the texture coord binding to the vertices/primitives/overall.
|
const BindingType | getTextureBinding () const |
const int | getNumInterleavedCoords () const |
| get the number of texture coords required by the defined primitives and textures binding.
|
void * | getInterleavedArray () |
| get a pointer to interleaved float array.
|
const void * | getInterleavedArray () const |
| get a const pointer to interleaved float array.
|
const int | getNumInterleavedIndices () const |
| get the number of texture coord indices required by the defined primitives and texture binding.
|
IndexPointer & | getInterleavedIndices () |
| get the texture index array.
|
const IndexPointer & | getInterleavedIndices () const |
| get the interleaved index array.
|
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, GLushort *iai) |
void | setInterleavedArray (const InterleaveArrayType format, float *ia, GLuint *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.
|
virtual void | accept (AttributeFunctor &af) |
| accept an AttributeFunctor and call its methods to tell it about the interal attributes that this Drawable has.
|
virtual void | accept (PrimitiveFunctor &pf) |
| 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.
|
Protected Methods |
GeoSet & | operator= (const GeoSet &) |
virtual | ~GeoSet () |
virtual const bool | computeBound () const |
| compute the bounding box of the drawable.
|
void | set_fast_path (void) |
void | draw_fast_path (State &state) |
void | draw_alternate_path (State &state) |
Protected Attributes |
ref_ptr< AttributeDeleteFunctor > | _adf |
int | _numprims |
PrimitiveType | _primtype |
int | _needprimlen |
unsigned int | _oglprimtype |
int * | _primLengths |
unsigned char | _primlength |
unsigned char | _flat_shaded_skip |
int | _numcoords |
Vec3 * | _coords |
IndexPointer | _cindex |
BindingType | _normal_binding |
int | _numnormals |
Vec3 * | _normals |
IndexPointer | _nindex |
BindingType | _color_binding |
int | _numcolors |
Vec4 * | _colors |
IndexPointer | _colindex |
BindingType | _texture_binding |
int | _numtcoords |
Vec2 * | _tcoords |
IndexPointer | _tindex |
void * | _iarray |
IndexPointer | _iaindex |
InterleaveArrayType | _iaformat |
unsigned int | _ogliaformat |
int | _fast_path |
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.