TerrainManipulator
Go to the documentation of this file.
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 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_TERRAIN_MANIPULATOR
#define OSGGA_TERRAIN_MANIPULATOR 1
#include <osgGA/OrbitManipulator>
namespace osgGA {
class OSGGA_EXPORT TerrainManipulator : public OrbitManipulator
{
typedef OrbitManipulator inherited;
public:
TerrainManipulator( int flags = DEFAULT_SETTINGS );
TerrainManipulator( const TerrainManipulator& tm,
const osg::CopyOp& copyOp = osg::CopyOp::SHALLOW_COPY );
META_Object( osgGA, TerrainManipulator );
enum RotationMode
{
ELEVATION_AZIM_ROLL,
ELEVATION_AZIM
};
virtual void setRotationMode(RotationMode mode);
RotationMode getRotationMode() const;
virtual void setByMatrix( const osg::Matrixd& matrix );
virtual void setTransformation( const osg::Vec3d& eye, const osg::Vec3d& center, const osg::Vec3d& up );
virtual void setNode( osg::Node* node );
protected:
virtual bool performMovementMiddleMouseButton( const double eventTimeDelta, const double dx, const double dy );
virtual bool performMovementRightMouseButton( const double eventTimeDelta, const double dx, const double dy );
bool intersect( const osg::Vec3d& start, const osg::Vec3d& end, osg::Vec3d& intersection ) const;
void clampOrientation();
osg::Vec3d _previousUp;
};
}
#endif /* OSGGA_TERRAIN_MANIPULATOR */
OrbitManipulator
osgGA::OrbitManipulator::OrbitManipulator
OrbitManipulator(int flags=DEFAULT_SETTINGS)
osgGA::StandardManipulator::DEFAULT_SETTINGS
@ DEFAULT_SETTINGS
Definition StandardManipulator:43
osgGA::TerrainManipulator::TerrainManipulator
TerrainManipulator(const TerrainManipulator &tm, const osg::CopyOp &copyOp=osg::CopyOp::SHALLOW_COPY)
osgGA::TerrainManipulator::RotationMode
RotationMode
Definition TerrainManipulator:36
osgGA::TerrainManipulator::ELEVATION_AZIM_ROLL
@ ELEVATION_AZIM_ROLL
Definition TerrainManipulator:37
osgGA::TerrainManipulator::ELEVATION_AZIM
@ ELEVATION_AZIM
Definition TerrainManipulator:38
osgGA::TerrainManipulator::intersect
bool intersect(const osg::Vec3d &start, const osg::Vec3d &end, osg::Vec3d &intersection) const
osgGA::TerrainManipulator::setRotationMode
virtual void setRotationMode(RotationMode mode)
osgGA::TerrainManipulator::getRotationMode
RotationMode getRotationMode() const
osgGA::TerrainManipulator::performMovementMiddleMouseButton
virtual bool performMovementMiddleMouseButton(const double eventTimeDelta, const double dx, const double dy)
osgGA::TerrainManipulator::clampOrientation
void clampOrientation()
osgGA::TerrainManipulator::setTransformation
virtual void setTransformation(const osg::Vec3d &eye, const osg::Vec3d &center, const osg::Vec3d &up)
osgGA::TerrainManipulator::_previousUp
osg::Vec3d _previousUp
Definition TerrainManipulator:58
osgGA::TerrainManipulator::performMovementRightMouseButton
virtual bool performMovementRightMouseButton(const double eventTimeDelta, const double dx, const double dy)
osgGA::TerrainManipulator::setNode
virtual void setNode(osg::Node *node)
osgGA::TerrainManipulator::TerrainManipulator
TerrainManipulator(int flags=DEFAULT_SETTINGS)
osgGA::TerrainManipulator::setByMatrix
virtual void setByMatrix(const osg::Matrixd &matrix)
osgGA::TerrainManipulator::META_Object
META_Object(osgGA, TerrainManipulator)
osg::CopyOp
Definition CopyOp:41
osg::CopyOp::SHALLOW_COPY
@ SHALLOW_COPY
Definition CopyOp:47
osg::Matrixd
Definition Matrixd:27
osg::Node
Definition Node:72
osg::Vec3d
Definition Vec3d:30
osgGA
Definition Callback:21
OSGGA_EXPORT
#define OSGGA_EXPORT
Definition osgGA/Export:40