DGtal 2.1.0
Loading...
Searching...
No Matches
DGtal::detail::AffineGeometryPointOperations< dim, TEuclideanRing, TContainer > Struct Template Reference

Aim: Internal class used by AffineGeometry to differentiate operations on lattice points and operations on points with floating-point coordinates.
More...

#include <DGtal/geometry/tools/AffineGeometry.h>

Public Types

typedef PointVector< dim, TEuclideanRing, TContainer > Point
 
typedef Point::Coordinate Scalar
 
typedef Scalar Integer
 In the generic class, the type scalar should be an integral type.
 

Static Private Member Functions

static internal services
template<typename TInteger >
static void normalizeVector (Point &w, TInteger)
 
template<typename TOtherPoint >
static Point cast (const TOtherPoint &other)
 Specialized version to cast points to other point type.
 

Friends

template<typename T >
struct DGtal::AffineGeometry
 
template<typename T >
struct DGtal::AffineBasis
 

Detailed Description

template<DGtal::Dimension dim, typename TEuclideanRing, typename TContainer = std::array<TEuclideanRing,dim>>
struct DGtal::detail::AffineGeometryPointOperations< dim, TEuclideanRing, TContainer >

Aim: Internal class used by AffineGeometry to differentiate operations on lattice points and operations on points with floating-point coordinates.

Description of template class 'AffineGeometryPointOperations'

Definition at line 70 of file AffineGeometry.h.

Member Typedef Documentation

◆ Integer

template<DGtal::Dimension dim, typename TEuclideanRing , typename TContainer = std::array<TEuclideanRing,dim>>
typedef Scalar DGtal::detail::AffineGeometryPointOperations< dim, TEuclideanRing, TContainer >::Integer

In the generic class, the type scalar should be an integral type.

Definition at line 77 of file AffineGeometry.h.

◆ Point

template<DGtal::Dimension dim, typename TEuclideanRing , typename TContainer = std::array<TEuclideanRing,dim>>
typedef PointVector< dim, TEuclideanRing, TContainer > DGtal::detail::AffineGeometryPointOperations< dim, TEuclideanRing, TContainer >::Point

Definition at line 74 of file AffineGeometry.h.

◆ Scalar

template<DGtal::Dimension dim, typename TEuclideanRing , typename TContainer = std::array<TEuclideanRing,dim>>
typedef Point::Coordinate DGtal::detail::AffineGeometryPointOperations< dim, TEuclideanRing, TContainer >::Scalar

Definition at line 75 of file AffineGeometry.h.

Member Function Documentation

◆ cast()

template<DGtal::Dimension dim, typename TEuclideanRing , typename TContainer = std::array<TEuclideanRing,dim>>
template<typename TOtherPoint >
static Point DGtal::detail::AffineGeometryPointOperations< dim, TEuclideanRing, TContainer >::cast ( const TOtherPoint &  other)
inlinestaticprivate

Specialized version to cast points to other point type.

Definition at line 102 of file AffineGeometry.h.

103 {
105 }
static Integer cast(Integer i)

References DGtal::IntegerConverter< dim, TInteger >::cast().

Referenced by DGtal::AffineGeometry< TPoint >::transform().

◆ normalizeVector()

template<DGtal::Dimension dim, typename TEuclideanRing , typename TContainer = std::array<TEuclideanRing,dim>>
template<typename TInteger >
static void DGtal::detail::AffineGeometryPointOperations< dim, TEuclideanRing, TContainer >::normalizeVector ( Point w,
TInteger   
)
inlinestaticprivate

Generic method to normalize a vector. By default, assume it is an integral type.

Definition at line 87 of file AffineGeometry.h.

88 {
89 DGtal::Dimension i = 0;
90 while ( i < Point::dimension && w[ i ] == 0 ) i++;
91 if ( i == Point::dimension ) return;
92 TInteger g = abs( w[ i ] );
93 for ( DGtal::Dimension k = i+1; k < Point::dimension; k++ )
95 for ( DGtal::Dimension k = i; k < Point::dimension; k++ )
96 w[ k ] /= g;
97 }
Aim: This class gathers several types and methods to make computation with integers.
static const Dimension dimension
Copy of the static dimension of the Point/Vector.
DGtal::uint32_t Dimension
Definition Common.h:119
std::mt19937 g(rd())

References DGtal::PointVector< dim, TEuclideanRing, TContainer >::dimension, and g().

Referenced by DGtal::AffineGeometry< TPoint >::addIfIndependent(), and DGtal::AffineGeometry< TPoint >::simplifiedVector().

Friends And Related Symbol Documentation

◆ DGtal::AffineBasis

template<DGtal::Dimension dim, typename TEuclideanRing , typename TContainer = std::array<TEuclideanRing,dim>>
template<typename T >
friend struct DGtal::AffineBasis
friend

Definition at line 73 of file AffineGeometry.h.

◆ DGtal::AffineGeometry

template<DGtal::Dimension dim, typename TEuclideanRing , typename TContainer = std::array<TEuclideanRing,dim>>
template<typename T >
friend struct DGtal::AffineGeometry
friend

Definition at line 72 of file AffineGeometry.h.


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