ClanLib  2.3.7
Public Member Functions | Public Attributes | List of all members
CL_Line2x< Type > Class Template Reference

2D line More...

#include <line.h>

Inheritance diagram for CL_Line2x< Type >:
Inheritance graph
[legend]

Public Member Functions

 CL_Line2x ()
 
 CL_Line2x (const CL_Line2x< Type > &copy)
 
 CL_Line2x (const CL_Vec2< Type > &point_p, const CL_Vec2< Type > &point_q)
 
 CL_Line2x (const CL_Vec2< Type > &point_p, Type gradient)
 
Attributes
CL_Vec2< Type > get_intersection (const CL_Line2x< Type > &second, bool &intersect) const
 Return the intersection of this and other line. More...
 
Type point_right_of_line (CL_Vec2< Type > point) const
 Return [<0, 0, >0] if the Point P is right, on or left of the line trough A,B. More...
 
Operators
CL_Line2x< Type > & operator= (const CL_Line2x< Type > &copy)
 = operator. More...
 
bool operator== (const CL_Line2x< Type > &line) const
 == operator. More...
 
bool operator!= (const CL_Line2x< Type > &line) const
 != operator. More...
 

Public Attributes

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

Detailed Description

template<typename Type>
class CL_Line2x< Type >

2D line

These line templates are defined for: int (CL_Line2i), float (CL_Line2f), double (CL_Line2d)

Constructor & Destructor Documentation

template<typename Type>
CL_Line2x< Type >::CL_Line2x ( )
inline
template<typename Type>
CL_Line2x< Type >::CL_Line2x ( const CL_Line2x< Type > &  copy)
inline
template<typename Type>
CL_Line2x< Type >::CL_Line2x ( const CL_Vec2< Type > &  point_p,
const CL_Vec2< Type > &  point_q 
)
inline
template<typename Type>
CL_Line2x< Type >::CL_Line2x ( const CL_Vec2< Type > &  point_p,
Type  gradient 
)
inline

Member Function Documentation

template<typename Type>
CL_Vec2<Type> CL_Line2x< Type >::get_intersection ( const CL_Line2x< Type > &  second,
bool &  intersect 
) const

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
template<typename Type>
bool CL_Line2x< Type >::operator!= ( const CL_Line2x< Type > &  line) const
inline

!= operator.

template<typename Type>
CL_Line2x<Type>& CL_Line2x< Type >::operator= ( const CL_Line2x< Type > &  copy)
inline

= operator.

template<typename Type>
bool CL_Line2x< Type >::operator== ( const CL_Line2x< Type > &  line) const
inline

== operator.

template<typename Type>
Type CL_Line2x< Type >::point_right_of_line ( CL_Vec2< Type >  point) const
inline

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

template<typename Type>
CL_Vec2<Type> CL_Line2x< Type >::p
template<typename Type>
CL_Vec2<Type> CL_Line2x< Type >::q

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