Robot Simulator of the Robotics Group for Self-Organization of Control  0.8.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cameramanipulatorFollow.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005-2011 LpzRobots development team *
3  * Georg Martius <georg dot martius at web dot de> *
4  * Frank Guettler <guettler at informatik dot uni-leipzig dot de *
5  * Frank Hesse <frank at nld dot ds dot mpg dot de> *
6  * Ralf Der <ralfder at mis dot mpg dot de> *
7  * *
8  * This program is free software; you can redistribute it and/or modify *
9  * it under the terms of the GNU General Public License as published by *
10  * the Free Software Foundation; either version 2 of the License, or *
11  * (at your option) any later version. *
12  * *
13  * This program is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16  * GNU General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License *
19  * along with this program; if not, write to the *
20  * Free Software Foundation, Inc., *
21  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
22  * *
23  ***************************************************************************/
24 #ifndef __CAMERAMANIPULATORFOLLOW_H
25 #define __CAMERAMANIPULATORFOLLOW_H
26 
27 #include "osgforwarddecl.h"
28 #include "cameramanipulator.h"
29 
30 namespace lpzrobots {
31 
32  /**
33  CameraManipulatorFollow is a MatrixManipulator which provides Flying simulator-like
34  updating of the camera position & orientation.
35  Left mouse button: Pan and tilt
36  Right mouse button: forward and sideways
37  Middle mouse button: up and sideways
38  */
39 
41 
42  /** returns the classname of the manipulator
43  it's NECCESSARY to define this funtion, otherwise
44  the new manipulator WON'T WORK! (but ask me not why)
45  */
46  virtual const char* className() const { return "Following Camera"; }
47 
48  public:
49 
50  CameraManipulatorFollow(osg::Node* node,GlobalData& global, CameraHandle& cameraHandle);
51 
52  protected:
53 
54  virtual ~CameraManipulatorFollow();
55 
56  /** This handles robot movements, so that the camera movemenent is right affected.
57  should be overwritten by new cameramanipulator
58  */
59  virtual void calcMovementByAgent();
60 
61 
62  /** Sets the right view and eye if the robot has changed.
63  Is called from manageRobots();
64  should be overwritten by new cameramanipulator if needed
65  */
66  virtual void setHomeViewByAgent();
67 
68 
69 
70  };
71 }
72 
73 #endif
CameraManipulator is a MatrixManipulator which provides a flying camera updating of the camera positi...
Definition: cameramanipulator.h:55
virtual void calcMovementByAgent()
This handles robot movements, so that the camera movemenent is right affected.
Definition: cameramanipulatorFollow.cpp:41
osg::ref_ptr< osg::Node > node
Definition: cameramanipulator.h:160
virtual ~CameraManipulatorFollow()
Definition: cameramanipulatorFollow.cpp:39
virtual void setHomeViewByAgent()
Sets the right view and eye if the robot has changed.
Definition: cameramanipulatorFollow.cpp:56
Class which holds all data used by CameraManipulators.
Definition: camerahandle.h:54
Data structure holding all essential global information.
Definition: globaldata.h:57
CameraManipulatorFollow(osg::Node *node, GlobalData &global, CameraHandle &cameraHandle)
Definition: cameramanipulatorFollow.cpp:36
CameraManipulatorFollow is a MatrixManipulator which provides Flying simulator-like updating of the c...
Definition: cameramanipulatorFollow.h:40