Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Interaction.h

Go to the documentation of this file.
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 __INTERACTION_H
00032 #define __INTERACTION_H
00033 
00042 namespace Enki
00043 {
00044     class PhysicalObject;
00045     class Robot;
00046     class World;
00047 
00049 
00050     class LocalInteraction
00051     {
00052     protected:
00054         double r;
00055 
00057         friend class Robot;
00059         Robot *owner;
00060 
00061     public :
00063         virtual ~LocalInteraction() { }
00065         virtual void init() { }
00067         virtual void objectStep(double dt, PhysicalObject *po, World *w) { }
00069         virtual void wallsStep(World *w) { }
00071         virtual void finalize(double dt) { }
00073         double getRange() const { return r; }
00074     };
00075 
00077 
00078     class GlobalInteraction
00079     {
00080     protected:
00082         Robot *owner;
00083 
00084     public :
00086         virtual ~GlobalInteraction() { }
00088         virtual void init() { }
00090         virtual void step(double dt, World *w) { }
00092         virtual void finalize() { }
00093     };
00094 }
00095 #endif
00096 

Generated on Mon Oct 24 17:33:58 2005 for Enki by  doxygen 1.4.2