00001
00012 #ifndef __POINT_H__
00013 #define __POINT_H__
00014
00015 #include <global.h>
00016 #include <cad_object.h>
00017
00018 #include <math.h>
00019 #include <values.h>
00020
00024 #define NULL_POINT Point(0, 0, 0)
00025
00029 #define MAXIMUM_POSSIBLE_POINT Point(MAXFLOAT, MAXFLOAT, MAXFLOAT)
00030
00034 #define MINIMUM_POSSIBLE_POINT Point(-MAXFLOAT, -MAXFLOAT, -MAXFLOAT)
00035
00039 class Point : public CadObject {
00040 public:
00048 Point(Coordinate x,
00049 Coordinate y,
00050 Coordinate z);
00051
00058 Coordinate getCoordinate(Axis axis);
00059
00064 virtual const DataType getDataType();
00065
00070 virtual int getDimension();
00071
00076 virtual Point getMaxPoint();
00077
00082 virtual Point getMinPoint();
00083
00088 Coordinate getX();
00089
00094 Coordinate getY();
00095
00100 Coordinate getZ();
00101
00105 virtual void print();
00106
00114 void set(Coordinate x, Coordinate y, Coordinate z);
00115
00122 void setCoordinate(Axis axis, Coordinate value);
00123
00128 void setX(Coordinate value);
00129
00134 void setY(Coordinate value);
00135
00140 void setZ(Coordinate value);
00141
00146 Coordinate operator[](Axis axis);
00147
00148 private:
00152 Coordinate coordinates[DIMENSIONS];
00153 };
00154
00155
00156
00164 bool operator==(Point p1, Point p2);
00165
00174 bool operator<(Point p1, Point p2);
00175
00183 bool operator<<(Point p1, Point p2);
00184
00185 #endif // ! __POINT_H__