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 #include <Inventor/SbPImpl.h>
00036
00037 class SoNormalBundle;
00038 class SoState;
00039
00040 SO_PIMPL_PUBLIC_DECLARATION(SoExtrusion)
00041
00042
00043
00044
00045
00046
00047
00049
00230 class SoExtrusion : public SoBaseExtrusion
00231 {
00232 SO_NODE_HEADER(SoExtrusion);
00233 SO_PIMPL_PUBLIC_HEADER(SoExtrusion)
00234
00235 public:
00236
00237
00238
00244 SoMFVec2f crossSection;
00245
00253 SoMFRotation orientation;
00254
00261 SoMFVec2f scale;
00262
00266 SoExtrusion();
00267
00268
00269 private:
00270
00271
00273 virtual void doAction( SoAction *action );
00274
00276 virtual void callback( SoCallbackAction *action );
00277
00279 virtual void rayPick( SoRayPickAction *action );
00280
00282 virtual void getPrimitiveCount( SoGetPrimitiveCountAction *action );
00283
00285 virtual void computeBBox( SoAction *action, SbBox3f &box, SbVec3f ¢er );
00286
00288 virtual void computeBBox( SoAction *action, SbXfBox3d &box, SbVec3d ¢er );
00289
00290 private:
00291
00293 virtual void notify( SoNotList *list );
00294
00296 static void initClass();
00297
00299 static void exitClass();
00300
00302 void flagModified();
00303
00305 void setMaterialIndices(const std::vector<int>& useColorIndices, bool addFirst, bool addLast);
00306
00307 private:
00308
00310 virtual void generatePrimitives( SoAction *action );
00311
00313 virtual ~SoExtrusion();
00314
00315 private:
00316
00317
00318 SbBool generateDefaultNormals( SoState *state, int numcols,
00319 int numrows, SbVec3f *verts,
00320 SoNormalBundle *nb );
00321
00322 void commonConstructor();
00323 };
00324
00325 #endif
00326
00327