DGtal
1.5.beta
|
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) | |
ParallelStrip & | operator= (const ParallelStrip &other) |
const RealVector & | normal () 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 >)) | |
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.
TSpace | any digital space, i.e., a model of CSpace. |
muIncluded | when 'true', the first inequality is large, i.e. \( \mu \le N \cdot X \), otherwise it is strict, i.e. \( \mu < N \cdot X \) |
muPlusNuIncluded | when '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.
typedef RealVector::Component DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::Component |
Definition at line 103 of file ParallelStrip.h.
typedef RealPoint::Coordinate DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::Coordinate |
Definition at line 102 of file ParallelStrip.h.
typedef Space::Point DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::Point |
Definition at line 98 of file ParallelStrip.h.
typedef Space::RealPoint DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::RealPoint |
Definition at line 99 of file ParallelStrip.h.
typedef Space::RealVector DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::RealVector |
Definition at line 101 of file ParallelStrip.h.
typedef Component DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::Scalar |
Definition at line 104 of file ParallelStrip.h.
typedef ParallelStrip<Space,muIncluded,muPlusNuIncluded> DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::Self |
Definition at line 97 of file ParallelStrip.h.
typedef TSpace DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::Space |
Definition at line 96 of file ParallelStrip.h.
typedef Space::Vector DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::Vector |
Definition at line 100 of file ParallelStrip.h.
DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::~ParallelStrip | ( | ) |
Destructor.
DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::ParallelStrip | ( | ) |
Constructor. The object is invalid.
DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::ParallelStrip | ( | Scalar | mu, |
const RealVector & | N, | ||
Scalar | nu | ||
) |
Constructor from parameters.
mu | the minimal value of N.X |
N | the normal to the plane |
nu | the width of the strip. |
Note that the equation is normalized so that the normal is a unit vector.
DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::ParallelStrip | ( | const ParallelStrip< TSpace, muIncluded, muPlusNuIncluded > & | other | ) |
Copy constructor.
other | the object to clone. |
Scalar DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::axisWidth | ( | ) | const |
|
private |
Scalar DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::diagonalWidth | ( | ) | const |
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.
mu | the lower bound (corresponding to the unit vector). |
mu_plus_nu | the upper bound (corresponding to the unit vector). |
bool DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
Dimension DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::mainAxis | ( | ) | const |
Dimension DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::mainDiagonal | ( | ) | const |
Scalar DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::mu | ( | ) | const |
const RealVector& DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::normal | ( | ) | const |
Scalar DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::nu | ( | ) | const |
Same as width().
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.
p | any 3D digital point. |
bool DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::operator() | ( | const RealPoint & | p | ) | const |
Checks if the (real-valued) point p is in this strip.
p | any 3D real-valued point. |
ParallelStrip& DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::operator= | ( | const ParallelStrip< TSpace, muIncluded, muPlusNuIncluded > & | other | ) |
Assignment.
other | the object to copy. |
void DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
Scalar DGtal::ParallelStrip< TSpace, muIncluded, muPlusNuIncluded >::width | ( | ) | const |
Same as nu().
|
protected |
The minimal scalar value \(\mu\) of the strip.
Definition at line 246 of file ParallelStrip.h.
|
protected |
The unit normal vector N to the strip.
Definition at line 248 of file ParallelStrip.h.
|
protected |
The width \(\nu\) of the strip.
Definition at line 250 of file ParallelStrip.h.