2D line More...
#include <line.h>

Public Member Functions | |
| CL_Line2x () | |
| CL_Line2x (const CL_Vec2< Type > &point_p, Type gradient) | |
| CL_Line2x (const CL_Vec2< Type > &point_p, const CL_Vec2< Type > &point_q) | |
| CL_Line2x (const CL_Line2x< Type > ©) | |
Attributes | |
| CL_Vec2< Type > | get_intersection (const CL_Line2x< Type > &second, bool &intersect) const |
| Return the intersection of this and other line. | |
| Type | point_right_of_line (CL_Vec2< Type > point) const |
| Return [<0, 0, >0] if the Point P is right, on or left of the line trough A,B. | |
Operators | |
| CL_Line2x< Type > & | operator= (const CL_Line2x< Type > ©) |
| = operator. | |
| bool | operator== (const CL_Line2x< Type > &line) const |
| == operator. | |
| bool | operator!= (const CL_Line2x< Type > &line) const |
| != operator. | |
Public Attributes | |
| CL_Vec2< Type > | p |
| First point on the line. | |
| CL_Vec2< Type > | q |
2D line
These line templates are defined for: int (CL_Line2i), float (CL_Line2f), double (CL_Line2d)
| CL_Line2x< Type >::CL_Line2x | ( | const CL_Vec2< Type > & | point_p, | |
| const CL_Vec2< Type > & | point_q | |||
| ) | [inline] |
| CL_Line2x< Type >::CL_Line2x | ( | const CL_Vec2< Type > & | point_p, | |
| Type | gradient | |||
| ) | [inline] |
| CL_Vec2<Type> CL_Line2x< Type >::get_intersection | ( | const CL_Line2x< Type > & | second, | |
| bool & | intersect | |||
| ) | const |
Return the intersection of this and other line.
| second | = The second line to use | |
| intersect | = On Return: true if the lines intersect, false if the lines are parallel |
| bool CL_Line2x< Type >::operator!= | ( | const CL_Line2x< Type > & | line | ) | const [inline] |
!= operator.
| CL_Line2x<Type>& CL_Line2x< Type >::operator= | ( | const CL_Line2x< Type > & | copy | ) | [inline] |
= operator.
| bool CL_Line2x< Type >::operator== | ( | const CL_Line2x< Type > & | line | ) | const [inline] |
== operator.
| Type CL_Line2x< Type >::point_right_of_line | ( | CL_Vec2< Type > | point | ) | const [inline] |
Return [<0, 0, >0] if the Point P is right, on or left of the line trough A,B.
| point | = The point |
First point on the line.
Referenced by CL_Line2x< int >::CL_Line2x(), CL_Line2x< int >::operator!=(), CL_Line2x< int >::operator=(), CL_Line2x< int >::operator==(), and CL_Line2x< int >::point_right_of_line().
1.7.1