Data Structures | Public Types | Public Member Functions | Private Attributes

DGtal::StraightLine< TInteger > Class Template Reference

Aim: Represents a StraightLine uniquely defined by two 2D points and that is able to return for each 2D point of the domain its signed distance to itself. More...

#include <StraightLine.h>

Collaboration diagram for DGtal::StraightLine< TInteger >:
Collaboration graph
[legend]

Data Structures

struct  selfDrawStyle

Public Types

typedef TInteger Coordinate
typedef DGtal::PointVector
< 2, Coordinate
Point
typedef DGtal::PointVector
< 2, Coordinate
Vector

Public Member Functions

 BOOST_CONCEPT_ASSERT ((CInteger< TInteger >))
 StraightLine (const Point &aFirstPoint, const Point &aSecondPoint)
 StraightLine (const StraightLine &other)
StraightLineoperator= (const StraightLine &other)
 ~StraightLine ()
void selfDisplay (std::ostream &out) const
bool isValid () const
Coordinate signedDistance (const Point &aP) const
template<typename Functor >
void selfDraw (LibBoard::Board &board) const
void selfDraw (LibBoard::Board &board) const

Private Attributes

Point myP
Point myQ

Detailed Description

template<typename TInteger>
class DGtal::StraightLine< TInteger >

Aim: Represents a StraightLine uniquely defined by two 2D points and that is able to return for each 2D point of the domain its signed distance to itself.

Description of template class 'StraightLine'


Member Typedef Documentation

template<typename TInteger>
typedef TInteger DGtal::StraightLine< TInteger >::Coordinate
template<typename TInteger>
typedef DGtal::PointVector<2,Coordinate> DGtal::StraightLine< TInteger >::Point
template<typename TInteger>
typedef DGtal::PointVector<2,Coordinate> DGtal::StraightLine< TInteger >::Vector

Constructor & Destructor Documentation

template<typename TInteger>
DGtal::StraightLine< TInteger >::StraightLine ( const Point aFirstPoint,
const Point aSecondPoint 
)

Constructor.

Parameters:
firstPoint,secondPoint,two points that uniquely define the StraightLine
template<typename TInteger>
DGtal::StraightLine< TInteger >::StraightLine ( const StraightLine< TInteger > &  other  ) 

Copy constructor.

Parameters:
other the object to clone.
template<typename TInteger>
DGtal::StraightLine< TInteger >::~StraightLine (  ) 

Destructor. Does nothing


Member Function Documentation

template<typename TInteger>
DGtal::StraightLine< TInteger >::BOOST_CONCEPT_ASSERT ( (CInteger< TInteger >)   ) 
template<typename TInteger>
bool DGtal::StraightLine< TInteger >::isValid (  )  const

Checks the validity/consistency of the object.

Returns:
'true' if the object is valid, 'false' otherwise.
template<typename TInteger>
StraightLine& DGtal::StraightLine< TInteger >::operator= ( const StraightLine< TInteger > &  other  ) 

Assignment.

Parameters:
other the object to copy.
Returns:
a reference on 'this'.
template<typename TInteger>
void DGtal::StraightLine< TInteger >::selfDisplay ( std::ostream &  out  )  const

Writes/Displays the object on an output stream.

Parameters:
out the output stream where the object is written.
template<typename TInteger>
void DGtal::StraightLine< TInteger >::selfDraw ( LibBoard::Board board  )  const [inline]

Draw the part of the straight line lying between the two given point on a LiBoard board

Parameters:
board the output board where the object is drawn.
Template Parameters:
Functor a Functor to specialize the Board style
template<typename TInteger>
template<typename Functor >
void DGtal::StraightLine< TInteger >::selfDraw ( LibBoard::Board board  )  const

Draw the part of the straight line lying between the two given point

Parameters:
board the output board where the object is drawn.
Template Parameters:
Functor a Functor to specialize the Board style
template<typename TInteger>
Coordinate DGtal::StraightLine< TInteger >::signedDistance ( const Point aP  )  const

Computes the signed distance of [aP] to the StraightLine

Parameters:
aP,the point to be tested.
Returns:
the signed distance.

Field Documentation

template<typename TInteger>
Point DGtal::StraightLine< TInteger >::myP [private]
template<typename TInteger>
Point DGtal::StraightLine< TInteger >::myQ [private]

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