Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions

DGtal::Shapes< TDomain > Class Template Reference

Aim: A utility class for constructing different shapes (balls, diamonds, and others). More...

#include <Shapes.h>

Public Types

typedef TDomain Domain
typedef TDomain::Space Space
typedef TDomain::Point Point
typedef TDomain::Vector Vector
typedef TDomain::Predicate Predicate
typedef TDomain::ConstIterator ConstIterator
typedef Space::Integer Integer
typedef Space::UnsignedInteger UnsignedInteger

Public Member Functions

 ~Shapes ()
void selfDisplay (std::ostream &out) const
bool isValid () const

Static Public Member Functions

template<typename TDigitalSet >
static void addNorm1Ball (TDigitalSet &aSet, const Point &aCenter, UnsignedInteger aRadius)
template<typename TDigitalSet >
static void addNorm2Ball (TDigitalSet &aSet, const Point &aCenter, UnsignedInteger aRadius)

Protected Member Functions

 Shapes ()

Private Member Functions

 Shapes (const Shapes &other)
Shapesoperator= (const Shapes &other)

Detailed Description

template<typename TDomain>
class DGtal::Shapes< TDomain >

Aim: A utility class for constructing different shapes (balls, diamonds, and others).

Description of template class 'Shapes'

Template Parameters:
TDomain the type of the domain in which shapes are created.
Examples:

dgtalboard-2-sets.cpp, and dgtalboard-4-colormaps.cpp.


Member Typedef Documentation

template<typename TDomain >
typedef TDomain::ConstIterator DGtal::Shapes< TDomain >::ConstIterator
template<typename TDomain >
typedef TDomain DGtal::Shapes< TDomain >::Domain
template<typename TDomain >
typedef Space::Integer DGtal::Shapes< TDomain >::Integer
template<typename TDomain >
typedef TDomain::Point DGtal::Shapes< TDomain >::Point
template<typename TDomain >
typedef TDomain::Predicate DGtal::Shapes< TDomain >::Predicate
template<typename TDomain >
typedef TDomain::Space DGtal::Shapes< TDomain >::Space
template<typename TDomain >
typedef Space::UnsignedInteger DGtal::Shapes< TDomain >::UnsignedInteger
template<typename TDomain >
typedef TDomain::Vector DGtal::Shapes< TDomain >::Vector

Constructor & Destructor Documentation

template<typename TDomain >
DGtal::Shapes< TDomain >::~Shapes (  ) 

Destructor.

template<typename TDomain >
DGtal::Shapes< TDomain >::Shapes (  )  [protected]

Constructor. Forbidden by default (protected to avoid g++ warnings).

template<typename TDomain >
DGtal::Shapes< TDomain >::Shapes ( const Shapes< TDomain > &  other  )  [private]

Copy constructor.

Parameters:
other the object to clone. Forbidden by default.

Member Function Documentation

template<typename TDomain >
template<typename TDigitalSet >
static void DGtal::Shapes< TDomain >::addNorm1Ball ( TDigitalSet &  aSet,
const Point aCenter,
UnsignedInteger  aRadius 
) [static]

Adds the discrete ball (norm-1) of center [aCenter] and radius [aRadius] to the (perhaps non empty) set [aSet].

Template Parameters:
TDigitalSet the type chosen for the digital set.
Parameters:
aSet the set (modified) which will contain the discrete ball.
aCenter the center of the ball.
aRadius the radius of the ball.
template<typename TDomain >
template<typename TDigitalSet >
static void DGtal::Shapes< TDomain >::addNorm2Ball ( TDigitalSet &  aSet,
const Point aCenter,
UnsignedInteger  aRadius 
) [static]

Adds the discrete ball (norm-2) of center [aCenter] and radius [aRadius] to the (perhaps non empty) set [aSet].

Template Parameters:
TDigitalSet the type chosen for the digital set.
Parameters:
aSet the set (modified) which will contain the discrete ball.
aCenter the center of the ball.
aRadius the radius of the ball.
template<typename TDomain >
bool DGtal::Shapes< TDomain >::isValid (  )  const

Checks the validity/consistency of the object.

Returns:
'true' if the object is valid, 'false' otherwise.
template<typename TDomain >
Shapes& DGtal::Shapes< TDomain >::operator= ( const Shapes< TDomain > &  other  )  [private]

Assignment.

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

Writes/Displays the object on an output stream.

Parameters:
out the output stream where the object is written.

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