DGtal 1.3.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | Private Member Functions
DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded > Class Template Reference

Aim: A parallel strip in the space is the intersection of two parallel half-planes such that each half-plane includes the other. More...

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

Public Types

typedef TSpace Space
 
typedef ParallelStrip< Space, muIncluded, muPlusNuIncluded > Self
 
typedef Space::Point Point
 
typedef Space::RealPoint RealPoint
 
typedef Space::Vector Vector
 
typedef Space::RealVector RealVector
 
typedef RealPoint::Coordinate Coordinate
 
typedef RealVector::Component Component
 
typedef Component Scalar
 

Public Member Functions

 ~ParallelStrip ()
 
 ParallelStrip ()
 
 ParallelStrip (Scalar mu, const RealVector &N, Scalar nu)
 
 ParallelStrip (const ParallelStrip &other)
 
ParallelStripoperator= (const ParallelStrip &other)
 
const RealVectornormal () const
 
Scalar mu () const
 
Scalar nu () const
 
Scalar width () const
 
Scalar axisWidth () const
 
Dimension mainAxis () const
 
Scalar diagonalWidth () const
 
Dimension mainDiagonal () const
 
void getBounds (Scalar &mu, Scalar &mu_plus_nu) const
 
bool operator() (const Point &p) const
 
bool operator() (const RealPoint &p) const
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 

Protected Attributes

Scalar myMu
 The minimal scalar value \(\mu\) of the strip. More...
 
RealVector myN
 The unit normal vector N to the strip. More...
 
Scalar myNu
 The width \(\nu\) of the strip. More...
 

Private Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CSpace< TSpace >))
 

Detailed Description

template<typename TSpace, bool muIncluded = true, bool muPlusNuIncluded = true>
class DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >

Aim: A parallel strip in the space is the intersection of two parallel half-planes such that each half-plane includes the other.

Description of template class 'ParallelStrip'

If N is the unit normal to one of the half-plane, the set of point X that is included in the strip satisfies some: \( \mu \le N \cdot X \le \mu + \nu \), where inequalities can be large or strict.

The normal to the strip is the vector N. The width of the strip is the scalar \(\nu\). The axis width of the strip is the quantity \(|\nu / N_i|\) where \(|N_i|\) is the greatest component.

Models: A ParallelStrip is a model of concepts::CPointPredicate.

Note
Parallel strips of axis width smaller than 1 are not naive digital planes since their parameters are floating-point values. However, they approach naive digital planes.
Parallel strips of diagonal width smaller than \(\sqrt{3}\) are not standard digital planes since their parameters are floating-point values. However, they approach standard digital planes.
Template Parameters
TSpaceany digital space, i.e., a model of CSpace.
muIncludedwhen 'true', the first inequality is large, i.e. \( \mu \le N \cdot X \), otherwise it is strict, i.e. \( \mu < N \cdot X \)
muPlusNuIncludedwhen 'true', the second inequality is large, i.e. \( N \cdot X \le \mu + \nu\), otherwise it is strict, i.e. \( N \cdot X < \mu + \nu\)

Definition at line 90 of file ParallelStrip.h.

Member Typedef Documentation

◆ Component

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
typedef RealVector::Component DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::Component

Definition at line 103 of file ParallelStrip.h.

◆ Coordinate

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
typedef RealPoint::Coordinate DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::Coordinate

Definition at line 102 of file ParallelStrip.h.

◆ Point

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
typedef Space::Point DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::Point

Definition at line 98 of file ParallelStrip.h.

◆ RealPoint

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
typedef Space::RealPoint DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::RealPoint

Definition at line 99 of file ParallelStrip.h.

◆ RealVector

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
typedef Space::RealVector DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::RealVector

Definition at line 101 of file ParallelStrip.h.

◆ Scalar

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
typedef Component DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::Scalar

Definition at line 104 of file ParallelStrip.h.

◆ Self

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
typedef ParallelStrip<Space,muIncluded,muPlusNuIncluded> DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::Self

Definition at line 97 of file ParallelStrip.h.

◆ Space

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
typedef TSpace DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::Space

Definition at line 96 of file ParallelStrip.h.

