OpenSceneGraph 3.6.5
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{
30 typedef FirstPersonManipulator inherited;
31
32 public:
33
39
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 */
The 'GA' in osgGA stands for 'GUI Abstraction'; the osgGA namespace provides facilities to help devel...
Definition Callback:21
Definition ApplicationUsage:26
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
FirstPersonManipulator(int flags=DEFAULT_SETTINGS)
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)
Start/restart the manipulator.
virtual void home(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &us)
Move the camera to the default position.
virtual void getUsage(osg::ApplicationUsage &usage) const
Get the user interface usage of this event handler, i.e.
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
@ NO_AUTOMATIC_YAW
Definition FlightManipulator:37
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
Event class for storing Keyboard, mouse and window events.
Definition GUIEventAdapter:82
@ COMPUTE_HOME_USING_BBOX
Definition StandardManipulator:40
@ UPDATE_MODEL_SIZE
Definition StandardManipulator:39
#define OSGGA_EXPORT
Definition Export:40

osg logo
Generated at Sun Jul 27 2025 00:00:00 for the OpenSceneGraph by doxygen 1.14.0.