Added getCameraByName method to viewer and home(double currentTime) to

MatrixManipulator, UFO, Trackball and ANimation manipulator.
This commit is contained in:
Don BURNS
2005-03-20 23:57:17 +00:00
parent c579ab511e
commit 5d10547ac5
8 changed files with 37 additions and 16 deletions

View File

@@ -23,8 +23,6 @@ namespace osg {
class SG_EXPORT Viewport : public StateAttribute
{
public :
Viewport();
Viewport(int x,int y,int width,int height):

View File

@@ -68,6 +68,7 @@ class OSGGA_EXPORT AnimationPathManipulator : public MatrixManipulator
void init(const GUIEventAdapter& ea,GUIActionAdapter& us);
void home(const GUIEventAdapter& ea,GUIActionAdapter& us);
void home(double currentTime);
virtual bool handle(const GUIEventAdapter& ea,GUIActionAdapter& us);

View File

@@ -158,6 +158,14 @@ public:
*/
virtual void home(const GUIEventAdapter& ,GUIActionAdapter&) {}
/**
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.
*/
virtual void home(double /*currentTime*/) {}
/**
Start/restart the manipulator.
FIXME: what does this actually mean? Provide examples.

View File

@@ -67,6 +67,7 @@ class OSGGA_EXPORT TrackballManipulator : public MatrixManipulator
/** Move the camera to the default position.
May be ignored by manipulators if home functionality is not appropriate.*/
virtual void home(const GUIEventAdapter& ea,GUIActionAdapter& us);
virtual void home(double);
/** Start/restart the manipulator.*/
virtual void init(const GUIEventAdapter& ea,GUIActionAdapter& us);

View File

@@ -100,7 +100,9 @@ class OSGGA_EXPORT UFOManipulator : public osgGA::MatrixManipulator
/** Sets the viewpoint matrix to the home position */
virtual void home(const osgGA::GUIEventAdapter&, osgGA::GUIActionAdapter&) ;
void home(void);
void home(double);
virtual void init(const GUIEventAdapter& ,GUIActionAdapter&);
/** Handles incoming osgGA events */
bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter &aa);