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  Version 2.0.0 Beta 1, packaged on April 2010.
00006 
00007  http://glc-lib.sourceforge.net
00008 
00009  GLC-lib is free software; you can redistribute it and/or modify
00010  it under the terms of the GNU General Public License as published by
00011  the Free Software Foundation; either version 2 of the License, or
00012  (at your option) any later version.
00013 
00014  GLC-lib is distributed in the hope that it will be useful,
00015  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  GNU General Public License for more details.
00018 
00019  You should have received a copy of the GNU General Public License
00020  along with GLC-lib; if not, write to the Free Software
00021  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00022 
00023  *****************************************************************************/
00025 
00026 #ifndef GLC_DISC_H_
00027 #define GLC_DISC_H_
00028 
00029 #include "glc_mesh.h"
00030 #include "../glc_config.h"
00031 
00034 
00037 
00038 class GLC_LIB_EXPORT GLC_Disc : public GLC_Mesh
00039 {
00041 
00043 
00044 public:
00046         GLC_Disc(double radius, double angle= 2.0 * glc::PI);
00047 
00049         GLC_Disc(const GLC_Disc& disc);
00050 
00052         virtual ~GLC_Disc();
00054 
00056 
00058 
00059 public:
00061         virtual const GLC_BoundingBox& boundingBox(void);
00062 
00064         virtual GLC_Geometry* clone() const;
00065 
00067         inline double radius() const
00068         {return m_Radius;}
00069 
00071         inline int discretion() const
00072         {return m_Discret;}
00073 
00075         inline double angle() const
00076         {return m_Angle;}
00077 
00078 
00080 
00082 
00084 
00085 public:
00087         GLC_Disc& operator=(const GLC_Disc& disc);
00088 
00090         void setRadius(double radius);
00091 
00093         void setDiscretion(int targetDiscret);
00094 
00096         void setAngle(double angle);
00097 
00099 
00101 
00103 
00104 private:
00106 
00108         virtual void glDraw(const GLC_RenderProperties&);
00110 
00112 
00114 
00115 private:
00117         void createMeshAndWire();
00118 
00120 
00122 // Private members
00124 private:
00126         double m_Radius;
00127 
00129         int m_Discret;
00130 
00132         double m_Angle;
00133 
00135         GLuint m_Step;
00136 
00137 };
00138 
00139 #endif /* GLC_DISC_H_ */

SourceForge.net Logo

©2005 Laurent Ribon