00001 #ifndef COIN_SOCUBE_H
00002 #define COIN_SOCUBE_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include <Inventor/nodes/SoSubNode.h>
00028 #include <Inventor/fields/SoSFFloat.h>
00029 #include <Inventor/nodes/SoShape.h>
00030
00031 class SoIndexedFaceSet;
00032
00033 class COIN_DLL_API SoCube : public SoShape {
00034 typedef SoShape inherited;
00035
00036 SO_NODE_HEADER(SoCube);
00037
00038 public:
00039 static void initClass(void);
00040 SoCube(void);
00041
00042 SoSFFloat width;
00043 SoSFFloat height;
00044 SoSFFloat depth;
00045
00046 virtual void GLRender(SoGLRenderAction * action);
00047 virtual void rayPick(SoRayPickAction * action);
00048 virtual void getPrimitiveCount(SoGetPrimitiveCountAction * action);
00049
00050 protected:
00051 virtual ~SoCube();
00052
00053 virtual void generatePrimitives(SoAction * action);
00054 virtual void computeBBox(SoAction * action, SbBox3f & box, SbVec3f & center);
00055
00056 private:
00057 void getHalfSize(float & w, float & h, float & d);
00058 };
00059
00060 #endif // !COIN_SOCUBE_H