2D line - Integer More...

#include <line.h>

+ Inheritance diagram for clan::Line2:

Public Member Functions

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

Public Attributes

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

Detailed Description

2D line - Integer

Member Function Documentation

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

!= operator.

References clan::Line2x< Type >::p, and clan::Line2x< Type >::q.

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

== operator.

References clan::Line2x< Type >::p, and clan::Line2x< Type >::q.

int clan::Line2x< int >::point_right_of_line ( Vec2< int >  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)

References clan::Line2x< Type >::p, clan::Line2x< Type >::q, clan::Vec2< Type >::x, and clan::Vec2< Type >::y.

Member Data Documentation

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

First point on the line.

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

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