Main Page | Namespace List | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

Doca.h

Go to the documentation of this file.
00001 
00009 #ifndef Doca_H
00010 #define Doca_H
00011 
00012 #include "geometry/Ray.h"
00013 
00029 namespace {
00030     const Point  p_nullRay(0., 0., 0.);
00031     const Vector v_nullRay(0., 0., 0.);
00032     const Ray    nullRay(p_nullRay, v_nullRay);
00033 }
00034 class Doca
00035 {
00036 public:
00037     Doca(const Ray& ray1, const Ray& ray2=nullRay);
00038     Doca(const Point& point1, const Vector& vector1,
00039         const Point& point2=p_nullRay, const Vector& vector2=v_nullRay);
00040     ~Doca() {}
00041     
00043     double docaRay1Ray2()   {return doca;}
00045     double arcLenRay1()     {return s;}
00047     double arcLenRay2()     {return t;}
00049     Point  docaPointRay1();
00051     Point  docaPointRay2();
00053     double docaOfPoint(const Point& p);
00054     
00055 private:
00056     // stuff common to both constructors
00057     void ini();
00058     enum mode {LINELINE, LINEPOINT};
00060     Point  P;
00062     Vector u;
00064     Point  Q;
00066     Vector v;
00068     double doca;
00070     double s;
00072     double t;
00074     mode m_mode;
00076     Point p1;
00077 };
00078 
00079 #endif

Generated on Mon Dec 1 20:09:05 2008 by doxygen 1.3.3