Special Point Functor that adds one dimension to a 2D point and apply on it a rotation of angle alpha according to a given direction and the domain center. It also checks if the resulting point is inside the 3D domain, else it returns a particular point (by default the point at domain origin (from the domain method lowerBound()).
More...
|
| SliceRotator2D (const Dimension &dimAdded, const TDomain3D &aDomain3DImg, const Integer &sliceIndex, const Dimension &dimRotated, double rotationAngle) |
|
| SliceRotator2D (const Dimension &dimAdded, const TDomain3D &aDomain3DImg, const Integer &sliceIndex, const Dimension &dimRotated, double rotationAngle, const Point &defaultPoint) |
|
| SliceRotator2D (const Dimension &dimAdded, const TDomain3D &aDomain3DImg, const Integer &sliceIndex, const Dimension &dimRotated, const Point &ptCenter, double rotationAngle, const Point &defaultPoint) |
|
| SliceRotator2D (const Dimension &dimAdded, const TDomain3D &aDomain3DImg, const Integer &sliceIndex, const Dimension &dimRotated, const Point &ptCenter, double rotationAngle) |
|
template<typename TPointDimMinus > |
Point | operator() (const TPointDimMinus &aPoint) const |
|
template<typename TDomain3D, typename TInteger = DGtal::Z3i::Integer>
class DGtal::functors::SliceRotator2D< TDomain3D, TInteger >
Special Point Functor that adds one dimension to a 2D point and apply on it a rotation of angle alpha according to a given direction and the domain center. It also checks if the resulting point is inside the 3D domain, else it returns a particular point (by default the point at domain origin (from the domain method lowerBound()).
Description of template class 'SliceRotator2D'
Ex: a Point P (10, 9) in the domain (defined (0,0,0) (10,10,10)) given in 3D by adding the dimension in Z (2) with slice num 7: => P(10, 9, 7) and after a rotation of PI from center of slice domain (5,5, 7) will give P(0,1,7). To apply this example you can test it with:
Aim: Parallelepidec region of a digital space, model of a 'CDomain'.
Aim: Implements basic operations that will be used in Point and Vector classes.
Special Point Functor that adds one dimension to a 2D point and apply on it a rotation of angle alpha...
- Template Parameters
-
TDomain3D | the type of the 3d domain. |
TInteger | specifies the integer number type used to define the space. |
Definition at line 200 of file BasicPointFunctors.h.
template<typename TDomain3D , typename TInteger = DGtal::Z3i::Integer>
template<typename TPointDimMinus >
The operator just recover the 3D Point associated to the SliceRotator2D parameters.
- Parameters
-
[in] | aPoint | point of the input domain (of dimension N-1). |
- Returns
- the point of dimension 3.
Definition at line 296 of file BasicPointFunctors.h.
297 {
300 std::vector<Dimension> indexesRotate;
302 {
304 {
306 pos++;
307 }else
308 {
310 }
311 }
313 {
315 indexesRotate.push_back(i);
316 }
317 double d1 = pt[indexesRotate[0]] -
myCenter[indexesRotate[0]];
318 double d2 = pt[indexesRotate[1]] -
myCenter[indexesRotate[1]];
319
322
324 return pt;
325 else
327 }
Space::Dimension Dimension
Point::Coordinate Integer
References aPoint(), DGtal::functors::SliceRotator2D< TDomain3D, TInteger >::myCenter, DGtal::functors::SliceRotator2D< TDomain3D, TInteger >::myDefaultPoint, DGtal::functors::SliceRotator2D< TDomain3D, TInteger >::myDimRotated, DGtal::functors::SliceRotator2D< TDomain3D, TInteger >::myDomain, DGtal::functors::SliceRotator2D< TDomain3D, TInteger >::myPosDimAdded, DGtal::functors::SliceRotator2D< TDomain3D, TInteger >::myRotationAngle, DGtal::functors::SliceRotator2D< TDomain3D, TInteger >::mySliceIndex, and DGtal::PointVector< dim, TEuclideanRing, TContainer >::size().