00001
00002
00003 #ifndef PointTile_h
00004 #define PointTile_h
00005
00006 #include "Tile.h"
00007
00008 #include "Serializable.h"
00009
00010
00011 namespace BIE {
00012
00013
00015 class PointTile : public Tile
00016 {
00017
00018 public:
00019
00024 PointTile();
00025
00026
00031 PointTile(double, double, double, double);
00032
00034 PointTile* New();
00035
00037 void setup(double, double, double, double);
00038
00040 void corners(double&, double&, double&, double&);
00041
00043 double X(double, double);
00044
00046 double Y(double, double);
00047
00049 double measure(double, double);
00050
00052 bool InTile(double, double);
00053
00055 void print(ostream & outputstream);
00056
00058 void printforplot(ostream & outputstream);
00059
00061 bool overlapsWith(Tile *);
00062
00064 string toString();
00065
00066 private:
00068 vector<double> points;
00069
00071 static double min_distance;
00072
00073
00074 private:
00075 friend class boost::serialization::access;
00076 template<class Archive>
00077 void serialize(Archive & ar, const unsigned int version) {
00078 this->pre_serialize(ar, version);
00079 try {
00080 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Tile);
00081 BIE_CATCH_BOOST_SERIALIZATION_EXCEPTION;
00082 }
00083 try {
00084 ar & BOOST_SERIALIZATION_NVP(points);
00085 BIE_CATCH_BOOST_SERIALIZATION_EXCEPTION;
00086 }
00087 try {
00088 ar & BOOST_SERIALIZATION_NVP(min_distance);
00089 BIE_CATCH_BOOST_SERIALIZATION_EXCEPTION;
00090 }
00091 this->post_serialize(ar, version);
00092 }
00093
00094 };
00095
00096 }
00097 BIE_CLASS_TYPE_INFO(BIE::PointTile)
00098 BIE_CLASS_EXPORT_KEY(BIE::PointTile)
00099 #endif