glc_disc.h

Go to the documentation of this file.
00001 /****************************************************************************
00002 
00003  This file is part of the GLC-lib library.
00004  Copyright (C) 2005-2008 Laurent Ribon (laumaya@users.sourceforge.net)
00005  http://glc-lib.sourceforge.net
00006 
00007  GLC-lib is free software; you can redistribute it and/or modify
00008  it under the terms of the GNU Lesser General Public License as published by
00009  the Free Software Foundation; either version 3 of the License, or
00010  (at your option) any later version.
00011 
00012  GLC-lib is distributed in the hope that it will be useful,
00013  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  GNU Lesser General Public License for more details.
00016 
00017  You should have received a copy of the GNU Lesser General Public License
00018  along with GLC-lib; if not, write to the Free Software
00019  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00020 
00021  *****************************************************************************/
00023 
00024 #ifndef GLC_DISC_H_
00025 #define GLC_DISC_H_
00026 
00027 #include "glc_mesh.h"
00028 #include "../glc_config.h"
00029 
00032 
00035 
00036 class GLC_LIB_EXPORT GLC_Disc : public GLC_Mesh
00037 {
00039 
00041 
00042 public:
00044         GLC_Disc(double radius, double angle= 2.0 * glc::PI);
00045 
00047         GLC_Disc(const GLC_Disc& disc);
00048 
00050         virtual ~GLC_Disc();
00052 
00054 
00056 
00057 public:
00059         virtual const GLC_BoundingBox& boundingBox(void);
00060 
00062         virtual GLC_Geometry* clone() const;
00063 
00065         inline double radius() const
00066         {return m_Radius;}
00067 
00069         inline int discretion() const
00070         {return m_Discret;}
00071 
00073         inline double angle() const
00074         {return m_Angle;}
00075 
00076 
00078 
00080 
00082 
00083 public:
00085         GLC_Disc& operator=(const GLC_Disc& disc);
00086 
00088         void setRadius(double radius);
00089 
00091         void setDiscretion(int targetDiscret);
00092 
00094         void setAngle(double angle);
00095 
00097 
00099 
00101 
00102 private:
00104 
00106         virtual void glDraw(const GLC_RenderProperties&);
00108 
00110 
00112 
00113 private:
00115         void createMeshAndWire();
00116 
00118 
00120 // Private members
00122 private:
00124         double m_Radius;
00125 
00127         int m_Discret;
00128 
00130         double m_Angle;
00131 
00133         GLuint m_Step;
00134 
00135 };
00136 
00137 #endif /* GLC_DISC_H_ */

SourceForge.net Logo

©2005-2011 Laurent Ribon