The Point class.  
 More...
#include <point.h>
 | 
| double  | x () const  | 
|   | 
| void  | setx (double x) | 
|   | 
| double  | y () const  | 
|   | 
| void  | sety (double y) | 
|   | 
The Point class. 
Definition at line 20 of file point.h.
 
  
  
      
        
          | Point::Point  | 
          ( | 
          double  | 
          x,  | 
         
        
           | 
           | 
          double  | 
          y  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Constructor for GPS points. 
- Parameters
 - 
  
  
 
Definition at line 29 of file point.h.
 
 
  
  
      
        
          | virtual Point::~Point  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlinevirtual   | 
  
 
 
      
        
          | double Point::distanceToPoint  | 
          ( | 
          const Point &  | 
          p | ) | 
           const | 
        
      
 
Calculate distance between two points. 
- Parameters
 - 
  
  
 
- Returns
 - Euclidian distance 
 
Definition at line 14 of file point.cpp.
 
 
      
        
          | double Point::distanceToSegment  | 
          ( | 
          const Point &  | 
          p1,  | 
        
        
           | 
           | 
          const Point &  | 
          p2  | 
        
        
           | 
          ) | 
           |  const | 
        
      
 
Compute the distance between a point and a segment. 
- Parameters
 - 
  
    | p1 | A point corresponding to one extremity of the segment  | 
    | p2 | The other extremity  | 
  
   
- Returns
 - Value of distance 
 
Definition at line 32 of file point.cpp.
 
 
  
  
      
        
          | std::string Point::infos  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
virtual   | 
  
 
 
      
        
          | std::vector< double > Point::projectionOnSegment  | 
          ( | 
          const Point &  | 
          a,  | 
        
        
           | 
           | 
          const Point &  | 
          b  | 
        
        
           | 
          ) | 
           |  const | 
        
      
 
 
      
        
          | bool Point::samePointAs  | 
          ( | 
          const Point &  | 
          p | ) | 
           const | 
        
      
 
Check if two points share the same coordinates. 
- Parameters
 - 
  
  
 
- Returns
 - true or false 
 
Definition at line 9 of file point.cpp.
 
 
      
        
          | void Point::setx  | 
          ( | 
          double  | 
          x | ) | 
           | 
        
      
 
 
      
        
          | void Point::setx  | 
          ( | 
          int  | 
          dim,  | 
        
        
           | 
           | 
          double  | 
          value  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
set m_x or m_y according to dim value 
Definition at line 67 of file point.cpp.
 
 
      
        
          | void Point::sety  | 
          ( | 
          double  | 
          y | ) | 
           | 
        
      
 
 
      
        
          | double Point::x  | 
          ( | 
           | ) | 
           const | 
        
      
 
 
      
        
          | double Point::x  | 
          ( | 
          int  | 
          dim | ) | 
           const | 
        
      
 
x the accessor for the KDtree 
- Parameters
 - 
  
    | dim | this value must be 0 for x and 1 for y  | 
  
   
- Returns
 - m_x or m_y depending on the dim value 
 
Definition at line 62 of file point.cpp.
 
 
      
        
          | double Point::y  | 
          ( | 
           | ) | 
           const | 
        
      
 
 
x coordinate 
Definition at line 88 of file point.h.
 
 
y coordinate 
Definition at line 89 of file point.h.
 
 
  
  
      
        
          | const double Point::POINT_RADIUS = 200 | 
         
       
   | 
  
staticprotected   | 
  
 
max radius around a point used to look for roads 
Definition at line 92 of file point.h.
 
 
The documentation for this class was generated from the following files: