00001
00002
00003
00004
00005
00006
00007 #ifndef __POINT3D_H_
00008 #define __POINT3D_H_
00009
00010 #include "MathsStruct.h"
00011
00012 class Vector3D;
00013
00015
00016 class Point3D
00017 {
00018 private:
00019
00020 float x,y,z;
00021
00022 public:
00023
00024 Point3D();
00025 Point3D(const float x, const float y, const float z);
00026
00027
00028
00030
00031 void Round();
00032
00033 void GetValues(float &x, float &y, float &z) const;
00034 void SetValues(const float x, const float y, const float z);
00035
00037
00038 void Negate();
00039
00040 double Distance(const Point3D &p) const;
00041 double DistanceSquared(const Point3D &p) const;
00042
00043 void Translate(const Vector3D &v);
00044
00046
00047
00048 void glTranslate(void) const;
00049 void glVertex(void) const;
00050
00052
00053 Point3D operator+(const Point3D &p) const;
00054 Point3D operator-(const Point3D &p) const;
00055 Point3D operator*(const float s) const;
00056 Point3D operator-(void) const;
00057
00058 Point3D operator+(const Vector3D &v) const;
00059 Point3D& operator+=(const Vector3D &v);
00060
00061 Point3D& operator=(const Point3D &p);
00062 Point3D& operator+=(const Point3D &p);
00063 Point3D& operator-=(const Point3D &p);
00064 Point3D& operator*=(const float s);
00065
00066 int operator==(const Point3D &p) const;
00067 int operator!=(const Point3D &p) const;
00068
00070
00071
00072 void Print(void);
00073
00074 };
00075
00077
00078 #endif // __POINT3D_H_