Public Member Functions | Public Attributes

CL_Line2f Class Reference
[clanCore Math]

2D line - Float More...

#include <line.h>

Inheritance diagram for CL_Line2f:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CL_Line2f ()
 CL_Line2f (const CL_Vec2< float > &point_p, float gradient)
 CL_Line2f (const CL_Vec2< float > &point_p, const CL_Vec2< float > &point_q)
 CL_Line2f (const CL_Line2x< float > &copy)
Attributes

CL_Vec2< float > get_intersection (const CL_Line2x< float > &second, bool &intersect) const
 Return the intersection of this and other line.
float point_right_of_line (CL_Vec2< float > point) const
 Return [<0, 0, >0] if the Point P is right, on or left of the line trough A,B.
Operators

bool operator== (const CL_Line2x< float > &line) const
 == operator.
bool operator!= (const CL_Line2x< float > &line) const
 != operator.

Public Attributes

CL_Vec2< float > p
 First point on the line.
CL_Vec2< float > q

Detailed Description

2D line - Float


Constructor & Destructor Documentation

CL_Line2f::CL_Line2f (  )  [inline]
CL_Line2f::CL_Line2f ( const CL_Line2x< float > &  copy  )  [inline]
CL_Line2f::CL_Line2f ( const CL_Vec2< float > &  point_p,
const CL_Vec2< float > &  point_q 
) [inline]
CL_Line2f::CL_Line2f ( const CL_Vec2< float > &  point_p,
float  gradient 
) [inline]

Member Function Documentation

CL_Vec2<float > CL_Line2x< float >::get_intersection ( const CL_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 CL_Line2x< float >::operator!= ( const CL_Line2x< float > &  line  )  const [inline, inherited]

!= operator.

bool CL_Line2x< float >::operator== ( const CL_Line2x< float > &  line  )  const [inline, inherited]

== operator.

float CL_Line2x< float >::point_right_of_line ( CL_Vec2< float >  point  )  const [inline, inherited]

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

CL_Vec2<float > CL_Line2x< float >::p [inherited]

First point on the line.

CL_Vec2<float > CL_Line2x< float >::q [inherited]

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