00001 /* 00002 Enki - a fast 2D robot simulator 00003 Copyright (C) 1999-2005 Stephane Magnenat <stephane at magnenat dot net> 00004 Copyright (C) 2005 Laboratory of Intelligent Systems, EPFL, Lausanne 00005 See AUTHORS for details 00006 00007 This program is free software; the authors of any publication 00008 arising from research using this software are asked to add the 00009 following reference: 00010 Enki - a fast 2D robot simulator part of the Teem framework 00011 http://teem.epfl.ch 00012 Stephane Magnenat <stephane at magnenat dot net>, 00013 Markus Waibel <markus dot waibel at epfl dot ch> 00014 Laboratory of Intelligent Systems, EPFL, Lausanne. 00015 00016 You can redistribute this program and/or modify 00017 it under the terms of the GNU General Public License as published by 00018 the Free Software Foundation; either version 2 of the License, or 00019 (at your option) any later version. 00020 00021 This program is distributed in the hope that it will be useful, 00022 but WITHOUT ANY WARRANTY; without even the implied warranty of 00023 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00024 GNU General Public License for more details. 00025 00026 You should have received a copy of the GNU General Public License 00027 along with this program; if not, write to the Free Software 00028 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00029 */ 00030 00031 #ifndef __SBOTOBJECT_H 00032 #define __SBOTOBJECT_H 00033 00034 #include <enki/Interaction.h> 00035 #include <enki/PhysicalEngine.h> 00036 00040 namespace Enki 00041 { 00043 00044 class SbotFeeding : public LocalInteraction 00045 { 00046 public: 00048 double actualEnergy; 00050 double actualTime; 00052 double activeDuration; 00054 double inactiveDuration; 00056 An::Color activeColor; 00058 An::Color inactiveColor; 00060 bool consumeEnergy; 00062 double dEnergyActive; 00064 double dEnergyInactive; 00065 00066 public : 00068 SbotFeeding(double r, Robot *owner); 00069 virtual void objectStep (double dt, PhysicalObject *po, World *w); 00070 virtual void finalize(double dt); 00071 }; 00072 00074 00075 class SbotActiveObject : public Robot 00076 { 00077 public: 00079 SbotFeeding feeding; 00080 00081 public: 00083 SbotActiveObject(double objectRadius, double actionRange); 00084 }; 00085 } 00086 #endif 00087