closedplayground.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 * * 00007 * This program is free software; you can redistribute it and/or modify * 00008 * it under the terms of the GNU General Public License as published by * 00009 * the Free Software Foundation; either version 2 of the License, or * 00010 * (at your option) any later version. * 00011 * * 00012 * This program is distributed in the hope that it will be useful, * 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00015 * GNU General Public License for more details. * 00016 * * 00017 * You should have received a copy of the GNU General Public License * 00018 * along with this program; if not, write to the * 00019 * Free Software Foundation, Inc., * 00020 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00021 * * 00022 * $Log: closedplayground.h,v $ 00023 * Revision 1.5 2006/09/12 08:23:13 robot8 00024 * -corrected the wrong call for pos with getPosition () 00025 * 00026 * Revision 1.4 2006/08/11 15:41:04 martius 00027 * playgrounds handle non-quadratic ground planes 00028 * 00029 * Revision 1.3 2006/07/14 12:23:32 martius 00030 * selforg becomes HEAD 00031 * 00032 * Revision 1.2.4.2 2006/05/11 08:59:15 robot3 00033 * -fixed a positioning bug (e.g. for passivesphere) 00034 * -some methods moved to abstractobstacle.h for avoiding inconsistencies 00035 * 00036 * Revision 1.2.4.1 2006/01/10 20:25:08 martius 00037 * moved to osg 00038 * 00039 * Revision 1.2 2005/09/22 12:24:36 martius 00040 * removed global variables 00041 * OdeHandle and GlobalData are used instead 00042 * sensor prepared 00043 * 00044 * Revision 1.1 2005/07/21 12:01:54 robot8 00045 * adding a new obstacle, which is similar to playground, but closed to all directions 00046 * 00047 * Revision 1.6 2005/07/18 14:52:33 martius 00048 * world and space are not pointers anymore. 00049 * 00050 * Revision 1.5 2005/07/07 10:24:23 martius 00051 * avoid internal collisions 00052 * 00053 * Revision 1.4 2005/06/15 14:22:11 martius 00054 * GPL included 00055 * * 00056 ***************************************************************************/ 00057 #ifndef __CLOSEDPLAYGROUND_H 00058 #define __CLOSEDPLAYGROUND_H 00059 00060 00061 #include "playground.h" 00062 00063 namespace lpzrobots { 00064 00065 class ClosedPlayground : public Playground { 00066 00067 protected: 00068 Box* roof; 00069 00070 public: 00071 00072 ClosedPlayground(const OdeHandle& odeHandle, const OsgHandle& osgHandle , 00073 const osg::Vec3& dimension = osg::Vec3(7.0, 0.2, 0.5) , double factorxy = 1) 00074 : Playground(odeHandle, osgHandle, dimension, factorxy){ 00075 }; 00076 00077 00078 protected: 00079 virtual void create(){ 00080 Playground::create(); 00081 roof = new Box(length + 2 * width , (length * factorlength2) + 2 * width , width); 00082 roof->init(odeHandle, 0, osgHandle, Primitive::Geom | Primitive::Draw); 00083 00084 roof->setPosition(getPosition () + osg::Vec3(0,0,height+width/2)); 00085 }; 00086 00087 00088 virtual void destroy(){ 00089 Playground::destroy(); 00090 00091 if(roof) delete roof; 00092 } 00093 }; 00094 00095 } 00096 00097 #endif

Generated on Tue Jan 16 02:14:35 2007 for Robotsystem of the Robot Group Leipzig by doxygen 1.3.8