#include <line.h>
Public Member Functions | |
| Line (void) | |
| Default constructor.   | |
| Line (double x1, double y1, double x2, double y2) | |
| Initialises a line from (x1, y1) to (x2, y2).  | |
| virtual | ~Line () | 
| No need of a copy constructor and assignment operator!!  | |
| bool | isLine (void) | 
| Returns true if this object holds a meaningfull line.   | |
| virtual double | side (double x, double y) | 
| Returns the algebraic side on which the point (x, y) lies.  | |
| double | getSlope (void) | 
| Returns the slope of the line.   | |
| virtual TNT::Array1D< double > | equation (void) | 
| Returns the coefficients in the equation of the line.   | |
| virtual double | distance (double x, double y) | 
| Returns the algebraic distance between the point (x, y) and the line.  | |
| Line | getParallelLine (double d, bool s) | 
| Returns a gutk::Line parallel to this line at a distance d and on side s.  | |
| Line | getParallelLine (double x, double y) | 
| Returns a gutk::Line parallel to this line and passing through the point (x, y).  | |
Friends | |
| State | getIntersection (const Line &l1, const Line &l2, Point &p) | 
| A utility friend function to find out the point of intersection of two gutk::Line objects if at all they intersect.   | |
      
  | 
  
| 
 Default constructor. 
  | 
  
      
  | 
  
| 
 Returns the coefficients in the equation of the line. 
If the equation of the line is written out in the form   | 
  
      
  | 
  
| 
 Returns the slope of the line. Returns 0 for lines initialised using the default constructor.  | 
  
      
  | 
  
| 
 Returns true if this object holds a meaningfull line. 
Return   | 
  
      
  | 
  ||||||||||||||||
| 
 A utility friend function to find out the point of intersection of two gutk::Line objects if at all they intersect. 
The function returns the gutk::State of intersection and the point of intersection in   | 
  
 1.3.7