Public Member Functions | Public Attributes

CL_Line2 Class Reference
[clanCore Math]

2D line - Integer More...

#include <line.h>

Inheritance diagram for CL_Line2:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CL_Line2 ()
 CL_Line2 (const CL_Vec2< int > &point_p, int gradient)
 CL_Line2 (const CL_Vec2< int > &point_p, const CL_Vec2< int > &point_q)
 CL_Line2 (const CL_Line2x< int > &copy)
Attributes

CL_Vec2< int > get_intersection (const CL_Line2x< int > &second, bool &intersect) const
 Return the intersection of this and other line.
int point_right_of_line (CL_Vec2< int > 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< int > &line) const
 == operator.
bool operator!= (const CL_Line2x< int > &line) const
 != operator.

Public Attributes

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

Detailed Description

2D line - Integer


Constructor & Destructor Documentation

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

Member Function Documentation

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

!= operator.

References CL_Line2x< Type >::p, and CL_Line2x< Type >::q.

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

== operator.

References CL_Line2x< Type >::p, and CL_Line2x< Type >::q.

int CL_Line2x< int >::point_right_of_line ( CL_Vec2< int >  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)

References CL_Line2x< Type >::p, CL_Line2x< Type >::q, CL_Vec2< Type >::x, and CL_Vec2< Type >::y.


Member Data Documentation

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

First point on the line.

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

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