DGtal  0.9.3
DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::Transform Struct Reference

#include <DGtal/geometry/surfaces/ChordGenericStandardPlaneComputer.h>

## Public Types

typedef InputPoint Value

typedef InputPoint value_type

## Public Member Functions

Transform ()

Transform (bool posX, bool posY)

InputPoint operator() (const InputPoint &p) const

bool isPlusZOnX () const

bool isPlusZOnY () const

InputPoint inverse (const InputPoint &p) const

template<typename Vector3D >
void transformBack (Vector3D &v)

template<typename Vector3D >
void transform (Vector3D &v)

bool _posX

bool _posY

## Detailed Description

### template<typename TSpace, typename TInputPoint, typename TInternalScalar> struct DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::Transform

This type is used to cast points from $$(x,y,z)$$ to $$(x \pm z,y \pm z,z)$$ and inversely. This is used when recognize a standard plane. Indeed, we only know how to recognize naive planes. So we dilate points of standard planes with this transform so that the standard plane becomes naive. Otherwise said, if $$T_{\pm,\pm}: (x,y,z) \mapsto (x \pm z,y \pm z,z)$$, then P is a standard plane iff one of $$T_{+,+}(P), T_{+,-}(P), T_{-,+}(P), T_{-,-}(P)$$ is a naive plane of main axis z.

Definition at line 166 of file ChordGenericStandardPlaneComputer.h.

## ◆ Value

template<typename TSpace, typename TInputPoint, typename TInternalScalar>
 typedef InputPoint DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::Transform::Value

Definition at line 167 of file ChordGenericStandardPlaneComputer.h.

## ◆ value_type

template<typename TSpace, typename TInputPoint, typename TInternalScalar>
 typedef InputPoint DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::Transform::value_type

Definition at line 168 of file ChordGenericStandardPlaneComputer.h.

## ◆ Transform() [1/2]

template<typename TSpace, typename TInputPoint, typename TInternalScalar>
 DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::Transform::Transform ( )
inline

Definition at line 171 of file ChordGenericStandardPlaneComputer.h.

171 {}

## ◆ Transform() [2/2]

template<typename TSpace, typename TInputPoint, typename TInternalScalar>
 DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::Transform::Transform ( bool posX, bool posY )
inline

Definition at line 172 of file ChordGenericStandardPlaneComputer.h.

172 : _posX( posX ), _posY( posY ) {}

## ◆ inverse()

template<typename TSpace, typename TInputPoint, typename TInternalScalar>
 InputPoint DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::Transform::inverse ( const InputPoint & p ) const
inline

Definition at line 179 of file ChordGenericStandardPlaneComputer.h.

180  { return InputPoint( p[ 0 ] + ( _posX ? -p[ 2 ] : p[ 2 ] ),
181  p[ 1 ] + ( _posY ? -p[ 2 ] : p[ 2 ] ),
182  p[ 2 ] ); }

## ◆ isPlusZOnX()

template<typename TSpace, typename TInputPoint, typename TInternalScalar>
 bool DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::Transform::isPlusZOnX ( ) const
inline

Definition at line 177 of file ChordGenericStandardPlaneComputer.h.

177 { return _posX; }

## ◆ isPlusZOnY()

template<typename TSpace, typename TInputPoint, typename TInternalScalar>
 bool DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::Transform::isPlusZOnY ( ) const
inline

Definition at line 178 of file ChordGenericStandardPlaneComputer.h.

178 { return _posY; }

## ◆ operator()()

template<typename TSpace, typename TInputPoint, typename TInternalScalar>
 InputPoint DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::Transform::operator() ( const InputPoint & p ) const
inline

Definition at line 173 of file ChordGenericStandardPlaneComputer.h.

174  { return InputPoint( p[ 0 ] + ( _posX ? p[ 2 ] : -p[ 2 ] ),
175  p[ 1 ] + ( _posY ? p[ 2 ] : -p[ 2 ] ),
176  p[ 2 ] ); }

## ◆ transform()

template<typename TSpace, typename TInputPoint, typename TInternalScalar>
template<typename Vector3D >
 void DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::Transform::transform ( Vector3D & v )
inline

Definition at line 190 of file ChordGenericStandardPlaneComputer.h.

191  {
192  v[ 2 ] += ( _posX ? -v[ 0 ] : v[ 0 ] );
193  v[ 2 ] += ( _posY ? -v[ 1 ] : v[ 1 ] );
194  }

## ◆ transformBack()

template<typename TSpace, typename TInputPoint, typename TInternalScalar>
template<typename Vector3D >
 void DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::Transform::transformBack ( Vector3D & v )
inline

Definition at line 184 of file ChordGenericStandardPlaneComputer.h.

185  {
186  v[ 2 ] += ( _posX ? v[ 0 ] : -v[ 0 ] );
187  v[ 2 ] += ( _posY ? v[ 1 ] : -v[ 1 ] );
188  }

## ◆ _posX

template<typename TSpace, typename TInputPoint, typename TInternalScalar>
 bool DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::Transform::_posX

true for +z on x, false for -z on x

Definition at line 169 of file ChordGenericStandardPlaneComputer.h.

## ◆ _posY

template<typename TSpace, typename TInputPoint, typename TInternalScalar>
 bool DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::Transform::_posY

true for +z on y, false for -z on y

Definition at line 170 of file ChordGenericStandardPlaneComputer.h.

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