GLC_lib  2.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
glc_circle.h
Go to the documentation of this file.
1 /****************************************************************************
2 
3  This file is part of the GLC-lib library.
4  Copyright (C) 2005-2008 Laurent Ribon (laumaya@users.sourceforge.net)
5  http://glc-lib.sourceforge.net
6 
7  GLC-lib is free software; you can redistribute it and/or modify
8  it under the terms of the GNU Lesser General Public License as published by
9  the Free Software Foundation; either version 3 of the License, or
10  (at your option) any later version.
11 
12  GLC-lib is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public License
18  along with GLC-lib; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 
21 *****************************************************************************/
22 
24 
25 #ifndef GLC_CIRCLE_H_
26 #define GLC_CIRCLE_H_
27 
28 #include "glc_geometry.h"
29 
30 #include "../glc_config.h"
31 
34 
39 
41 {
43 
45 
46 public:
47 
49 
50  GLC_Circle(const double &dRadius, double Angle= 2.0 * glc::PI);
51 
53  GLC_Circle(const GLC_Circle& sourceCircle);
54 
56  virtual ~GLC_Circle();
57 
59 
61 
63 
64 public:
65 
67  inline int discretion() const
68  { return m_Discret;}
69 
71  inline double radius() const
72  {return m_Radius;}
73 
75  inline double diameter() const
76  {return m_Radius * 2.0;}
77 
79  virtual const GLC_BoundingBox& boundingBox();
80 
82  virtual GLC_Geometry* clone() const;
84 
86 
88 
89 public:
91 
92  void setDiameter(double D);
93 
95 
96  void setRadius(double R);
97 
99 
101  void setDiscretion(int TargetDiscret);
102 
104 
105  void setAngle(double AngleRadians); // Angle in Radians
106 
108 
110 
112 
113 private:
114 
116 
118  virtual void glDraw(const GLC_RenderProperties&);
120 
122 
124 
125 private:
127  void createWire();
128 
130 
132 // private members
134 private:
136  double m_Radius;
137 
140 
142  double m_Angle;
143 
145  GLuint m_Step;
146 
147 };
148 #endif //GLC_CIRCLE_H_

©2005-2013 Laurent Ribon