00001 #pragma once 00002 00003 #include <Inventor/nodes/SoNode.h> 00004 #include <Inventor/nodes/SoIndexedShape.h> 00005 00007 // 00008 // Class: SoIndexedTriangleFanSet 00009 // 00010 // Indexed set of triangles fans. Fans are separated by the 00011 // special index SO_END_FAN_INDEX (-1). The N indices in the fan 00012 // define N-2 triangles, which are formed by indexing into the 00013 // current coordinates. Depending on the current material and normal 00014 // binding values, the materials and normals for the triangles or 00015 // vertices may be accessed in order or indexed. If they are indexed, 00016 // the materialIndex and normalIndex fields are used. 00017 // 00019 00020 #define SO_END_FAN_INDEX (-1) 00021 00022 SO_PIMPL_BASE_PUBLIC_DECLARATION(SoIndexedTriangleFanSet); 00023 00109 class SoIndexedTriangleFanSet : public SoIndexedShape 00110 { 00111 SO_NODE_HEADER(SoIndexedTriangleFanSet); 00112 SO_PIMPL_BASE_PUBLIC_HEADER(SoIndexedTriangleFanSet); 00113 00114 public: 00118 SoIndexedTriangleFanSet(); 00119 00123 int getNumTriangles(); 00124 00128 int getNumFans(); 00129 00130 private: 00131 virtual void GLRender(SoGLRenderAction* action); 00132 virtual void getPrimitiveCount(SoGetPrimitiveCountAction* action); 00133 virtual int getNumNeededNormals(SoState* state); 00134 virtual void generateDefaultNormals(SoState* state, 00135 const SbVec3f* coords, 00136 int numCoords, 00137 SoNormalBundle* nb, 00138 SbBool storeRef = FALSE); 00139 00141 virtual void shouldGenerateTangents( SoGLRenderAction* /*action*/, const SoShapeStyleElement* /*shapeStyle*/ ) {} 00142 00143 private: 00144 static void initClass(); 00145 static void exitClass(); 00146 virtual void notify(SoNotList* list); 00147 00148 private: 00149 virtual ~SoIndexedTriangleFanSet(); 00150 virtual void generatePrimitives(SoAction *action); 00151 };