00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MSL_POINT3D_H
00020 #define MSL_POINT3D_H
00021
00022
00023 #include <iostream>
00024 #include <list>
00025 using namespace std;
00026
00027
00028 #include "mslio.h"
00029
00030 class MSLPoint3d
00031 {
00032 double xrep;
00033 double yrep;
00034 double zrep;
00035
00036 public:
00037
00038 MSLPoint3d();
00039 MSLPoint3d(double x, double y, double z);
00040 ~MSLPoint3d() {}
00041 double xcoord() const { return xrep; }
00042 double ycoord() const { return yrep; }
00043 double zcoord() const { return zrep; }
00044 double W() const { return 1; }
00045 double WD() const { return 1; }
00046 int dim() const { return 3; }
00047 double sqr_dist(const MSLPoint3d& q) const;
00048 double xdist(const MSLPoint3d& q) const;
00049 double ydist(const MSLPoint3d& q) const;
00050 double zdist(const MSLPoint3d& q) const;
00051 double distance(const MSLPoint3d& q) const;
00052 MSLPoint3d translate(double dx, double dy, double dz) const;
00053 MSLPoint3d reflect(const MSLPoint3d& q, const MSLPoint3d& r,
00054 const MSLPoint3d& s) const;
00055 MSLPoint3d reflect(const MSLPoint3d& q) const;
00056 bool operator==(const MSLPoint3d& q) const;
00057 bool operator!=(const MSLPoint3d& q) const { return !operator==(q);}
00058 friend ostream& operator<<(ostream& O, const MSLPoint3d& p) ;
00059 friend istream& operator>>(istream& I, MSLPoint3d& p) ;
00060
00061
00062 };
00063
00064 ostream& operator<<(ostream& O, const MSLPoint3d& p) ;
00065 istream& operator>>(istream& I, MSLPoint3d& p) ;
00066
00067 #endif
00068
00069
00070
00071
00072