GLC_lib  2.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
glc_disc.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  *****************************************************************************/
23 
24 #ifndef GLC_DISC_H_
25 #define GLC_DISC_H_
26 
27 #include "glc_mesh.h"
28 #include "../glc_config.h"
29 
32 
35 
37 {
39 
41 
42 public:
44  GLC_Disc(double radius, double angle= 2.0 * glc::PI, int discretization= glc::GLC_POLYDISCRET);
45 
47  GLC_Disc(const GLC_Disc& disc);
48 
50  virtual ~GLC_Disc();
52 
54 
56 
57 public:
59  virtual const GLC_BoundingBox& boundingBox(void);
60 
62  virtual GLC_Geometry* clone() const;
63 
65  inline double radius() const
66  {return m_Radius;}
67 
69  inline int discretion() const
70  {return m_Discret;}
71 
73  inline double angle() const
74  {return m_Angle;}
75 
76 
78 
80 
82 
83 public:
85  GLC_Disc& operator=(const GLC_Disc& disc);
86 
88  void setRadius(double radius);
89 
91  void setDiscretion(int targetDiscret);
92 
94  void setAngle(double angle);
95 
97 
99 
101 
102 private:
104 
106  virtual void glDraw(const GLC_RenderProperties&);
108 
110 
112 
113 private:
115  void createMeshAndWire();
116 
118 
120 // Private members
122 private:
124  double m_Radius;
125 
128 
130  double m_Angle;
131 
133  GLuint m_Step;
134 
135 };
136 
137 #endif /* GLC_DISC_H_ */

©2005-2013 Laurent Ribon