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

osgGA::KeySwitchCameraManipulator Class Reference

KeySwitchCameraManipulator is a decorator which allows the type of camera manipulator being used to be switched by pressing a key. More...

Inheritance diagram for osgGA::KeySwitchCameraManipulator:

Inheritance graph
[legend]
List of all members.

Public Methods

void addCameraManipulator (int key, std::string name, CameraManipulator *cm)
 Add a camera manipulator with an associated name, and a key to trigger the switch,.

void addNumberedCameraManipulator (CameraManipulator *cm)
 Add a camera manipulator with an autogenerated keybinding which is '1' + previous number of camera's registerd.

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

virtual const osg::CameragetCamera () const
 Get the attached camera.

virtual osg::CameragetCamera ()
 Get the attached camera.

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

virtual const osg::NodegetNode () const
 Return const node if attached.

virtual osg::NodegetNode ()
 Return node if attached.

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

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

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


Detailed Description

KeySwitchCameraManipulator is a decorator which allows the type of camera manipulator being used to be switched by pressing a key.

E.g. '1' for a TrackballManipultor, '2' for a DriveManipulator, '3' for a FlightManipulator. The manipulators available, and the associated switch keys, can be configured.


Member Function Documentation

void osgGA::KeySwitchCameraManipulator::addCameraManipulator int    key,
std::string    name,
CameraManipulator   cm
 

Add a camera manipulator with an associated name, and a key to trigger the switch,.

void osgGA::KeySwitchCameraManipulator::addNumberedCameraManipulator CameraManipulator   cm
 

Add a camera manipulator with an autogenerated keybinding which is '1' + previous number of camera's registerd.

virtual osg::Camera* osgGA::KeySwitchCameraManipulator::getCamera   [inline, virtual]
 

Get the attached camera.

Reimplemented from osgGA::CameraManipulator.

virtual const osg::Camera* osgGA::KeySwitchCameraManipulator::getCamera   const [inline, virtual]
 

Get the attached camera.

Reimplemented from osgGA::CameraManipulator.

virtual osg::Node* osgGA::KeySwitchCameraManipulator::getNode   [inline, virtual]
 

Return node if attached.

Reimplemented from osgGA::CameraManipulator.

virtual const osg::Node* osgGA::KeySwitchCameraManipulator::getNode   const [inline, virtual]
 

Return const node if attached.

Reimplemented from osgGA::CameraManipulator.

virtual bool osgGA::KeySwitchCameraManipulator::handle const GUIEventAdapter   ea,
GUIActionAdapter   us
[virtual]
 

Handle events, return true if handled, false otherwise.

Reimplemented from osgGA::CameraManipulator.

virtual void osgGA::KeySwitchCameraManipulator::home const GUIEventAdapter   ee,
GUIActionAdapter   aa
[inline, virtual]
 

Move the camera to the default position.

May be ignored by manipulators if home functionality is not appropriate.

Reimplemented from osgGA::CameraManipulator.

virtual void osgGA::KeySwitchCameraManipulator::init const GUIEventAdapter   ee,
GUIActionAdapter   aa
[inline, virtual]
 

Start/restart the manipulator.

FIXME: what does this actually mean? Provide examples.

Reimplemented from osgGA::CameraManipulator.

virtual void osgGA::KeySwitchCameraManipulator::setCamera osg::Camera   c [inline, virtual]
 

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

Reimplemented from osgGA::CameraManipulator.

virtual void osgGA::KeySwitchCameraManipulator::setNode osg::Node   n [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 from osgGA::CameraManipulator.


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