openscenegraph
Classes | Public Member Functions | Protected Member Functions | Protected Attributes
osgGA::CameraManipulator Class Reference
Inheritance diagram for osgGA::CameraManipulator:
osgGA::GUIEventHandler osg::NodeCallback osg::Drawable::EventCallback osg::Object osg::Object osg::Referenced osg::Referenced osgGA::AnimationPathManipulator osgGA::CameraViewSwitchManipulator osgGA::DriveManipulator osgGA::KeySwitchMatrixManipulator osgGA::SphericalManipulator osgGA::StandardManipulator osgGA::UFOManipulator osgGA::FirstPersonManipulator osgGA::OrbitManipulator osgGA::FlightManipulator osgGA::NodeTrackerManipulator osgGA::TerrainManipulator osgGA::TrackballManipulator osgGA::MultiTouchTrackballManipulator

List of all members.

Classes

class  CoordinateFrameCallback

Public Member Functions

virtual const char * className () const
virtual void setCoordinateFrameCallback (CoordinateFrameCallback *cb)
CoordinateFrameCallbackgetCoordinateFrameCallback ()
const CoordinateFrameCallbackgetCoordinateFrameCallback () const
osg::CoordinateFrame getCoordinateFrame (const osg::Vec3d &position) const
osg::Vec3d getSideVector (const osg::CoordinateFrame &cf) const
osg::Vec3d getFrontVector (const osg::CoordinateFrame &cf) const
osg::Vec3d getUpVector (const osg::CoordinateFrame &cf) const
virtual void setByMatrix (const osg::Matrixd &matrix)=0
virtual void setByInverseMatrix (const osg::Matrixd &matrix)=0
virtual osg::Matrixd getMatrix () const =0
virtual osg::Matrixd getInverseMatrix () const =0
virtual
osgUtil::SceneView::FusionDistanceMode 
getFusionDistanceMode () const
virtual float getFusionDistanceValue () const
void setIntersectTraversalMask (unsigned int mask)
unsigned int getIntersectTraversalMask () const
virtual void setNode (osg::Node *)
virtual const osg::NodegetNode () const
virtual osg::NodegetNode ()
virtual void setHomePosition (const osg::Vec3d &eye, const osg::Vec3d &center, const osg::Vec3d &up, bool autoComputeHomePosition=false)
virtual void getHomePosition (osg::Vec3d &eye, osg::Vec3d &center, osg::Vec3d &up) const
virtual void setAutoComputeHomePosition (bool flag)
bool getAutoComputeHomePosition () const
virtual void computeHomePosition (const osg::Camera *camera=NULL, bool useBoundingBox=false)
virtual void home (const GUIEventAdapter &, GUIActionAdapter &)
virtual void home (double)
virtual void init (const GUIEventAdapter &, GUIActionAdapter &)
virtual bool handle (const GUIEventAdapter &ea, GUIActionAdapter &us)

Protected Member Functions

 CameraManipulator ()
 CameraManipulator (const CameraManipulator &mm, const osg::CopyOp &copyOp=osg::CopyOp::SHALLOW_COPY)
virtual ~CameraManipulator ()
std::string getManipulatorName () const

Protected Attributes

unsigned int _intersectTraversalMask
bool _autoComputeHomePosition
osg::Vec3d _homeEye
osg::Vec3d _homeCenter
osg::Vec3d _homeUp
osg::ref_ptr
< CoordinateFrameCallback
_coordinateFrameCallback

Detailed Description

CameraManipulator is an abstract base class defining the interface, and a certain amount of default functionality, for classes which wish to control OSG cameras in response to GUI events.


Constructor & Destructor Documentation

virtual osgGA::CameraManipulator::~CameraManipulator ( ) [protected, virtual]

Member Function Documentation

virtual const char* osgGA::CameraManipulator::className ( ) const [inline, virtual]
virtual void osgGA::CameraManipulator::computeHomePosition ( const osg::Camera camera = NULL,
bool  useBoundingBox = false 
) [virtual]

Compute the home position.

Get whether the automatic compute of the home position is enabled.

get the coordinate frame.

get the coordinate frame callback which tells the manipulator which way is up, east and north.

get the coordinate frame callback which tells the manipulator which way is up, east and north.

Get the FusionDistanceMode. Used by SceneView for setting up stereo convergence.

Reimplemented in osgGA::KeySwitchMatrixManipulator, osgGA::OrbitManipulator, and osgGA::SphericalManipulator.

References osgUtil::SceneView::PROPORTIONAL_TO_SCREEN_DISTANCE.

virtual float osgGA::CameraManipulator::getFusionDistanceValue ( ) const [inline, virtual]

Get the FusionDistanceValue. Used by SceneView for setting up stereo convergence.

Reimplemented in osgGA::KeySwitchMatrixManipulator, osgGA::OrbitManipulator, and osgGA::SphericalManipulator.

virtual void osgGA::CameraManipulator::getHomePosition ( osg::Vec3d eye,
osg::Vec3d center,
osg::Vec3d up 
) const [inline, virtual]

Get the manually set home position.

unsigned int osgGA::CameraManipulator::getIntersectTraversalMask ( ) const [inline]

Get the mask to use when set up intersection traversal such as used in manipulators that follow terrain or have collision detection.

virtual osg::Matrixd osgGA::CameraManipulator::getInverseMatrix ( ) const [pure virtual]
std::string osgGA::CameraManipulator::getManipulatorName ( ) const [protected]
virtual osg::Matrixd osgGA::CameraManipulator::getMatrix ( ) const [pure virtual]
virtual const osg::Node* osgGA::CameraManipulator::getNode ( ) const [inline, virtual]
virtual osg::Node* osgGA::CameraManipulator::getNode ( ) [inline, virtual]
virtual bool osgGA::CameraManipulator::handle ( const GUIEventAdapter ea,
GUIActionAdapter us 
) [virtual]
virtual void osgGA::CameraManipulator::home ( const GUIEventAdapter ,
GUIActionAdapter  
) [inline, virtual]

Move the camera to the default position. May be ignored by manipulators if home functionality is not appropriate.

Reimplemented in osgGA::KeySwitchMatrixManipulator, osgGA::UFOManipulator, osgGA::AnimationPathManipulator, osgGA::StandardManipulator, osgGA::SphericalManipulator, osgGA::FirstPersonManipulator, osgGA::DriveManipulator, and osgGA::FlightManipulator.

virtual void osgGA::CameraManipulator::home ( double  ) [inline, virtual]

Move the camera to the default position. This version does not require GUIEventAdapter and GUIActionAdapter so may be called from somewhere other than a handle() method in GUIEventHandler. Application must be aware of implications.

Reimplemented in osgGA::UFOManipulator, osgGA::AnimationPathManipulator, osgGA::StandardManipulator, osgGA::SphericalManipulator, and osgGA::FirstPersonManipulator.

virtual void osgGA::CameraManipulator::init ( const GUIEventAdapter ,
GUIActionAdapter  
) [inline, virtual]
virtual void osgGA::CameraManipulator::setAutoComputeHomePosition ( bool  flag) [inline, virtual]

Set whether the automatic compute of the home position is enabled.

Reimplemented in osgGA::KeySwitchMatrixManipulator.

virtual void osgGA::CameraManipulator::setByInverseMatrix ( const osg::Matrixd matrix) [pure virtual]
virtual void osgGA::CameraManipulator::setByMatrix ( const osg::Matrixd matrix) [pure virtual]

set the coordinate frame which callback tells the manipulator which way is up, east and north.

Reimplemented in osgGA::KeySwitchMatrixManipulator.

virtual void osgGA::CameraManipulator::setHomePosition ( const osg::Vec3d eye,
const osg::Vec3d center,
const osg::Vec3d up,
bool  autoComputeHomePosition = false 
) [inline, virtual]

Manually set the home position, and set the automatic compute of home position.

Reimplemented in osgGA::KeySwitchMatrixManipulator.

void osgGA::CameraManipulator::setIntersectTraversalMask ( unsigned int  mask) [inline]

Set the mask to use when set up intersection traversal such as used in manipulators that follow terrain or have collision detection. The intersection traversal mask is useful for controlling what parts of the scene graph should be used for intersection purposes.

virtual void osgGA::CameraManipulator::setNode ( osg::Node ) [inline, virtual]

Attach a node to the manipulator, automatically detaching any previously attached node. setNode(NULL) detaches previous nodes. May be ignored by manipulators which do not require a reference model.

Reimplemented in osgGA::KeySwitchMatrixManipulator, osgGA::UFOManipulator, osgGA::NodeTrackerManipulator, osgGA::StandardManipulator, osgGA::SphericalManipulator, osgGA::DriveManipulator, osgGA::TerrainManipulator, and osgGA::CameraViewSwitchManipulator.


Member Data Documentation


The documentation for this class was generated from the following file: