Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

geom.h

Go to the documentation of this file.
00001 //----------------------------------------------------------------------
00002 //               The Motion Strategy Library (MSL)
00003 //----------------------------------------------------------------------
00004 //
00005 // Copyright (c) University of Illinois and Steven M. LaValle.     
00006 // All Rights Reserved.
00007 // 
00008 // Permission to use, copy, and distribute this software and its 
00009 // documentation is hereby granted free of charge, provided that 
00010 // (1) it is not a component of a commercial product, and 
00011 // (2) this notice appears in all copies of the software and
00012 //     related documentation. 
00013 // 
00014 // The University of Illinois and the author make no representations
00015 // about the suitability or fitness of this software for any purpose.  
00016 // It is provided "as is" without express or implied warranty.
00017 //----------------------------------------------------------------------
00018 
00019 #ifndef MSL_GEOM_H
00020 #define MSL_GEOM_H
00021 
00022 
00023 // The world places objects using configuration (model uses state).
00024 // Each derived class can define Obst and Robot however it likes.
00025 // Methods such as "GeomToPolygons" can give output in whatever 
00026 //  format is requested.  So far, only list<polygon> is shown,
00027 //  but we could imagine an OpenInventor model, Geomview model, etc.
00028 
00030 
00040 //#include <list.h>
00041 #include <string>
00042 
00043 #include "vector.h"
00044 #include "util.h"
00045 
00046 class Geom {
00047  protected:
00048   string FilePath;
00049  public:
00051   Geom(string path);
00052 
00054   virtual ~Geom() {};
00055 
00057   int NumBodies;
00058 
00060   int GeomDim;
00061 
00063   virtual bool CollisionFree(const MSLVector &q) = 0; // Input is configuration
00064 
00067   virtual double DistanceComp(const MSLVector &q) = 0;  // Distance in world
00068 
00070   MSLVector MaxDeviates;
00071 
00075   virtual MSLVector ConfigurationDifference(const MSLVector &q1, 
00076                                             const MSLVector &q2); 
00077 };
00078 
00079 
00081 class GeomNone: public Geom {
00082  public:
00083   GeomNone(string path);
00084   virtual ~GeomNone() {};
00085   virtual bool CollisionFree(const MSLVector &q){return true;} 
00086   virtual double DistanceComp(const MSLVector &q){return 10000.0;}
00087 };
00088 
00089 #endif
Motion Strategy Library


Web page maintained by Steve LaValle