55#ifndef _SO_INDEXED_SHAPE_
56#define _SO_INDEXED_SHAPE_
181 bool needNormals,
bool needTexCoords);
185 {
return (normalI ? normalI : consecutiveIndices); }
187 {
return (colorI ? colorI : consecutiveIndices); }
189 {
return (texCoordI ? texCoordI : consecutiveIndices); }
200 void allocateSequential(
int howMany);
201 int32_t* allocateSequentialWithHoles();
207 static int32_t *consecutiveIndices;
208 static int numConsecutiveIndicesAllocated;
210 unsigned char materialBinding;
211 unsigned char normalBinding;
212 unsigned char texCoordBinding;
#define INVENTOR_API
Disable some annoying warnings on MSVC 6.
#define SO_NODE_ABSTRACT_HEADER(className)
Macros to be called within the class definition header for a node subclass:
Abstract base class for all actions.
Abstract base class for all indexed vertex-based shapes.
SoMFInt32 normalIndex
Surface normal indices.
static bool areTexCoordsIndexed(SoAction *action)
Returns TRUE if texture coordinates should be indexed.
void setupIndices(int numParts, int numFaces, bool needNormals, bool needTexCoords)
Setup for fast rendering.
virtual void notify(SoNotList *list)
Keep indices up to date if things change.
SoMFInt32 coordIndex
The indices of the coordinates that the shape uses as its vertices.
virtual ~SoIndexedShape()
SoIndexedShape()
Constructor - makes this abstract.
const int32_t * getNormalIndices()
These must not be called unless setupIndices has been called first:
virtual void computeBBox(SoAction *action, SbBox3f &box, SbVec3f ¢er)
This handles bounding box computation for all shapes derived from this class.
SoMFInt32 textureCoordIndex
Texture Coordinate indices.
const int32_t * getTexCoordIndices()
SoMFInt32 materialIndex
Material indices.
int getNumVerts(int startCoord)
Starting at a given index in the coordIndex array, figure out how many vertices there are before eith...
const int32_t * getColorIndices()
Multiple-value field containing any number of int32_t integers.
Holds a list of SoNotRec notification records.
Abstract base class for all vertex-based shape nodes.