Open Inventor Reference
SoVertexArrayIndexer Class Reference

SoVertexArrayIndexer is a class that manages rendering of indexed primitives using Vertex Array rendering. More...

#include <Inventor/misc/SoVertexArrayIndexer.h>

List of all members.

Public Member Functions

 SoVertexArrayIndexer (GLenum type)
 create vertex array indexer for given GL primitives (GL_LINES, GL_TRIANGLES, GL_QUADS, ...)
 ~SoVertexArrayIndexer ()
void setType (GLenum type)
 set the type
GLenum getType () const
 get the type
void clear ()
 frees the allocated data
void freeGL (SoState *state=NULL)
 free the GL part of the SoVertexArrayIndexer (if state is passed, the VBO may be deleted immediately)
void render (SoState *state, bool useVbo)
 render the primitives (uses a VBO if useVbo is passed in)
uint32_t getDataId () const
 get the node id of the data
void setInventorTriangles (int numTriangles, const int32_t *inventorIndices, uint32_t nodeId)
 set the triangles from inventor (3 indices separated by -1), does an internal copy without -1
void setInventorQuads (int numQuads, const int32_t *inventorIndices, uint32_t nodeId)
 set the triangles from inventor (4 indices separated by -1), does an internal copy without -1
void setInventorLines (int numLines, const int32_t *inventorIndices, uint32_t nodeId)
 set the triangles from inventor (2 indices separated by -1), does an internal copy without -1
void setIndices (int numIndices, const int32_t *indices, uint32_t nodeId)
 set the indices, the ownership stays with the caller and the caller has to make sure that the indices still live when further methods of this instance are called.

Detailed Description

The indices can optionally be cached in a VBO, so that they do not need to be send on each render call. This class is mainly needed because the OIV index structures typically contain -1 as marker for the end of each primitive, which is undesired for sending indices to OpenGL. Currently a single indexer only manages the kind of primitives that are passed in the constructor. (MeVis ONLY)

Definition at line 56 of file SoVertexArrayIndexer.h.


Constructor & Destructor Documentation

SoVertexArrayIndexer::SoVertexArrayIndexer ( GLenum  type)
SoVertexArrayIndexer::~SoVertexArrayIndexer ( )

Member Function Documentation

void SoVertexArrayIndexer::clear ( )
void SoVertexArrayIndexer::freeGL ( SoState state = NULL)
uint32_t SoVertexArrayIndexer::getDataId ( ) const [inline]

Definition at line 79 of file SoVertexArrayIndexer.h.

GLenum SoVertexArrayIndexer::getType ( ) const [inline]

Definition at line 67 of file SoVertexArrayIndexer.h.

void SoVertexArrayIndexer::render ( SoState state,
bool  useVbo 
)
void SoVertexArrayIndexer::setIndices ( int  numIndices,
const int32_t indices,
uint32_t  nodeId 
)
void SoVertexArrayIndexer::setInventorLines ( int  numLines,
const int32_t inventorIndices,
uint32_t  nodeId 
)
void SoVertexArrayIndexer::setInventorQuads ( int  numQuads,
const int32_t inventorIndices,
uint32_t  nodeId 
)
void SoVertexArrayIndexer::setInventorTriangles ( int  numTriangles,
const int32_t inventorIndices,
uint32_t  nodeId 
)
void SoVertexArrayIndexer::setType ( GLenum  type) [inline]

Definition at line 64 of file SoVertexArrayIndexer.h.


The documentation for this class was generated from the following file: