cameramanipulatorTV.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2005-2011 LpzRobots development team                    *
00003  *    Georg Martius  <georg dot martius at web dot de>                     *
00004  *    Frank Guettler <guettler at informatik dot uni-leipzig dot de        *
00005  *    Frank Hesse    <frank at nld dot ds dot mpg dot de>                  *
00006  *    Ralf Der       <ralfder at mis dot mpg dot de>                       *
00007  *                                                                         *
00008  *   This program is free software; you can redistribute it and/or modify  *
00009  *   it under the terms of the GNU General Public License as published by  *
00010  *   the Free Software Foundation; either version 2 of the License, or     *
00011  *   (at your option) any later version.                                   *
00012  *                                                                         *
00013  *   This program is distributed in the hope that it will be useful,       *
00014  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00015  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00016  *   GNU General Public License for more details.                          *
00017  *                                                                         *
00018  *   You should have received a copy of the GNU General Public License     *
00019  *   along with this program; if not, write to the                         *
00020  *   Free Software Foundation, Inc.,                                       *
00021  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00022  *                                                                         *
00023  ***************************************************************************/
00024 #ifndef __CAMERAMANIPULATORTV_H
00025 #define __CAMERAMANIPULATORTV_H
00026 
00027 #include "osgforwarddecl.h"
00028 #include "cameramanipulator.h"
00029 
00030 namespace lpzrobots {
00031 
00032   /**
00033      CameraManipulatorTV is a MatrixManipulator which provides Flying simulator-like
00034      updating of the camera position & orientation. 
00035      Left mouse button: Pan and tilt
00036      Right mouse button: forward and sideways
00037      Middle mouse button: up and sideways
00038   */
00039 
00040   class CameraManipulatorTV : public CameraManipulator {
00041 
00042   public:
00043     
00044     CameraManipulatorTV(osg::Node* node,GlobalData& global, CameraHandle& cameraHandle);
00045     
00046     /** returns the classname of the manipulator
00047         it's NECCESSARY to define this funtion, otherwise
00048         the new manipulator WON'T WORK! (but ask me not why)
00049      */
00050     virtual const char* className() const { return "TV-Camera"; }
00051   
00052   protected:
00053     
00054     virtual ~CameraManipulatorTV();
00055     
00056     /** This handles robot movements, so that the camera movemenent is right affected.
00057         should be overwritten by new cameramanipulator
00058     */
00059        virtual void calcMovementByAgent();
00060     
00061     /** Sets the right view and eye if the robot has changed.
00062         Is called from manageRobots();
00063         should be overwritten by new cameramanipulator
00064     */
00065         virtual void setHomeViewByAgent();
00066         virtual void setHomeEyeByAgent();
00067    
00068   };
00069 }
00070 
00071 #endif
Generated on Thu Jun 28 14:45:36 2012 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.6.3