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

Generated on Mon Aug 7 16:40:14 2006 for Robotsystem of the Robot Group Leipzig by  doxygen 1.4.7