Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
line2D.hpp
00001 #ifndef LINE_2D_HPP
00002 #define LINE_2D_HPP
00003 
00004 #include "jmath/jblas.hpp"
00005 #include <iostream>
00006 #include "model3d/point2D.hpp"
00007 
00008 namespace jafar {
00010   namespace model3d {
00011     
00019     class Line2D
00020     {
00021     public:
00022       Line2D();
00023       ~Line2D();
00024       
00025       Line2D& operator= (const Line2D& srcLine);
00026       
00027       void setLine(Point2D& p1, Point2D& p2);
00028       
00029       void info();
00030       
00031       void clear();
00032 
00033       bool isBaseNormal(int& nType);
00034       void setBaseNormal(int nType);
00035       
00037       inline double signedDistance(const Point2D& p) const
00038       {
00039         return (u[0]*p.x()+u[1]*p.y()+d0);
00040       }
00041       
00042       //data member
00044       double u[2];
00046       double d0; 
00048       Point2D m_p1, m_p2;
00049     };
00050     
00051     
00052     
00053   }// namespace model3d
00054 }// namespace jafar
00055 
00056 #endif // LINE_2D_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:25 for Jafar by doxygen 1.7.6.1
LAAS-CNRS