2D line - Float More...

#include <line.h>

+ Inheritance diagram for clan::Line2f:

Public Member Functions

 Line2f ()
 
 Line2f (const Line2x< float > &copy)
 
 Line2f (const Vec2< float > &point_p, const Vec2< float > &point_q)
 
 Line2f (const Vec2< float > &point_p, float gradient)
 
Attributes
Vec2< float > get_intersection (const Line2x< float > &second, bool &intersect) const
 Return the intersection of this and other line. More...
 
float point_right_of_line (Vec2< float > 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< float > &line) const
 == operator. More...
 
bool operator!= (const Line2x< float > &line) const
 != operator. More...
 

Public Attributes

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

Detailed Description

2D line - Float

Member Function Documentation

Vec2<float > clan::Line2x< float >::get_intersection ( const Line2x< float > &  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< float >::operator!= ( const Line2x< float > &  line) const
inlineinherited

!= operator.

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

== operator.

float clan::Line2x< float >::point_right_of_line ( Vec2< float >  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<float > clan::Line2x< float >::p
inherited

First point on the line.

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

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