GLC_lib  2.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
glc_cone.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_CONE_H_
25 #define GLC_CONE_H_
26 
27 #include "glc_mesh.h"
28 #include "../glc_config.h"
29 
32 
35 
37 {
39 
41 
42 public:
44 
48  GLC_Cone(double dRadius, double dLength, int discretization= glc::GLC_POLYDISCRET);
49 
51  GLC_Cone(const GLC_Cone& sourceCone);
52 
54  virtual ~GLC_Cone();
56 
57 
59 
61 
62 public:
64  static quint32 chunckID();
65 
67  inline double length(void) const
68  {return m_Length;}
69 
71  inline double radius(void) const
72  {return m_Radius;}
73 
75  inline int discretion(void) const
76  {return m_Discret;}
77 
79  virtual GLC_Geometry* clone() const;
80 
82  virtual const GLC_BoundingBox& boundingBox(void);
83 
85 
87 
89 
90 public:
92 
93  void setLength(double Length);
94 
96 
97  void setRadius(double Radius);
98 
100 
101  void setDiscretion(int TargetDiscret);
102 
104 
106 
108 
109 private:
111 
113  virtual void glDraw(const GLC_RenderProperties&);
115 
117 
119 
120 private:
122  void createMeshAndWire();
123 
125 
127 // Private members
129 private:
130 
132  double m_Radius;
133 
135  double m_Length;
136 
139 
141  static quint32 m_ChunkId;
142 
143 };
144 
145 #endif /* GLC_CONE_H_ */

©2005-2013 Laurent Ribon