fixed: compile issue
[opensg.git] / Source / System / Window / Utilities / OSGWalkEngine.h
blob410dc738fe8cbe625ca97ef72874105b4015a475
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_WALKENGINE_H_
40 #define _OSG_WALKENGINE_H_
42 #include "OSGConfig.h"
43 #include "OSGUtilDef.h"
45 #include "OSGVector.h"
46 #include "OSGQuaternion.h"
47 #include "OSGViewport.h"
48 #include "OSGFlyEngine.h"
49 #include "OSGIntersectAction.h"
51 OSG_BEGIN_NAMESPACE
53 /*! \brief Base class for all navigator engines.
54 \ingroup GrpUtilNavigation
55 \ingroup GrpLibOSGUtil
58 class OSG_UTIL_DLLMAPPING WalkEngine : public FlyEngine
60 typedef FlyEngine Inherited;
61 typedef WalkEngine Self;
63 /*========================== PUBLIC =================================*/
65 public:
67 /*---------------------------------------------------------------------*/
68 /*! \name Types */
69 /*! \{ */
71 OSG_GEN_INTERNAL_MEMOBJPTR(WalkEngine);
73 /*! \} */
74 /*---------------------------------------------------------------------*/
75 /*! \name Construction */
76 /*! \{ */
78 static ObjTransitPtr create(void);
80 /*! \} */
81 /*---------------------------------------------------------------------*/
82 /*! \name Class Get */
83 /*! \{ */
85 const char *getClassname(void) { return "WalkEngine"; }
87 /*! \} */
88 /*---------------------------------------------------------------------*/
89 /*! \name Get */
90 /*! \{ */
92 /*! \} */
93 /*---------------------------------------------------------------------*/
94 /*! \name Set */
95 /*! \{ */
97 void setGround (Node * const new_ground);
98 void setWorld (Node * const new_world );
100 void setGroundDistance (Real32 groundDistance);
101 void setMinWallDistance (Real32 wallDistance );
103 void setPersonDimensions(Real32 height, Real32 width, Real32 fatness);
105 /*! \} */
106 /*---------------------------------------------------------------------*/
107 /*! \name navigator engine callbacks */
108 /*! \{ */
110 virtual void idle(Int16 buttons, Int16 x, Int16 y, Navigator* nav);
112 virtual void onViewportChanged(Navigator* nav);
114 /*! \} */
115 /*---------------------------------------------------------------------*/
116 /*! \name Walker Transformations */
117 /*! \{ */
119 virtual void rotate (Real32 deltaX, Real32 deltaY);
120 virtual Real32 forward(Real32 step);
121 virtual Real32 right (Real32 step);
123 /*! \} */
124 /*========================== PROTECTED ==============================*/
126 protected:
128 /*---------------------------------------------------------------------*/
129 /*! \name Constructors/Destructor */
130 /*! \{ */
132 WalkEngine(void);
133 virtual ~WalkEngine(void);
135 /*---------------------------------------------------------------------*/
136 /*! \name Members */
137 /*! \{ */
139 Node *_ground;
140 Node *_world;
142 Real32 _groundDistance;
143 Real32 _wallDistance;
144 Real32 _height;
145 Real32 _width;
146 Real32 _fatness;
148 IntersectActionRefPtr _act;
150 /*! \} */
152 private:
154 /* Not implemented */
155 WalkEngine(const WalkEngine &other);
156 WalkEngine &operator =(const WalkEngine &other);
159 OSG_GEN_MEMOBJPTR(WalkEngine);
161 OSG_END_NAMESPACE
163 #endif