CL_Line2 Class Reference
[clanCore Math]

2D line - Integer More...

#include <line.h>

Inheritance diagram for CL_Line2:

CL_Line2x< int > List of all members.

Public Member Functions

 CL_Line2 ()
 CL_Line2 (const CL_Line2x< int > &copy)
 CL_Line2 (const CL_Vec2< int > &point_p, const CL_Vec2< int > &point_q)
 CL_Line2 (const CL_Vec2< int > &point_p, int gradient)
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.
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.

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

== operator.

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)


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:
Generated on Thu Dec 3 02:39:38 2009 for ClanLib by  doxygen 1.4.6