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 #include <stream.h>
00023 #include <list.h>
00024
00025
00026 class MSLPoint3d
00027 {
00028 double xrep;
00029 double yrep;
00030 double zrep;
00031
00032 public:
00033
00034 MSLPoint3d();
00035 MSLPoint3d(double x, double y, double z);
00036 ~MSLPoint3d() {}
00037 double xcoord() const { return xrep; }
00038 double ycoord() const { return yrep; }
00039 double zcoord() const { return zrep; }
00040 double W() const { return 1; }
00041 double WD() const { return 1; }
00042 int dim() const { return 3; }
00043 double sqr_dist(const MSLPoint3d& q) const;
00044 double xdist(const MSLPoint3d& q) const;
00045 double ydist(const MSLPoint3d& q) const;
00046 double zdist(const MSLPoint3d& q) const;
00047 double distance(const MSLPoint3d& q) const;
00048 MSLPoint3d translate(double dx, double dy, double dz) const;
00049 MSLPoint3d reflect(const MSLPoint3d& q, const MSLPoint3d& r,
00050 const MSLPoint3d& s) const;
00051 MSLPoint3d reflect(const MSLPoint3d& q) const;
00052 bool operator==(const MSLPoint3d& q) const;
00053 bool operator!=(const MSLPoint3d& q) const { return !operator==(q);}
00054 friend ostream& operator<<(ostream& O, const MSLPoint3d& p) ;
00055 friend istream& operator>>(istream& I, MSLPoint3d& p) ;
00056 friend istream& operator>>(istream& is, list<MSLPoint3d> & vl);
00057 friend ostream& operator<<(ostream& os, const list<MSLPoint3d> & vl);
00058 };
00059
00060 #endif
00061
00062
00063
00064
00065