d0f48a2712
Changes: - new mouse wheel zoom/movement/center functionality - ability to fix vertical axis (important for CAD) - possibility to specify values as absolute values or relative to model size - kind of backward compatibility by flags passed to constructor - and much more - restructuring classes to use kind of hierarchy and standard way of event processing (handle methods). This way, there is much more code reusability and it is more easy to develop new kinds of manipulators. Briefly, the new architecture keeps MatrixManipulator as base abstract class. StandardManipulator is the feature-rich standard manipulator with two main descendant classes: OrbitManipulator and FirstPersonManipulator. OrbitManipulator is base class for all trackball style manipulators, based on center, rotation and distance from center. FirstPersonManipulator is base for walk or fly style manipulators, using position and rotation for camera manipulation. " Changes by Robert: Replaced osg::Vec3 by osg::Vec3d, introduced DEFAULT_SETTINGS enum and usage. Added frame time member variables in prep for improving throw animation when vysync is off.
41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
|
*
|
|
* This library is open source and may be redistributed and/or modified under
|
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
|
* (at your option) any later version. The full license is in LICENSE file
|
|
* included with this distribution, and on the openscenegraph.org website.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* OpenSceneGraph Public License for more details.
|
|
*/
|
|
|
|
#ifndef OSGGA_TRACKBALL_MANIPULATOR
|
|
#define OSGGA_TRACKBALL_MANIPULATOR 1
|
|
|
|
#include <osgGA/OrbitManipulator>
|
|
|
|
|
|
namespace osgGA {
|
|
|
|
|
|
class OSGGA_EXPORT TrackballManipulator : public OrbitManipulator
|
|
{
|
|
typedef OrbitManipulator inherited;
|
|
|
|
public:
|
|
|
|
TrackballManipulator( int flags = DEFAULT_SETTINGS );
|
|
TrackballManipulator( const TrackballManipulator& tm,
|
|
const osg::CopyOp& copyOp = osg::CopyOp::SHALLOW_COPY );
|
|
|
|
META_Object( osgGA, TrackballManipulator );
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
#endif /* OSGGA_TRACKBALL_MANIPULATOR */
|