Simple++
Powerfull and lightning fast C++ Library
Public Member Functions | List of all members
Math::Line< T > Class Template Reference

Class representing a line. More...

#include <Line.h>

Public Member Functions

 Line (const Vec2< T > &p0, const Vec2< T > &p1)
 Constructor with two points. More...
 
 Line (const T &x0, const T &y0, const T &x1, const T &y1)
 Constructor with two points. More...
 
 Line ()
 Empty constructor, not initialized. More...
 
const Vec2< T > & getP0 () const
 get the First point More...
 
const Vec2< T > & getP1 () const
 get the Second point More...
 
void setP0 (const Vec2< T > &p)
 set the First point. More...
 
void setP1 (const Vec2< T > &p)
 set the Second point. More...
 

Detailed Description

template<typename T>
class Math::Line< T >

Class representing a line.

Constructor & Destructor Documentation

template<typename T >
Math::Line< T >::Line ( const Vec2< T > &  p0,
const Vec2< T > &  p1 
)

Constructor with two points.

Parameters
p0Point 1
p1Point 2
template<typename T >
Math::Line< T >::Line ( const T &  x0,
const T &  y0,
const T &  x1,
const T &  y1 
)

Constructor with two points.

Parameters
x0X Coordinate of the First point.
y0Y Coordinate of the First point.
x1X Coordinate of the Second point.
y1Y Coordinate of the Second point.
template<typename T >
Math::Line< T >::Line ( )

Empty constructor, not initialized.

Member Function Documentation

template<typename T >
const Vec2< T > & Math::Line< T >::getP0 ( ) const

get the First point

Returns
Point
template<typename T >
const Vec2< T > & Math::Line< T >::getP1 ( ) const

get the Second point

Returns
Point
template<typename T >
void Math::Line< T >::setP0 ( const Vec2< T > &  p)

set the First point.

Parameters
pPoint
template<typename T >
void Math::Line< T >::setP1 ( const Vec2< T > &  p)

set the Second point.

Parameters
pPoint

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