added: helper to put chunk override groups in OSG files
[opensg.git] / Source / System / Window / Utilities / OSGNavigatorEngine.h
blob67791a66be2267cc2aec34efedea6f2f8e1080ab
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_NAVIGATORENGINE_H_
40 #define _OSG_NAVIGATORENGINE_H_
42 #include "OSGConfig.h"
43 #include "OSGUtilDef.h"
45 #include "OSGVector.h"
46 #include "OSGQuaternion.h"
47 #include "OSGViewport.h"
48 #include "OSGMemoryObject.h"
49 #include "OSGNavigatorBase.h"
51 OSG_BEGIN_NAMESPACE
53 class Navigator;
55 /*! \brief Base class for all navigator engines.
56 \ingroup GrpUtilNavigation
57 \ingroup GrpLibOSGUtil
60 class OSG_UTIL_DLLMAPPING NavigatorEngine : public MemoryObject
62 typedef MemoryObject Inherited;
63 typedef NavigatorEngine Self;
65 /*========================== PUBLIC =================================*/
67 public:
69 /*---------------------------------------------------------------------*/
70 /*! \name Types */
71 /*! \{ */
73 OSG_GEN_INTERNAL_MEMOBJPTR(NavigatorEngine);
75 /*! \} */
76 /*---------------------------------------------------------------------*/
77 /*! \name Class Get */
78 /*! \{ */
80 const char *getClassname(void) { return "NavigatorEngine"; }
82 /*! \} */
83 /*---------------------------------------------------------------------*/
84 /*! \name Get */
85 /*! \{ */
87 NavigatorBase::State getState() const;
89 virtual const Pnt3f &getFrom (void) = 0;
90 virtual const Pnt3f &getAt (void) = 0;
91 virtual const Vec3f &getUp (void) = 0;
92 virtual const Matrix &getMatrix (void) = 0;
93 virtual Real32 getDistance(void) = 0;
95 /*! \} */
96 /*---------------------------------------------------------------------*/
97 /*! \name Set */
98 /*! \{ */
100 virtual void setFrom ( Pnt3f new_from ) = 0;
101 virtual void setAt ( Pnt3f new_at ) = 0;
102 virtual void setUp ( Vec3f new_up ) = 0;
103 virtual void set ( Pnt3f new_from,
104 Pnt3f new_at,
105 Vec3f new_up ) = 0;
106 virtual void set (const Matrix &new_matrix ) = 0;
107 virtual void setDistance( Real32 new_distance) = 0;
109 /*! \} */
110 /*---------------------------------------------------------------------*/
111 /*! \name navigator engine callbacks */
112 /*! \{ */
114 virtual void buttonPress (Int16 button,
115 Int16 x,
116 Int16 y,
117 Navigator *nav ) = 0;
118 virtual void buttonRelease(Int16 ,
119 Int16 x,
120 Int16 y,
121 Navigator *nav ) = 0;
122 virtual void keyPress (Int16 key,
123 Int16 x,
124 Int16 y,
125 Navigator *nav ) = 0;
126 virtual void moveTo (Int16 x,
127 Int16 y,
128 Navigator *nav ) = 0;
129 virtual void idle (Int16 buttons,
130 Int16 x,
131 Int16 y,
132 Navigator *nav ) = 0;
134 /*! \} */
135 /*---------------------------------------------------------------------*/
136 /*! \name navigator engine callbacks */
137 /*! \{ */
139 virtual void onViewportChanged (Navigator *nav);
140 virtual void onActivation (Navigator *nav);
141 virtual void onUpdateCameraTransformation(Navigator *nav);
143 /*! \} */
144 /*========================== PROTECTED ==============================*/
146 protected:
148 /*---------------------------------------------------------------------*/
149 /*! \name Constructors/Destructor */
150 /*! \{ */
152 NavigatorEngine(void);
153 virtual ~NavigatorEngine(void) = 0;
155 /*---------------------------------------------------------------------*/
156 /*! \name Members */
157 /*! \{ */
159 NavigatorBase::State _currentState;
161 /*! \} */
162 /*---------------------------------------------------------------------*/
164 private:
166 /* Not implemented */
167 NavigatorEngine(const NavigatorEngine &other);
168 NavigatorEngine &operator =(const NavigatorEngine &other);
171 OSG_GEN_MEMOBJPTR(NavigatorEngine);
173 OSG_END_NAMESPACE
175 #endif