00001 /*************************************************************************** 00002 * Copyright (C) 2005 by Robot Group Leipzig * 00003 * martius@informatik.uni-leipzig.de * 00004 * fhesse@informatik.uni-leipzig.de * 00005 * der@informatik.uni-leipzig.de * 00006 * frankguettler@gmx.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 * $Log: camera.h,v $ 00024 * Revision 1.8.4.2 2005/12/06 10:13:26 martius 00025 * openscenegraph integration started 00026 * 00027 * Revision 1.8.4.1 2005/11/14 17:37:25 martius 00028 * moved to selforg 00029 * 00030 * Revision 1.8 2005/09/20 10:55:15 robot3 00031 * camera module: 00032 * -pressing key c now centers on focused robot 00033 * -pressing key b now moves 5.0f behind the robot 00034 * -fixed a few bugs (nullpointer crashes etc.) 00035 * 00036 * Revision 1.7 2005/09/02 17:19:24 martius 00037 * camera modes changed 00038 * 00039 * Revision 1.6 2005/08/23 11:41:20 robot1 00040 * advancedFollowing mode included 00041 * 00042 * Revision 1.5 2005/08/22 12:38:32 robot1 00043 * -advancedTV mode implemented, early version 00044 * -internal code optimized 00045 * -printMode prints now the current camera mode on stdout 00046 * 00047 * Revision 1.4 2005/08/12 11:56:46 robot1 00048 * tiny bugfixing 00049 * 00050 * Revision 1.3 2005/08/09 11:08:49 robot1 00051 * following mode included 00052 * 00053 * 00054 * Revision 1.1 2005/08/08 11:06:47 martius 00055 * camera is a module for camera movements 00056 * includes cleaned 00057 * 00058 * * 00059 ***************************************************************************/ 00060 #ifndef __CAMERA_H 00061 #define __CAMERA_H 00062 00063 #include "oderobot.h" 00064 00065 namespace lpzrobots { 00066 00067 typedef enum CameraType { Static, TV, Following, advancedTV, advancedFollowing}; 00068 00069 // moves the camera so that the robot is the watching object 00070 // cameraType decides which type of camera movement is used 00071 void moveCamera( CameraType camType, OdeRobot& robot); 00072 00073 // moves camera behind the robot 00074 void moveBehindRobot(OdeRobot& robot); 00075 00076 // moves camera to robot position 00077 void moveOnRobot(OdeRobot& robot); 00078 00079 // prints the last used camera mode 00080 void printMode(CameraType camType); 00081 00082 } 00083 #endif