00001
00012 #ifndef __GEN_HELP_H__
00013 #define __GEN_HELP_H__
00014
00015 #include <point.h>
00016 #include <quadrilateral.h>
00017 #include <triangle.h>
00018 #include <node_vec.h>
00019 #include <polygon.h>
00020 #include <exception.h>
00021
00031 class GenHelp {
00032 public:
00042 GenHelp(Hight maxTreeHight, Point minPoint, Point maxPoint)
00043 throw (NotEnoughMemoryException);
00044
00059 Axis bestAxis(NodeIndex current, NodeIndex end, NodeVec line,
00060 Direction direction);
00061
00068 Point getCadPoint(GeomPoint p);
00069
00075 GeomPoint getGeomPoint(Point p);
00076
00082 NodeIndex getNodeIndex(Point p);
00083
00093 Polygon getPolygon(Quadrilateral *q, Polygon* &t2);
00094
00101 Polygon getPolygon(Triangle *t);
00102
00103 private:
00110 Coordinate getCadCoord(GeomPoint p, Axis axis);
00111
00121 Coordinate getError(NodeVec fromTestpoint, NodeVec line);
00122
00129 Coordinate getGeomCoord(Point p, Axis axis);
00130
00138 Coordinate getMaxExtent(Point min, Point max);
00139
00143 Coordinate density;
00144
00149 Point min;
00150 };
00151
00152 #endif // ! __GEN_HELP_H__