camerahandle.h

Go to the documentation of this file.
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  *    guettler@informatik.uni-leipzig.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  *  DESCRIPTION                                                            *
00025  *  
00026  *                                                                         *
00027  *                                                                         *
00028  *  $Log: camerahandle.h,v $
00029  *  Revision 1.1  2009/07/30 11:52:32  guettler
00030  *  new CameraHandle replacing static variables in the CameraManipulators
00031  *                                                                                 *
00032  *                                                                         *
00033  **************************************************************************/
00034 #ifndef _CAMERAHANDLE_H_
00035 #define _CAMERAHANDLE_H_
00036 
00037 
00038 #include <selforg/position.h>
00039 #include <osg/Vec3f>
00040 
00041 // forward declarations
00042 namespace lpzrobots
00043 {
00044   class OSGPrimitive;
00045   class OdeAgent;
00046 }
00047 
00048 namespace osg
00049 {
00050   class Vec3f;
00051   typedef Vec3f Vec3;
00052 }
00053 
00054 namespace lpzrobots
00055 {
00056 
00057   /**
00058    * Class which holds all data used by CameraManipulators.
00059    * The avoidance of static variables enables multithreaded (tasked)
00060    * simulations.
00061    */
00062   class CameraHandle
00063   {
00064   public:
00065     enum ManipulationType { No, Translational, Rotational};
00066 
00067     osg::Vec3 eye;
00068     osg::Vec3 view;
00069     osg::Vec3 home_eye;
00070     osg::Vec3 home_view;
00071     osg::Vec3 desiredEye;
00072     osg::Vec3 desiredView;
00073     bool home_externally_set;
00074     OdeAgent* watchingAgent;
00075     bool watchingAgentDefined;
00076     Position oldPositionOfAgent;
00077     bool oldPositionOfAgentDefined;
00078 
00079     ManipulationType doManipulation;
00080     osg::Vec3 manipulationPoint;
00081     OSGPrimitive* manipulationViz;
00082 
00083     CameraHandle();
00084 
00085     virtual ~CameraHandle();
00086   };
00087 
00088 }
00089 
00090 #endif /* _CAMERAHANDLE_H_ */

Generated on Fri Oct 30 16:29:01 2009 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.4.7