00001 00002 // GL_Sphere.h // 00004 00005 #ifndef GLSPHERE_H 00006 #define GLSPHERE_H 00007 00008 #include "GL_X3DGeometry3DNode.h" 00009 00010 namespace X3DTK { 00011 namespace GL { 00012 00013 class SphereDrawArray; 00014 00017 00018 class Sphere : public X3DGeometry3DNode 00019 { 00020 public: 00022 Sphere(); 00024 virtual SFNode clone() const; 00026 virtual ~Sphere(); 00027 00029 void setRadius(const SFFloat &radius); 00031 void setSphereDrawArray(SphereDrawArray *sphereArray); 00032 00034 inline const SFFloat &getRadius() const {return _radius;}; 00036 inline SphereDrawArray *getSphereArray() const {return _sphereArray;}; 00037 00039 virtual void update(); 00041 virtual void draw() const; 00042 00043 protected: 00045 Sphere(const Sphere &S); 00046 00047 private: 00049 SFFloat _radius; 00051 SphereDrawArray *_sphereArray; 00052 }; 00053 00054 } 00055 } 00056 00057 #endif