00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef FXGLSPHERE_H
00022 #define FXGLSPHERE_H
00023
00024 #ifndef FXGLSHAPE_H
00025 #include "FXGLShape.h"
00026 #endif
00027
00028 namespace FX {
00029
00030
00032 class FXAPI FXGLSphere : public FXGLShape {
00033 FXDECLARE(FXGLSphere)
00034 public:
00035 FXfloat radius;
00036 FXint slices;
00037 FXint stacks;
00038 protected:
00039 FXGLSphere();
00040 virtual void drawshape(FXGLViewer* viewer);
00041 public:
00042 enum {
00043 ID_LAST=FXGLShape::ID_LAST
00044 };
00045 public:
00046
00048 FXGLSphere(FXfloat x,FXfloat y,FXfloat z,FXfloat r=1.0f);
00049
00051 FXGLSphere(FXfloat x,FXfloat y,FXfloat z,FXfloat r,const FXMaterial& mtl);
00052
00054 FXGLSphere(const FXGLSphere& orig);
00055
00057 virtual FXGLObject* copy();
00058
00060 virtual void setRadius(FXfloat r);
00061 FXfloat getRadius() const { return radius; }
00062
00064 void setSlices(FXint s){ slices=s; }
00065 FXint getSlices() const { return slices; }
00066
00068 void setStacks(FXint s){ stacks=s; }
00069 FXint getStacks() const { return stacks; }
00070
00072 virtual void save(FXStream& store) const;
00073
00075 virtual void load(FXStream& store);
00076
00078 virtual ~FXGLSphere();
00079 };
00080
00081 }
00082
00083 #endif