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

2D line - Double More...

#include <line.h>

Inheritance diagram for CL_Line2d:
Inheritance graph
[legend]

Public Member Functions

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

Public Attributes

CL_Vec2< double > p
 First point on the line. More...
 
CL_Vec2< double > q
 

Detailed Description

2D line - Double

Constructor & Destructor Documentation

CL_Line2d::CL_Line2d ( )
inline
CL_Line2d::CL_Line2d ( const CL_Line2x< double > &  copy)
inline
CL_Line2d::CL_Line2d ( const CL_Vec2< double > &  point_p,
const CL_Vec2< double > &  point_q 
)
inline
CL_Line2d::CL_Line2d ( const CL_Vec2< double > &  point_p,
double  gradient 
)
inline

Member Function Documentation

CL_Vec2<double > CL_Line2x< double >::get_intersection ( const CL_Line2x< double > &  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< double >::operator!= ( const CL_Line2x< double > &  line) const
inlineinherited

!= operator.

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

== operator.

double CL_Line2x< double >::point_right_of_line ( CL_Vec2< double >  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<double > CL_Line2x< double >::p
inherited

First point on the line.

CL_Vec2<double > CL_Line2x< double >::q
inherited

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