GLC_lib  2.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
glc_rectangle.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_RECTANGLE_H_
26 #define GLC_RECTANGLE_H_
27 
28 #include "glc_mesh.h"
29 
30 #include "../glc_config.h"
31 
34 
37 
39 {
40 
42 
44 
45 public:
47  GLC_Rectangle();
48 
50  GLC_Rectangle(double l1, double l2);
51 
54 
56  virtual ~GLC_Rectangle();
58 
59 
61 
62 public:
64  inline double length1() const
65  { return m_L1;}
66 
68  inline double length2() const
69  { return m_L2;}
70 
72  virtual GLC_Geometry* clone() const;
73 
75  virtual const GLC_BoundingBox& boundingBox(void);
76 
78 
79 
81 
82 public:
84  GLC_Rectangle& setRectangle(double l1, double l2);
85 
87  void setLength1(double l1);
88 
90  void setLength2(double l2);
91 
93 
95 
97 
98 private:
99 
101 
103  virtual void glDraw(const GLC_RenderProperties&);
104 
106 
108 
110 
111 private:
113  void createMeshAndWire();
115 
116 
118 // Private members
120 private:
122  double m_L1;
123 
125  double m_L2;
126 
127 };
128 
129 #endif /* GLC_RECTANGLE_H_ */

©2005-2013 Laurent Ribon