DGtal
0.6.devel
|
#include <BasicPointFunctors.h>
Public Types | |
typedef S | Space |
typedef Space::Dimension | Dimension |
typedef Space::Integer | Integer |
typedef Space::Point | Point |
Public Member Functions | |
Projector (const Integer &aDefaultInteger=NumberTraits< Integer >::zero()) | |
template<typename TIterator > | |
void | init (const TIterator &itb, const TIterator &ite) |
template<typename TInputPoint > | |
Point | operator() (const TInputPoint &aPoint) const |
Static Public Attributes | |
static const Dimension | dimension = Space::dimension |
Private Attributes | |
boost::array< Dimension, dimension > | myDims |
Integer | myDefaultInteger |
Aim: Functor that maps a point P of dimension i to a point Q of dimension j. The member myDims is an array containing the coordinates - (0, 1, ..., j-1) by default - that are copied from P to Q.
Description of template class 'Projector'
Ex: for i = 3 and j = 2, the first two coordinates (numbered 0 and 1) are copied so that point (x,y,z) is is mapped to point (x,y).
All kth coordinates (0 < k < j) that are greater than i, are set to a value given at construction (0 by defaut).
Ex: for i = 2 and j = 3, the first two coordinates (numbered 0 and 1) are copied so that point (x,y) is is mapped to point (x,y,0).
Instead of using the default order, you can define your own orthonormal basis as shown below:
S | type for the space where must lie the projected point |
Definition at line 97 of file BasicPointFunctors.h.
typedef Space::Dimension DGtal::Projector< S >::Dimension |
Definition at line 100 of file BasicPointFunctors.h.
typedef Space::Integer DGtal::Projector< S >::Integer |
Definition at line 102 of file BasicPointFunctors.h.
typedef Space::Point DGtal::Projector< S >::Point |
Definition at line 103 of file BasicPointFunctors.h.
typedef S DGtal::Projector< S >::Space |
Definition at line 99 of file BasicPointFunctors.h.
|
inline |
Default constructor
Definition at line 38 of file BasicPointFunctors.ih.
References DGtal::Projector< S >::dimension, and DGtal::Projector< S >::myDims.
|
inline |
Initialization of the array of relevant dimensions
itb | begin iterator on dimensions. |
ite | end iterator on dimensions. |
Definition at line 52 of file BasicPointFunctors.ih.
|
inline |
Main operator
aPoint | any point. |
Definition at line 73 of file BasicPointFunctors.ih.
|
static |
Definition at line 101 of file BasicPointFunctors.h.
Referenced by DGtal::Projector< S >::Projector().
|
private |
Default integer set to coordinates of the projected point not in the input point
Definition at line 140 of file BasicPointFunctors.h.
|
private |
Array storing the coordinates that are copied from the input point to its projection (order matters)
Definition at line 134 of file BasicPointFunctors.h.
Referenced by DGtal::Projector< S >::Projector().