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.2.4.1 2006/01/10 20:25:08 martius 00024 * moved to osg 00025 * 00026 * Revision 1.2 2005/09/22 12:24:36 martius 00027 * removed global variables 00028 * OdeHandle and GlobalData are used instead 00029 * sensor prepared 00030 * 00031 * Revision 1.1 2005/07/21 12:01:54 robot8 00032 * adding a new obstacle, which is similar to playground, but closed to all directions 00033 * 00034 * Revision 1.6 2005/07/18 14:52:33 martius 00035 * world and space are not pointers anymore. 00036 * 00037 * Revision 1.5 2005/07/07 10:24:23 martius 00038 * avoid internal collisions 00039 * 00040 * Revision 1.4 2005/06/15 14:22:11 martius 00041 * GPL included 00042 * * 00043 ***************************************************************************/ 00044 #ifndef __CLOSEDPLAYGROUND_H 00045 #define __CLOSEDPLAYGROUND_H 00046 00047 00048 #include "playground.h" 00049 00050 namespace lpzrobots { 00051 00052 class ClosedPlayground : public Playground { 00053 protected: 00054 Box* roof; 00055 public: 00056 00057 public: 00058 00059 ClosedPlayground(const OdeHandle& odeHandle, const OsgHandle& osgHandle , 00060 const osg::Vec3& dimension = osg::Vec3(7.0, 0.2, 0.5) , double factorxy = 1) 00061 :Playground(odeHandle, osgHandle, dimension, factorxy){ 00062 }; 00063 00064 00065 protected: 00066 virtual void create(){ 00067 Playground::create(); 00068 roof = new Box(length + 2 * width , (length * factorlength2) + 2 * width , width); 00069 roof->init(odeHandle, 0, osgHandle, Primitive::Geom | Primitive::Draw); 00070 00071 roof->setPosition(pos + osg::Vec3(0,0,height+width/2)); 00072 }; 00073 00074 00075 virtual void destroy(){ 00076 Playground::destroy(); 00077 00078 if(roof) delete roof; 00079 } 00080 }; 00081 00082 } 00083 00084 #endif