ClanLib  2.3.7
Public Member Functions | Public Attributes | List of all members
CL_Line2f Class Reference

2D line - Float More...

#include <line.h>

Inheritance diagram for CL_Line2f:
Inheritance graph
[legend]

Public Member Functions

 CL_Line2f ()
 
 CL_Line2f (const CL_Line2x< float > &copy)
 
 CL_Line2f (const CL_Vec2< float > &point_p, const CL_Vec2< float > &point_q)
 
 CL_Line2f (const CL_Vec2< float > &point_p, float gradient)
 
Attributes
CL_Vec2< float > get_intersection (const CL_Line2x< float > &second, bool &intersect) const
 Return the intersection of this and other line. More...
 
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. More...
 
Operators
bool operator== (const CL_Line2x< float > &line) const
 == operator. More...
 
bool operator!= (const CL_Line2x< float > &line) const
 != operator. More...
 

Public Attributes

CL_Vec2< float > p
 First point on the line. More...
 
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
inlineinherited

!= operator.

bool CL_Line2x< float >::operator== ( const CL_Line2x< float > &  line) const
inlineinherited

== operator.

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

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: