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: DummyObstacle.h,v $ 00029 * Revision 1.2 2009/11/12 16:06:44 guettler 00030 * header guard corrected 00031 * 00032 * Revision 1.1 2009/11/12 16:05:11 guettler 00033 * new DummyObstacle which uses a DummyPrimitive 00034 * * 00035 * * 00036 **************************************************************************/ 00037 #ifndef __DUMMYOBSTACLE_H_ 00038 #define __DUMMYOBSTACLE_H_ 00039 00040 #include "abstractobstacle.h" 00041 00042 namespace lpzrobots { 00043 00044 /** 00045 * DummyObstacle which holds a DummyPrimitive (so getMainPrimitive() works). 00046 */ 00047 class DummyObstacle : public lpzrobots::AbstractObstacle { 00048 public: 00049 DummyObstacle(const OdeHandle& odeHandle, const OsgHandle& osgHandle); 00050 virtual ~DummyObstacle(); 00051 00052 /** 00053 * sets position of the obstacle and creates/recreates obstacle if necessary 00054 */ 00055 virtual void setPose(const osg::Matrix& pose); 00056 00057 /// return the "main" primitive of the obtactle. The meaning of "main" is arbitrary 00058 virtual Primitive* getMainPrimitive() const; 00059 00060 protected: 00061 /// overload this function to create the obstactle. All primitives should go into the list "obst" 00062 virtual void create(); 00063 }; 00064 00065 } 00066 00067 #endif /* __DUMMYOBSTACLE_H_ */