openscenegraph
FlightManipulator
Go to the documentation of this file.
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2 *
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version. The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * OpenSceneGraph Public License for more details.
12*/
13
14#ifndef OSGGA_FLIGHT_MANIPULATOR
15#define OSGGA_FLIGHT_MANIPULATOR 1
16
18
19
20namespace osgGA {
21
22
29{
31
32 public:
33
35 {
37 NO_AUTOMATIC_YAW
38 };
39
40 FlightManipulator( int flags = UPDATE_MODEL_SIZE | COMPUTE_HOME_USING_BBOX );
42 const osg::CopyOp& copyOp = osg::CopyOp::SHALLOW_COPY );
43
45
46 virtual void setYawControlMode( YawControlMode ycm );
47 inline YawControlMode getYawControlMode() const;
48
49 virtual void home( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us );
50 virtual void init( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us );
51 virtual void getUsage( osg::ApplicationUsage& usage ) const;
52
53 protected:
54
62
63 virtual bool performMovement();
64 virtual bool performMovementLeftMouseButton( const double eventTimeDelta, const double dx, const double dy );
65 virtual bool performMovementMiddleMouseButton( const double eventTimeDelta, const double dx, const double dy );
66 virtual bool performMovementRightMouseButton( const double eventTimeDelta, const double dx, const double dy );
67
69
70};
71
72
73//
74// inline methods
75//
76
79
80
81}
82
83#endif /* OSGGA_FLIGHT_MANIPULATOR */
Definition FirstPersonManipulator:31
Definition FlightManipulator:29
virtual bool flightHandleEvent(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &us)
virtual bool handleFrame(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &us)
virtual void init(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &us)
virtual void home(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &us)
virtual void getUsage(osg::ApplicationUsage &usage) const
virtual bool performMovementRightMouseButton(const double eventTimeDelta, const double dx, const double dy)
FlightManipulator(const FlightManipulator &fpm, const osg::CopyOp &copyOp=osg::CopyOp::SHALLOW_COPY)
FlightManipulator(int flags=UPDATE_MODEL_SIZE|COMPUTE_HOME_USING_BBOX)
virtual bool handleMouseMove(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &us)
META_Object(osgGA, FlightManipulator)
virtual bool performMovementLeftMouseButton(const double eventTimeDelta, const double dx, const double dy)
virtual void setYawControlMode(YawControlMode ycm)
YawControlMode getYawControlMode() const
Returns the Yaw control for the flight model.
Definition FlightManipulator:78
virtual bool handleMouseDrag(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &us)
virtual bool performMovementMiddleMouseButton(const double eventTimeDelta, const double dx, const double dy)
YawControlMode
Definition FlightManipulator:35
@ YAW_AUTOMATICALLY_WHEN_BANKED
Definition FlightManipulator:36
YawControlMode _yawMode
Definition FlightManipulator:68
virtual bool handleMousePush(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &us)
virtual bool handleMouseRelease(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &us)
virtual bool handleKeyDown(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &us)
virtual bool performMovement()
Definition GUIActionAdapter:62
Definition GUIEventAdapter:82
Definition ApplicationUsage:26
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
Definition Callback:21
#define OSGGA_EXPORT
Definition osgGA/Export:40