OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CameraViewSwitchManipulator.h
Go to the documentation of this file.
1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2  *
3  * This library is open source and may be redistributed and/or modified under
4  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5  * (at your option) any later version. The full license is in LICENSE file
6  * included with this distribution, and on the openscenegraph.org website.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * OpenSceneGraph Public License for more details.
12 */
13 
14 #ifndef OSGGA_VIEWLISTMANIPULATOR
15 #define OSGGA_VIEWLISTMANIPULATOR 1
16 
17 #include <osgGA/CameraManipulator>
18 #include <osg/Quat>
19 #include <osg/CameraView>
20 
21 namespace osgGA{
22 
24 {
25  public:
27 
28  virtual const char* className() const { return "CameraViewSwitcher"; }
29 
31  virtual void setByMatrix(const osg::Matrixd& /*matrix*/) {}
32 
34  virtual void setByInverseMatrix(const osg::Matrixd& /*matrix*/) {}
35 
37  virtual osg::Matrixd getMatrix() const;
38 
40  virtual osg::Matrixd getInverseMatrix() const;
41 
42 
47  virtual void setNode(osg::Node*);
48 
50  virtual const osg::Node* getNode() const { return _node.get();}
51 
53  virtual osg::Node* getNode() { return _node.get();}
54 
56  virtual void init(const GUIEventAdapter& /*ea*/,GUIActionAdapter& /*aa*/) { _currentView = 0; }
57 
59  virtual bool handle(const GUIEventAdapter& ea,GUIActionAdapter& us);
60 
62  virtual void getUsage(osg::ApplicationUsage& usage) const;
63 
64  typedef std::vector< osg::ref_ptr<osg::CameraView> > CameraViewList;
65 
66  protected:
67 
69 
71 
72  CameraViewList _cameraViews;
73  unsigned int _currentView;
74 };
75 
76 }
77 
78 #endif
79 
virtual void init(const GUIEventAdapter &, GUIActionAdapter &)
#define OSGGA_EXPORT
Definition: Export.h:40
std::vector< osg::ref_ptr< osg::CameraView > > CameraViewList
virtual const osg::Node * getNode() const
virtual void setByMatrix(const osg::Matrixd &)
virtual void setByInverseMatrix(const osg::Matrixd &)
Definition: Node.h:71