00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _SO_INDEXED_TRIANGLE_SET_
00026 #define _SO_INDEXED_TRIANGLE_SET_
00027
00028 #include <Inventor/nodes/SoIndexedShape.h>
00029 #include <Inventor/SbPImpl.h>
00030
00031 class SoNormalBundle;
00032 class SoShapeStyleElement;
00033 class SoVolumeIndexedTriangleSet;
00034
00035 SO_PIMPL_PUBLIC_DECLARATION(SoIndexedTriangleSet)
00036
00037
00118 class SoIndexedTriangleSet : public SoIndexedShape
00119 {
00120 SO_NODE_HEADER(SoIndexedTriangleSet);
00121 SO_PIMPL_PUBLIC_HEADER(SoIndexedTriangleSet)
00122
00123 public:
00124
00125
00129 SoIndexedTriangleSet();
00130
00131 private:
00132
00133
00135 virtual void GLRender( SoGLRenderAction* action );
00136
00138 virtual void generateDefaultNormals( SoState* state,
00139 const SbVec3f* coords,
00140 int numCoords,
00141 SoNormalBundle* nb,
00142 SbBool storeRef = FALSE );
00143
00145 virtual void shouldGenerateTangents( SoGLRenderAction* , const SoShapeStyleElement* ) {}
00146
00148 virtual void getPrimitiveCount( SoGetPrimitiveCountAction* action );
00149
00150 private:
00151
00153 static void initClass();
00154
00156 static void exitClass();
00157
00158
00159 virtual void notify( SoNotList* list );
00160
00161
00162
00163 virtual int getNumPrim( SoState* state = NULL );
00164
00165 private:
00166
00167
00168 enum Binding {
00169 OVERALL, PER_FACE, PER_FACE_INDEXED, PER_VERTEX,
00170 PER_VERTEX_INDEXED
00171 };
00172
00173 virtual SbBool shouldGenerateTexture3DCoordinates(){return TRUE;}
00174
00175 virtual void callSetupIndices( SoState* state, const SoShapeStyleElement* shapeStyle, uint32_t useTexCoordsAnyway );
00176
00177
00178 virtual SbBool checkTex3Coords(){return TRUE;}
00179
00180 int getNumPrim( SoState* state, int& _numTris );
00181
00182 virtual void countPrim( SoState* state = NULL );
00183
00184
00185 virtual void generatePrimitives( SoAction* action);
00186
00187
00188 virtual void doRendering(SoGLRenderAction* action, const SoShapeStyleElement* shapeStyle);
00189
00190
00191 virtual SoDetail *createTriangleDetail( SoRayPickAction* action,
00192 const SoPrimitiveVertex* v1,
00193 const SoPrimitiveVertex* v2,
00194 const SoPrimitiveVertex* v3,
00195 SoPickedPoint* pp);
00196
00197
00198 virtual ~SoIndexedTriangleSet();
00199
00200 private:
00201
00202 friend class SoVolumeIndexedTriangleSetDl;
00203 friend class SoVolumeIndexedTriangleSet;
00204 };
00205
00206 #endif
00207
00208
00209