GLC_lib  2.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
glc_arrow.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_ARROW_H_
25 #define GLC_ARROW_H_
26 
27 #include <QColor>
28 #include "../maths/glc_vector3d.h"
29 #include "glc_geometry.h"
30 
31 #include "../glc_config.h"
32 
35 
38 
40 {
42 
44 
45 public:
47  GLC_Arrow(const GLC_Point3d& startPoint, const GLC_Point3d& endPoint, const GLC_Vector3d& viewDir);
48 
50  GLC_Arrow(const GLC_Arrow& arrow);
51 
53  virtual ~GLC_Arrow();
55 
56 
58 
59 public:
62 
64  inline GLC_Point3d startPoint() const
65  {return m_StartPoint;}
66 
68  inline GLC_Point3d endPoint() const
69  {return m_EndPoint;}
70 
72  inline double headLenght() const
73  {return m_HeadLenght;}
74 
76  inline double headAngle() const
77  {return m_HeadAngle;}
78 
80  inline GLC_Vector3d viewDir() const
81  {return m_ViewDir;}
82 
84  virtual GLC_Geometry* clone() const;
85 
87 
88 
90 
91 public:
93  GLC_Arrow& operator=(const GLC_Arrow& arrow);
94 
96  void setStartPoint(const GLC_Point3d& startPoint);
97 
99  void setEndPoint(const GLC_Point3d& endPoint);
100 
102  void setHeadLength(double headLenght);
103 
105  void setHeadAngle(double headAngle);
106 
108  void setViewDir(const GLC_Vector3d& viewDir);
109 
111 
113 
115 
116 private:
117 
119 
121  virtual void glDraw(const GLC_RenderProperties&);
122 
123 
125 
127 
129 
130 private:
132  void createWire();
133 
135 
137 // Private members
139 private:
142 
145 
147  double m_HeadLenght;
148 
150  double m_HeadAngle;
151 
154 };
155 
156 #endif /* GLC_ARROW_H_ */

©2005-2013 Laurent Ribon