CameraViewSwitchManipulator
Go to the documentation of this file.
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 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_VIEWLISTMANIPULATOR
#define OSGGA_VIEWLISTMANIPULATOR 1
#include <osgGA/CameraManipulator>
#include <osg/Quat>
#include <osg/CameraView>
namespace osgGA{
class OSGGA_EXPORT CameraViewSwitchManipulator : public CameraManipulator
{
public:
CameraViewSwitchManipulator() {}
virtual const char* className() const { return "CameraViewSwitcher"; }
virtual void setByMatrix(const osg::Matrixd& /*matrix*/) {}
virtual void setByInverseMatrix(const osg::Matrixd& /*matrix*/) {}
virtual osg::Matrixd getMatrix() const;
virtual osg::Matrixd getInverseMatrix() const;
virtual void setNode(osg::Node*);
virtual const osg::Node* getNode() const { return _node.get();}
virtual osg::Node* getNode() { return _node.get();}
virtual void init(const GUIEventAdapter& /*ea*/,GUIActionAdapter& /*aa*/) { _currentView = 0; }
virtual bool handle(const GUIEventAdapter& ea,GUIActionAdapter& us);
virtual void getUsage(osg::ApplicationUsage& usage) const;
typedef std::vector< osg::ref_ptr<osg::CameraView> > CameraViewList;
protected:
virtual ~CameraViewSwitchManipulator() {}
osg::ref_ptr<osg::Node> _node;
CameraViewList _cameraViews;
unsigned int _currentView;
};
}
#endif
CameraManipulator
CameraView
Quat
osgGA::CameraManipulator::CameraManipulator
CameraManipulator()
osgGA::CameraViewSwitchManipulator::init
virtual void init(const GUIEventAdapter &, GUIActionAdapter &)
Definition CameraViewSwitchManipulator:56
osgGA::CameraViewSwitchManipulator::className
virtual const char * className() const
Definition CameraViewSwitchManipulator:28
osgGA::CameraViewSwitchManipulator::getNode
virtual osg::Node * getNode()
Definition CameraViewSwitchManipulator:53
osgGA::CameraViewSwitchManipulator::_node
osg::ref_ptr< osg::Node > _node
Definition CameraViewSwitchManipulator:70
osgGA::CameraViewSwitchManipulator::handle
virtual bool handle(const GUIEventAdapter &ea, GUIActionAdapter &us)
osgGA::CameraViewSwitchManipulator::setByMatrix
virtual void setByMatrix(const osg::Matrixd &)
Definition CameraViewSwitchManipulator:31
osgGA::CameraViewSwitchManipulator::~CameraViewSwitchManipulator
virtual ~CameraViewSwitchManipulator()
Definition CameraViewSwitchManipulator:68
osgGA::CameraViewSwitchManipulator::_currentView
unsigned int _currentView
Definition CameraViewSwitchManipulator:73
osgGA::CameraViewSwitchManipulator::setByInverseMatrix
virtual void setByInverseMatrix(const osg::Matrixd &)
Definition CameraViewSwitchManipulator:34
osgGA::CameraViewSwitchManipulator::getInverseMatrix
virtual osg::Matrixd getInverseMatrix() const
osgGA::CameraViewSwitchManipulator::getNode
virtual const osg::Node * getNode() const
Definition CameraViewSwitchManipulator:50
osgGA::CameraViewSwitchManipulator::_cameraViews
CameraViewList _cameraViews
Definition CameraViewSwitchManipulator:72
osgGA::CameraViewSwitchManipulator::getMatrix
virtual osg::Matrixd getMatrix() const
osgGA::CameraViewSwitchManipulator::CameraViewSwitchManipulator
CameraViewSwitchManipulator()
Definition CameraViewSwitchManipulator:26
osgGA::CameraViewSwitchManipulator::getUsage
virtual void getUsage(osg::ApplicationUsage &usage) const
osgGA::CameraViewSwitchManipulator::setNode
virtual void setNode(osg::Node *)
osgGA::CameraViewSwitchManipulator::CameraViewList
std::vector< osg::ref_ptr< osg::CameraView > > CameraViewList
Definition CameraViewSwitchManipulator:64
osgGA::GUIActionAdapter
Definition GUIActionAdapter:62
osgGA::GUIEventAdapter
Definition GUIEventAdapter:82
osg::ApplicationUsage
Definition ApplicationUsage:26
osg::Matrixd
Definition Matrixd:27
osg::Node
Definition Node:72
osg::ref_ptr
Definition ref_ptr:32
osgGA
Definition Callback:21
OSGGA_EXPORT
#define OSGGA_EXPORT
Definition osgGA/Export:40