GLC_lib  2.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
glc_cuttingplane.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_CUTTINGPLANE_H_
25 #define GLC_CUTTINGPLANE_H_
26 
27 #include "glc_3dwidget.h"
28 #include "../glc_config.h"
29 
31 
34 
37 
39 {
41  {
43  RotationManipulator
44  };
46 
48 
49 public:
51  GLC_CuttingPlane(const GLC_Point3d& center, const GLC_Vector3d& normal, double l1, double l2, GLC_3DWidgetManagerHandle* pWidgetManagerHandle= NULL);
52 
54  GLC_CuttingPlane(const GLC_CuttingPlane& cuttingPlane);
55 
57  virtual ~GLC_CuttingPlane();
59 
61 
63 
64 public:
66  inline GLC_Point3d center() const
67  {return m_Center;}
68 
70  inline GLC_Vector3d normal() const
71  {return m_Normal;}
72 
74  inline QColor color() const
75  {return m_Color;}
76 
78  inline double opacity() const
79  {return m_Opacity;}
80 
82 
84 
86 
87 public:
89  virtual GLC_CuttingPlane& operator=(const GLC_CuttingPlane& cuttingPlane);
90 
92  void updateLength(double l1, double l2);
93 
95  inline void setColor(const QColor& color)
96  {m_Color= color;}
97 
99  inline void setOpacity(double opacity)
100  {m_Opacity= opacity;}
101 
103  virtual void updateWidgetRep();
104 
106 
108 
110 
111 public:
112 
114  virtual glc::WidgetEventFlag select(const GLC_Point3d&, GLC_uint id);
115 
118 
120  virtual glc::WidgetEventFlag mousePressed(const GLC_Point3d&, Qt::MouseButton, GLC_uint id);
121 
123  virtual glc::WidgetEventFlag mouseReleased(Qt::MouseButton);
124 
126  virtual glc::WidgetEventFlag mouseMove(const GLC_Point3d&, Qt::MouseButtons, GLC_uint id);
127 
129 
131 // Protected services function
133 protected:
135  virtual void create3DviewInstance();
136 
138  virtual void resetViewState();
139 
141 // Private services function
143 private:
145  void moveManipulatorRep(const GLC_Point3d& pos);
146 
148  GLC_AbstractManipulator* rotationNavigator(int index);
149 
151 // Private Member
153 private:
156 
159 
162 
164  double m_L1, m_L2;
165 
167  QColor m_Color;
168 
170  double m_Opacity;
171 
174 
177 
180 
183 
186 
189 
190 
191 };
192 
193 #endif /* GLC_CUTTINGPLANE_H_ */

©2005-2013 Laurent Ribon