◆ Vector

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
typedef Space::Vector DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::Vector

Definition at line 100 of file ParallelStrip.h.

Constructor & Destructor Documentation

◆ ~ParallelStrip()

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::~ParallelStrip ( )

Destructor.

◆ ParallelStrip() [1/3]

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::ParallelStrip ( )

Constructor. The object is invalid.

◆ ParallelStrip() [2/3]

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::ParallelStrip ( Scalar  mu,
const RealVector N,
Scalar  nu 
)

Constructor from parameters.

Parameters
muthe minimal value of N.X
Nthe normal to the plane
nuthe width of the strip.

Note that the equation is normalized so that the normal is a unit vector.

◆ ParallelStrip() [3/3]

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::ParallelStrip ( const ParallelStrip< TSpace, muIncluded, muPlusNuIncluded > &  other)

Copy constructor.

Parameters
otherthe object to clone.

Member Function Documentation

◆ axisWidth()

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
Scalar DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::axisWidth ( ) const
Returns
the axis width of the strip, i.e. its width along its main axis.

◆ BOOST_CONCEPT_ASSERT()

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::BOOST_CONCEPT_ASSERT ( (concepts::CSpace< TSpace >)  )
private

◆ diagonalWidth()

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
Scalar DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::diagonalWidth ( ) const
Returns
the diagonal width of the strip (its width along its main diagonal).

◆ getBounds()

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
void DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::getBounds ( Scalar mu,
Scalar mu_plus_nu 
) const

If N is the unit normal to the current plane, then \( \mu \le N \cdot X\) and \(N \cdot X \le \mu + \nu\) are the two half-planes defining it.

Parameters
muthe lower bound (corresponding to the unit vector).
mu_plus_nuthe upper bound (corresponding to the unit vector).

◆ isValid()

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
bool DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.

◆ mainAxis()

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
Dimension DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::mainAxis ( ) const
Returns
the main axis of the strip (i.e. the absolute maximal component of the normal vector).

◆ mainDiagonal()

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
Dimension DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::mainDiagonal ( ) const
Returns
the integer that specifies the main diagonal among the 2^dimension diagonals. The 1-bits of its bit representation specifies the axes that are negated.

◆ mu()

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
Scalar DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::mu ( ) const
Returns
the parameter \(\mu\) such that \( \mu \le N \cdot X\).

◆ normal()

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
const RealVector & DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::normal ( ) const
Returns
the unit normal vector to the strip.

◆ nu()

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
Scalar DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::nu ( ) const

Same as width().

Returns
the width of the strip, i.e. the parameter \(\nu\) such that \(N \cdot X \le \mu + \nu\).

◆ operator()() [1/2]

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
bool DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::operator() ( const Point p) const

Checks if the digital point p is in this strip. Therefore, a ParallelStrip is a model of concepts::CPointPredicate.

Parameters
pany 3D digital point.
Returns
'true' if it is in the strip, false otherwise.

◆ operator()() [2/2]

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
bool DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::operator() ( const RealPoint p) const

Checks if the (real-valued) point p is in this strip.

Parameters
pany 3D real-valued point.
Returns
'true' if it is in the strip, false otherwise.

◆ operator=()

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
ParallelStrip & DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::operator= ( const ParallelStrip< TSpace, muIncluded, muPlusNuIncluded > &  other)

Assignment.

Parameters
otherthe object to copy.
Returns
a reference on 'this'.

◆ selfDisplay()

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
void DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

◆ width()

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
Scalar DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::width ( ) const

Same as nu().

Returns
the width of the strip, i.e. the parameter \(\nu\) such that \(N \cdot X \le \mu + \nu\).

Field Documentation

◆ myMu

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
Scalar DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::myMu
protected

The minimal scalar value \(\mu\) of the strip.

Definition at line 246 of file ParallelStrip.h.

◆ myN

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
RealVector DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::myN
protected

The unit normal vector N to the strip.

Definition at line 248 of file ParallelStrip.h.

◆ myNu

template<typename TSpace , bool muIncluded = true, bool muPlusNuIncluded = true>
Scalar DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::myNu
protected

The width \(\nu\) of the strip.

Definition at line 250 of file ParallelStrip.h.


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