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>

Public Member Functions

 SoVertexArrayIndexer (GLenum type)
 create vertex array indexer for given GL primitives (GL_LINES, GL_TRIANGLES, GL_QUADS, ...) More...
 
 ~SoVertexArrayIndexer ()
 
void setType (GLenum type)
 set the type More...
 
GLenum getType () const
 get the type More...
 
void clear ()
 frees the allocated data More...
 
void freeGL (SoState *state=NULL)
 free the GL part of the SoVertexArrayIndexer (if state is passed, the VBO may be deleted immediately) More...
 
void render (SoState *state, bool useVbo)
 render the primitives (uses a VBO if useVbo is passed in) More...
 
SbNodeIdType getDataId () const
 get the node id of the data More...
 
void setInventorTriangles (int numTriangles, const int32_t *inventorIndices, SbNodeIdType nodeId)
 set the triangles from inventor (3 indices separated by -1), does an internal copy without -1 More...
 
void setInventorQuads (int numQuads, const int32_t *inventorIndices, SbNodeIdType nodeId)
 set the triangles from inventor (4 indices separated by -1), does an internal copy without -1 More...
 
void setInventorLines (int numLines, const int32_t *inventorIndices, SbNodeIdType nodeId)
 set the triangles from inventor (2 indices separated by -1), does an internal copy without -1 More...
 
void setIndices (int numIndices, const int32_t *indices, SbNodeIdType 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. More...
 

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::SoVertexArrayIndexer ( GLenum  type)

◆ ~SoVertexArrayIndexer()

SoVertexArrayIndexer::~SoVertexArrayIndexer ( )

Member Function Documentation

◆ clear()

void SoVertexArrayIndexer::clear ( )

◆ freeGL()

void SoVertexArrayIndexer::freeGL ( SoState state = NULL)

◆ getDataId()

SbNodeIdType SoVertexArrayIndexer::getDataId ( ) const
inline

Definition at line 79 of file SoVertexArrayIndexer.h.

◆ getType()

GLenum SoVertexArrayIndexer::getType ( ) const
inline

Definition at line 67 of file SoVertexArrayIndexer.h.

◆ render()

void SoVertexArrayIndexer::render ( SoState state,
bool  useVbo 
)

◆ setIndices()

void SoVertexArrayIndexer::setIndices ( int  numIndices,
const int32_t indices,
SbNodeIdType  nodeId 
)

◆ setInventorLines()

void SoVertexArrayIndexer::setInventorLines ( int  numLines,
const int32_t inventorIndices,
SbNodeIdType  nodeId 
)

◆ setInventorQuads()

void SoVertexArrayIndexer::setInventorQuads ( int  numQuads,
const int32_t inventorIndices,
SbNodeIdType  nodeId 
)

◆ setInventorTriangles()

void SoVertexArrayIndexer::setInventorTriangles ( int  numTriangles,
const int32_t inventorIndices,
SbNodeIdType  nodeId 
)

◆ setType()

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: