Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

osgGA::CameraManipulator Class Reference

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. More...

Inheritance diagram for osgGA::CameraManipulator:

Inheritance graph
[legend]
List of all members.

Public Methods

virtual void setCamera (osg::Camera *)
 Attach a camera to the manipulator to be used for specifying view.

virtual const osg::Camera * getCamera () const
 Get the attached camera.

virtual osg::Camera * getCamera ()
 Get the attached camera.

virtual void setNode (osg::Node *)
 Attach a node to the manipulator, automatically detaching any previously attached node.

virtual const osg::Node * getNode () const
 Return const node if attached.

virtual osg::Node * getNode ()
 Return node if attached.

virtual void home (const GUIEventAdapter &,GUIActionAdapter &)
 Move the camera to the default position.

virtual void init (const GUIEventAdapter &,GUIActionAdapter &)
 Start/restart the manipulator.

virtual bool handle (const GUIEventAdapter &ea, GUIActionAdapter &us)
 Handle events, return true if handled, false otherwise.

virtual void accept (GUIEventHandlerVisitor &v)
 Handle visitations.


Protected Methods

 CameraManipulator ()
virtual ~CameraManipulator ()

Protected Attributes

osg::ref_ptr< osg::Camera > _camera

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

osgGA::CameraManipulator::CameraManipulator (    )  [protected]
 

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


Member Function Documentation

virtual void osgGA::CameraManipulator::accept (  GUIEventHandlerVisitor &    v )  [inline, virtual]
 

Handle visitations.

Implements osgGA::GUIEventHandler.

virtual osg::Camera* osgGA::CameraManipulator::getCamera (    )  [virtual]
 

Get the attached camera.

Reimplemented in osgGA::KeySwitchCameraManipulator.

virtual const osg::Camera* osgGA::CameraManipulator::getCamera (    )  const [virtual]
 

Get the attached camera.

Reimplemented in osgGA::KeySwitchCameraManipulator.

virtual osg::Node* osgGA::CameraManipulator::getNode (    )  [inline, virtual]
 

Return node if attached.

Reimplemented in osgGA::DriveManipulator, osgGA::FlightManipulator, osgGA::KeySwitchCameraManipulator, and osgGA::TrackballManipulator.

virtual const osg::Node* osgGA::CameraManipulator::getNode (    )  const [inline, virtual]
 

Return const node if attached.

Reimplemented in osgGA::DriveManipulator, osgGA::FlightManipulator, osgGA::KeySwitchCameraManipulator, and osgGA::TrackballManipulator.

virtual bool osgGA::CameraManipulator::handle (  const GUIEventAdapter &    ea,
GUIActionAdapter &    us
)  [virtual]
 

Handle events, return true if handled, false otherwise.

Implements osgGA::GUIEventHandler.

Reimplemented in osgGA::DriveManipulator, osgGA::FlightManipulator, osgGA::KeySwitchCameraManipulator, and osgGA::TrackballManipulator.

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::DriveManipulator, osgGA::FlightManipulator, osgGA::KeySwitchCameraManipulator, and osgGA::TrackballManipulator.

virtual void osgGA::CameraManipulator::init (  const GUIEventAdapter &   ,
GUIActionAdapter &   
)  [inline, virtual]
 

Start/restart the manipulator.

FIXME: what does this actually mean? Provide examples.

Reimplemented in osgGA::DriveManipulator, osgGA::FlightManipulator, osgGA::KeySwitchCameraManipulator, and osgGA::TrackballManipulator.

virtual void osgGA::CameraManipulator::setCamera (  osg::Camera *    )  [virtual]
 

Attach a camera to the manipulator to be used for specifying view.

Reimplemented in osgGA::KeySwitchCameraManipulator.

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::DriveManipulator, osgGA::FlightManipulator, osgGA::KeySwitchCameraManipulator, and osgGA::TrackballManipulator.


Member Data Documentation

osg::ref_ptr<osg::Camera> osgGA::CameraManipulator::_camera [protected]
 


The documentation for this class was generated from the following file:
Generated at Wed Sep 18 13:55:48 2002 for the Open Scene Graph by doxygen 1.2.16.