00001
00002
00004
00005 #ifndef FRAME_NODE_H
00006 #define FRAME_NODE_H
00007
00008 #include <QGLViewer/frame.h>
00009
00010 #include <animal/X3DTK/X4DNode.h>
00011
00012
00013
00014
00015
00016 #include <animal/engine/engine.h>
00017 #include <animal/engine/EngineNode.h>
00018
00019 namespace X3DTK {
00020
00021 namespace X3D {
00022
00028 class FrameNode : public EngineNode,
00029 public animal::Engine,
00030 public qglviewer::Frame
00031
00032
00033 {
00034 public:
00036 FrameNode();
00037
00039 ~FrameNode();
00040
00041
00043
00044
00047
00049 virtual void init();
00050
00052
00053
00055
00056
00058 virtual void draw();
00059
00061 virtual void updateBoundingBox();
00062
00064
00065
00066
00068 void updateFrame();
00070 void updateTransform();
00072 void updateFrameNode();
00073 void declareOutputs( X3D_X3DNodeList& list);
00074
00075 protected:
00076
00078 virtual void getBoundingBox( float & minX, float & minY, float & minZ,
00079 float & maxX, float & maxY, float & maxZ);
00080
00081 private:
00082 void drawCone(float radius, float height, int nbSub);
00083 void drawCylinder(float radius, float length, int nbSub);
00084
00085 public:
00086 SFVec3f translation;
00087 SFRotation rotation;
00088 SFVec3f scale;
00089 SFRotation scaleOrientation;
00090 SFVec3f center;
00092 float swollen;
00093
00094 protected:
00096 Transform * x3dTransformNode;
00097
00098 private:
00102 float size;
00103
00104 };
00105
00106 }
00107
00108 }
00109
00110 #endif
00111
00112