fixed: compile issue
[opensg.git] / Source / System / Window / Utilities / OSGFlyEngine.h
blob6cf7fde52f1a9dd1e65833f0120f50db10dd3bee
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
18 * *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
23 * *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSG_FLYENGINE_H_
40 #define _OSG_FLYENGINE_H_
42 #include "OSGConfig.h"
43 #include "OSGUtilDef.h"
45 #include "OSGVector.h"
46 #include "OSGQuaternion.h"
47 #include "OSGViewport.h"
48 #include "OSGNavigatorEngine.h"
50 OSG_BEGIN_NAMESPACE
52 /*! \brief Navigator engine for simple fly model. See \ref
53 PageSystemWindowNavigatorsFly for a description.
54 \ingroup GrpUtilNavigation
55 \ingroup GrpLibOSGUtil
58 class OSG_UTIL_DLLMAPPING FlyEngine : public NavigatorEngine
60 typedef NavigatorEngine Inherited;
61 typedef FlyEngine Self;
63 /*========================== PUBLIC =================================*/
65 public:
67 /*---------------------------------------------------------------------*/
68 /*! \name Types */
69 /*! \{ */
71 OSG_GEN_INTERNAL_MEMOBJPTR(FlyEngine);
73 /*! \} */
74 /*---------------------------------------------------------------------*/
75 /*! \name Construction */
76 /*! \{ */
78 static ObjTransitPtr create(void);
80 /*! \} */
81 /*---------------------------------------------------------------------*/
82 /*! \name Class Get */
83 /*! \{ */
85 const char *getClassname(void) { return "FlyEngine"; }
87 /*! \} */
88 /*---------------------------------------------------------------------*/
89 /*! \name Get */
90 /*! \{ */
92 virtual const Pnt3f &getFrom (void);
93 virtual const Pnt3f &getAt (void);
94 virtual const Vec3f &getUp (void);
95 virtual const Matrix &getMatrix (void);
96 virtual Real32 getDistance(void);
98 /*! \} */
99 /*---------------------------------------------------------------------*/
100 /*! \name Set */
101 /*! \{ */
103 virtual void setFrom ( Pnt3f new_from );
104 virtual void setAt ( Pnt3f new_at );
105 virtual void setUp ( Vec3f new_up );
106 virtual void set ( Pnt3f new_from,
107 Pnt3f new_at,
108 Vec3f new_up );
109 virtual void set (const Matrix &new_matrix);
110 virtual void setDistance( Real32 dist );
112 /*! \} */
113 /*---------------------------------------------------------------------*/
114 /*! \name navigator engine callbacks */
115 /*! \{ */
117 virtual void buttonPress (Int16 button,
118 Int16 x,
119 Int16 y,
120 Navigator *nav );
121 virtual void buttonRelease(Int16 ,
122 Int16 x,
123 Int16 y,
124 Navigator *nav );
125 virtual void keyPress (Int16 key,
126 Int16 x,
127 Int16 y,
128 Navigator *nav );
129 virtual void moveTo (Int16 x,
130 Int16 y,
131 Navigator *nav );
132 virtual void idle (Int16 buttons,
133 Int16 x,
134 Int16 y,
135 Navigator *nav );
137 /*! \} */
138 /*---------------------------------------------------------------------*/
139 /*! \name Flyer Transformations */
140 /*! \{ */
142 virtual void rotate (Real32 deltaX,
143 Real32 deltaY);
144 virtual Real32 forward(Real32 step );
145 virtual Real32 right (Real32 step );
147 /*! \} */
148 /*========================== PROTECTED ==============================*/
150 protected:
152 /*---------------------------------------------------------------------*/
153 /*! \name Constructors/Destructor */
154 /*! \{ */
156 FlyEngine(void);
157 virtual ~FlyEngine(void);
159 /*! \} */
160 /*---------------------------------------------------------------------*/
161 /*! \name Members */
162 /*! \{ */
164 Pnt3f _rFrom;
165 Pnt3f _rAt;
166 Vec3f _vUp;
167 Matrix _tMatrix;
169 /*! \} */
170 /*---------------------------------------------------------------------*/
172 private:
174 /* Not implemented */
175 FlyEngine(const FlyEngine &other);
176 FlyEngine &operator =(const FlyEngine &other);
179 OSG_GEN_MEMOBJPTR(FlyEngine);
181 OSG_END_NAMESPACE
183 #endif