////////////////////////////////////////////////////////////////
//
// 
//
//
////////////////////////////////////////////////////////////////
#ifndef WOLRD_H
#define WOLRD_H


#include <list>
#include <string>
#include <iostream>
#include <dolt.h>

using namespace std;
using namespace dolt;

class Obstacle : public dolt::drawablePolygon {
public:
  string name;
  Obstacle() { setColor(dolt::Color("mediumblue")); }
};


class World {
public:
  string name;
  dolt::drawablePolygon *boundary;
  std::list<Obstacle*> obstacles;

  World(const char* fname, bool verbose=false);  // read in a world from a file

  Bbox bbox() const { return boundary->bbox(); }
};


class Robot : public dolt::drawablePolygon {
private:
  double x,y,ang; 		// current configuration
public:
  string name;
  Polygon shape;   // shape in robot frame; origin is reference point,
		   // and positive x axis is forwards
  Robot(const char* fname, bool verbose=false, 
	double X=0.0, double Y=0.0, double Ang=0.0);

  // set the robot configuration and recalculate drawablePolygon
  // points so that the robot displays at the correct position and
  // orientation
  void setConfig(double X, double Y, double Ang);

  void getConfig(double *X, double *Y, double *Ang);
};



#endif

