00001 00002 // GLCylinder.h // 00004 00005 #ifndef GLCYLINDER_H 00006 #define GLCYLINDER_H 00007 00008 #include "X3DGLGeometry3DNode.h" 00009 00010 namespace X3DTK { 00011 namespace GL { 00012 00013 class CylinderDrawArray; 00014 00017 00018 class Cylinder : public X3DGeometry3DNode 00019 { 00020 public: 00022 Cylinder(); 00024 virtual SFNode clone() const; 00026 virtual ~Cylinder(); 00027 00029 void setRadius(SFFloat radius); 00031 void setHeight(SFFloat height); 00033 void setSide(SFBool side); 00035 void setBottom(SFBool bottom); 00037 void setTop(SFBool top); 00039 void setCylinderArray(CylinderDrawArray *cylinderArray); 00040 00042 inline SFFloat getRadius() const {return _radius;}; 00044 inline SFFloat getHeight() const {return _height;}; 00046 inline SFBool getSide() const {return _side;}; 00048 inline SFBool getBottom() const {return _bottom;}; 00050 inline SFBool getTop() const {return _top;}; 00052 inline CylinderDrawArray *getCylinderArray() const {return _cylinderArray;}; 00053 00055 virtual void update(); 00057 virtual void render() const; 00058 00059 protected: 00061 Cylinder(const Cylinder &C); 00062 00063 private: 00065 SFFloat _radius; 00067 SFFloat _height; 00069 SFBool _side; 00071 SFBool _bottom; 00073 SFBool _top; 00075 CylinderDrawArray *_cylinderArray; 00076 }; 00077 00078 } 00079 } 00080 00081 #endif