GLC_lib  2.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
glc_axis.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 2.1 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_AXIS_H_
25 #define GLC_AXIS_H_
26 
27 #include "glc_3dwidget.h"
28 #include "../glc_config.h"
29 
31 
34 
37 
39 {
41  {
45  Z_AxisManipulator
46  };
47 
49 
51 
52 public:
54  GLC_Axis(const GLC_Point3d& center, GLC_3DWidgetManagerHandle* pWidgetManagerHandle= NULL);
55 
57  GLC_Axis(const GLC_Axis& axis);
58 
60  virtual ~GLC_Axis();
62 
64 
66 
67 public:
69  inline GLC_Point3d center() const
70  {return m_Center;}
71 
73  inline double axisLength() const
74  {return m_AxisLength;}
76 
78 
80 
81 public:
83  virtual GLC_Axis& operator=(const GLC_Axis& axis);
84 
86  virtual void updateWidgetRep();
87 
89  void setAxisLength(double length);
90 
92  void setCenter(const GLC_Point3d& newCenter);
93 
95 
97 
99 
100 public:
101 
103  virtual glc::WidgetEventFlag select(const GLC_Point3d&, GLC_uint id);
104 
107 
109  virtual glc::WidgetEventFlag mousePressed(const GLC_Point3d&, Qt::MouseButton, GLC_uint id);
110 
112  virtual glc::WidgetEventFlag mouseReleased(Qt::MouseButton);
113 
115  virtual glc::WidgetEventFlag mouseMove(const GLC_Point3d&, Qt::MouseButtons, GLC_uint id);
116 
118 
120 // Protected services function
122 protected:
124  virtual void create3DviewInstance();
125 
127  virtual void resetViewState();
128 
130 // Private services function
132 private:
134  void moveManipulatorRep(const GLC_Point3d& pos);
135 
137 // Private Member
139 private:
142 
145 
148 
151 
153  double m_AxisLength;
154 
157 
158 };
159 
160 #endif /* GLC_AXIS_H_ */

©2005-2013 Laurent Ribon