Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

point3d.h

Go to the documentation of this file.
00001 //----------------------------------------------------------------------
00002 //               The Motion Strategy Library (MSL)
00003 //----------------------------------------------------------------------
00004 //
00005 // Copyright (c) University of Illinois and Steven M. LaValle.     
00006 // All Rights Reserved.
00007 //
00008 // Permission to use, copy, and distribute this software and its
00009 // documentation is hereby granted free of charge, provided that
00010 // (1) it is not a component of a commercial product, and
00011 // (2) this notice appears in all copies of the software and
00012 //     related documentation.
00013 //
00014 // The University of Illinois and the author make no representations
00015 // about the suitability or fitness of this software for any purpose.
00016 // It is provided "as is" without express or implied warranty.
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   //friend istream& operator>>(istream& is, list<MSLPoint3d> & vl);
00061   //friend ostream& operator<<(ostream& os, const list<MSLPoint3d> & vl);
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 
Motion Strategy Library


Web page maintained by Steve LaValle