glc_cylinder.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00024
00025 #ifndef GLC_CYLINDER_H_
00026 #define GLC_CYLINDER_H_
00027
00028 #include "glc_mesh.h"
00029 #include "../glc_config.h"
00030
00033
00038
00039 class GLC_LIB_EXPORT GLC_Cylinder : public GLC_Mesh
00040 {
00042
00044
00045 public:
00046
00048
00052 GLC_Cylinder(double dRadius, double dLength);
00053
00055 GLC_Cylinder(const GLC_Cylinder& sourceCylinder);
00056
00058 virtual ~GLC_Cylinder();
00059
00061
00063
00065
00066 public:
00068 static quint32 chunckID();
00069
00071 inline double length(void) const
00072 {return m_Length;}
00073
00075 inline double radius(void) const
00076 {return m_Radius;}
00077
00079 inline int discretion(void) const
00080 {return m_Discret;}
00081
00083 virtual GLC_Geometry* clone() const;
00084
00086 bool EndedIsCaped() const {return m_EndedIsCaped;}
00087
00089 virtual const GLC_BoundingBox& boundingBox(void);
00090
00092
00094
00096
00097 public:
00099
00100 void setLength(double Length);
00101
00103
00104 void setRadius(double Radius);
00105
00107
00108 void setDiscretion(int TargetDiscret);
00109
00111 void setEndedCaps(bool CapsEnded);
00112
00114
00116
00118
00119 private:
00121
00123 virtual void glDraw(const GLC_RenderProperties&);
00125
00127
00129
00130 private:
00132 void createMeshAndWire();
00133
00135
00137
00139 private:
00140
00142 double m_Radius;
00143
00145 double m_Length;
00146
00148 int m_Discret;
00149
00151 bool m_EndedIsCaped;
00152
00154 static quint32 m_ChunkId;
00155
00156 };
00157 #endif //GLC_CYLINDER_H_