primitivecomponent.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 * marcel@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 #ifndef __PRIMTIVECOMPONENT_h 00024 #define __PRIMTIVECOMPONENT_h 00025 00026 00027 #include "components.h" 00028 00029 00030 namespace lpzrobots 00031 { 00032 00033 /** 00034 * Component consisting of one Primitive 00035 * 00036 * 00037 */ 00038 class PrimitiveComponent : public Component 00039 { 00040 public: 00041 00042 PrimitiveComponent( Primitive* p, const OdeHandle &odeHandle, const OsgHandle &osgHandle, const ComponentConf& conf); 00043 00044 ~PrimitiveComponent (); 00045 00046 public: 00047 00048 virtual void update (); 00049 virtual void place (const Pos &pos); 00050 virtual void place (const osg:Matrix&); 00051 00052 00053 // virtual void setColor (const Color &col); sets color of the robot; not nessecary 00054 00055 virtual Position getPosition () const; //returns position of the object; relates to the robot or Primitive belonging to the component 00056 00057 /** 00058 *return reference to the simple Primitive, or to the main Primitive of the robot assigend to the component. If nothimng is assigned, NULL is returned. 00059 **/ 00060 virtual Primitive* getMainPrimitive () const; 00061 00062 protected: 00063 Primitive* primitive; 00064 00065 }; 00066 00067 } 00068 #endif

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