00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _SO_EXTRUSION_
00025 #define _SO_EXTRUSION_
00026
00027 #include <Inventor/fields/SoSFFloat.h>
00028 #include <Inventor/fields/SoSFBool.h>
00029 #include <Inventor/fields/SoMFVec2f.h>
00030 #include <Inventor/fields/SoMFRotation.h>
00031 #include <Inventor/fields/SoMFVec3f.h>
00032
00033 #include <Inventor/nodes/SoBaseExtrusion.h>
00034 #include <Inventor/STL/memory>
00035
00036 class SoNormalBundle;
00037 class SoState;
00038 class SoExtrusionImpl;
00039
00041
00042
00043
00044
00045
00047
00229 class SoExtrusion : public SoBaseExtrusion {
00230
00231 SO_NODE_HEADER(SoExtrusion);
00232
00233 public:
00234
00235
00236
00242 SoMFVec2f crossSection;
00243
00251 SoMFRotation orientation;
00252
00259 SoMFVec2f scale;
00260
00264 SoExtrusion();
00265
00266
00267 private:
00268
00269
00271 virtual void doAction( SoAction *action );
00272
00274 virtual void callback( SoCallbackAction *action );
00275
00277 virtual void rayPick( SoRayPickAction *action );
00278
00280 virtual void getPrimitiveCount( SoGetPrimitiveCountAction *action );
00281
00283 virtual void computeBBox( SoAction *action, SbBox3f &box, SbVec3f ¢er );
00284
00286 virtual void computeBBox( SoAction *action, SbXfBox3d &box, SbVec3d ¢er );
00287
00288 private:
00289
00291 virtual void notify( SoNotList *list );
00292
00294 static void initClass();
00295
00297 static void exitClass();
00298
00300 void flagModified();
00301
00303 void setMaterialIndices(const std::vector<int>& useColorIndices, bool addFirst, bool addLast);
00304
00305 private:
00306
00308 virtual void generatePrimitives( SoAction *action );
00309
00311 virtual ~SoExtrusion();
00312
00313 private:
00314
00315
00316 SbBool generateDefaultNormals( SoState *state, int numcols,
00317 int numrows, SbVec3f *verts,
00318 SoNormalBundle *nb );
00319
00320 SoExtrusionImpl* m_impl;
00321
00322 };
00323
00324 #endif
00325
00326