2D line - Double More...

#include <line.h>

+ Inheritance diagram for clan::Line2d:

Public Member Functions

 Line2d ()
 
 Line2d (const Line2x< double > &copy)
 
 Line2d (const Vec2< double > &point_p, const Vec2< double > &point_q)
 
 Line2d (const Vec2< double > &point_p, double gradient)
 
Attributes
Vec2< double > get_intersection (const Line2x< double > &second, bool &intersect) const
 Return the intersection of this and other line. More...
 
double point_right_of_line (Vec2< double > point) const
 Return [<0, 0, >0] if the Point P is right, on or left of the line trough A,B. More...
 
Operators
bool operator== (const Line2x< double > &line) const
 == operator. More...
 
bool operator!= (const Line2x< double > &line) const
 != operator. More...
 

Public Attributes

Vec2< double > p
 First point on the line. More...
 
Vec2< double > q
 

Detailed Description

2D line - Double

Member Function Documentation

Vec2<double > clan::Line2x< double >::get_intersection ( const Line2x< double > &  second,
bool &  intersect 
) const
inherited

Return the intersection of this and other line.

Parameters
second= The second line to use
intersect= On Return: true if the lines intersect, false if the lines are parallel
Returns
The point
bool clan::Line2x< double >::operator!= ( const Line2x< double > &  line) const
inlineinherited

!= operator.

bool clan::Line2x< double >::operator== ( const Line2x< double > &  line) const
inlineinherited

== operator.

double clan::Line2x< double >::point_right_of_line ( Vec2< double >  point) const
inlineinherited

Return [<0, 0, >0] if the Point P is right, on or left of the line trough A,B.

Parameters
point= The point
Returns
Value representing - left (>0), centre (=0), or right (<0)

Member Data Documentation

Vec2<double > clan::Line2x< double >::p
inherited

First point on the line.

Vec2<double > clan::Line2x< double >::q
inherited

The documentation for this class was generated from the following file: