DGtal 1.3.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Member Functions
DGtal::StarShaped3D< TSpace > Class Template Referenceabstract

#include <DGtal/shapes/parametric/StarShaped3D.h>

Inheritance diagram for DGtal::StarShaped3D< TSpace >:
DGtal::Ball3D< TSpace >

Public Types

typedef TSpace Space
 
typedef Space::RealPoint RealPoint
 
typedef std::pair< double, double > AngularCoordinates
 

Public Member Functions

 StarShaped3D ()=default
 
StarShaped3Doperator= (const StarShaped3D &other)=delete
 
virtual ~StarShaped3D ()=default
 
virtual RealPoint interiorPoint () const
 
virtual RealPoint getLowerBound () const =0
 
virtual RealPoint getUpperBound () const =0
 
virtual RealPoint center () const =0
 
virtual void moveTo (const RealPoint &newCenter)=0
 
virtual AngularCoordinates parameter (const RealPoint &p) const =0
 
virtual RealPoint x (const AngularCoordinates &t) const =0
 
virtual RealPoint gradient (const AngularCoordinates &t) const =0
 
virtual RealPoint rt (const AngularCoordinates &t) const =0
 
virtual RealPoint rp (const AngularCoordinates &t) const =0
 
virtual RealPoint rtt (const AngularCoordinates &t) const =0
 
virtual RealPoint rpp (const AngularCoordinates &t) const =0
 
virtual RealPoint rtp (const AngularCoordinates &t) const =0
 
virtual Orientation orientation (const RealPoint &p) const
 
virtual RealPoint normal (const AngularCoordinates &t) const
 
virtual double gaussianCurvature (const AngularCoordinates &t) const
 
virtual double meanCurvature (const AngularCoordinates &t) const
 
virtual double arclength (const AngularCoordinates &t1, AngularCoordinates t2, unsigned int nb) const
 
virtual double surfacelength (const AngularCoordinates &t1, AngularCoordinates t2, unsigned int nb) const
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 

Private Member Functions

template<typename T >
bool isAlmostEqual (T x, T y) const
 

Detailed Description

template<typename TSpace>
class DGtal::StarShaped3D< TSpace >

Description of template class 'StarShaped3D'

Aim: Abstract class that represents any star-shaped object in dimension 3. Such a shape as a center and any segment from this center to the shape boundary is included in the shape. These shapes can thus be parameterized by a couple of angles 'Teta,Phi' turning around the center.

StarShaped3D and its derived classes are models of CEuclideanBoundedShape and CEuclideanOrientedShape.

NB: A backport from ImaGene.

Template Parameters
TSpacespace in which the shape is defined.

Definition at line 71 of file StarShaped3D.h.

Member Typedef Documentation

◆ AngularCoordinates

template<typename TSpace >
typedef std::pair<double,double> DGtal::StarShaped3D< TSpace >::AngularCoordinates

Definition at line 77 of file StarShaped3D.h.

◆ RealPoint

template<typename TSpace >
typedef Space::RealPoint DGtal::StarShaped3D< TSpace >::RealPoint

Definition at line 76 of file StarShaped3D.h.

◆ Space

template<typename TSpace >
typedef TSpace DGtal::StarShaped3D< TSpace >::Space

Definition at line 75 of file StarShaped3D.h.

Constructor & Destructor Documentation

◆ StarShaped3D()

template<typename TSpace >
DGtal::StarShaped3D< TSpace >::StarShaped3D ( )
default

Constructor.

◆ ~StarShaped3D()

template<typename TSpace >
virtual DGtal::StarShaped3D< TSpace >::~StarShaped3D ( )
virtualdefault

Destructor.

Member Function Documentation

◆ arclength()

template<typename TSpace >
virtual double DGtal::StarShaped3D< TSpace >::arclength ( const AngularCoordinates t1,
AngularCoordinates  t2,
unsigned int  nb 
) const
virtual
Parameters
t1is a couple of Teta && Phi wich are 2 angles respectivly between [0,2PI] and [0,Pi].
t2is a couple of Teta && Phi wich are 2 angles respectivly between [0,2PI] and [0,Pi]. further from [t1].
nbthe number of points used to estimate the arclength between x(Teta1,Phi1) and x(Teta2,Phi2).
Returns
the estimated arclength.

◆ center()

template<typename TSpace >
virtual RealPoint DGtal::StarShaped3D< TSpace >::center ( ) const
pure virtual
Returns
the center of the star-shaped object.

Implemented in DGtal::Ball3D< TSpace >.

Referenced by DGtal::StarShaped3D< TSpace >::interiorPoint().

◆ gaussianCurvature()

template<typename TSpace >
virtual double DGtal::StarShaped3D< TSpace >::gaussianCurvature ( const AngularCoordinates t) const
virtual
Parameters
tis a couple of Teta && Phi wich are 2 angles respectivly between [0,2PI] and [0,Pi].
Returns
the gaussian curvature at point (x(t),y(t)), positive is convex, negative is concave when shape is to the left and the shape boundary is followed counterclockwise.

◆ getLowerBound()

template<typename TSpace >
virtual RealPoint DGtal::StarShaped3D< TSpace >::getLowerBound ( ) const
pure virtual
Returns
the lower bound of the shape bounding box.

Implemented in DGtal::Ball3D< TSpace >.

◆ getUpperBound()

template<typename TSpace >
virtual RealPoint DGtal::StarShaped3D< TSpace >::getUpperBound ( ) const
pure virtual
Returns
the upper bound of the shape bounding box.

Implemented in DGtal::Ball3D< TSpace >.

◆ gradient()

template<typename TSpace >
virtual RealPoint DGtal::StarShaped3D< TSpace >::gradient ( const AngularCoordinates t) const
pure virtual
Parameters
tis a couple of Teta && Phi wich are 2 angles respectivly between [0,2PI] and [0,Pi].
Returns
the vector (gradf(M).

Implemented in DGtal::Ball3D< TSpace >.

◆ interiorPoint()

template<typename TSpace >
virtual RealPoint DGtal::StarShaped3D< TSpace >::interiorPoint ( ) const
inlinevirtual
Returns
a point p such that 'isInside(p)' returns 'true'.

Definition at line 102 of file StarShaped3D.h.

103 {
104 return center();
105 }
virtual RealPoint center() const =0

References DGtal::StarShaped3D< TSpace >::center().

◆ isAlmostEqual()

template<typename TSpace >
template<typename T >
bool DGtal::StarShaped3D< TSpace >::isAlmostEqual ( x,
y 
) const
inlineprivate

Equality test using relative tolerance.

Definition at line 309 of file StarShaped3D.h.

310 {
311 return std::abs(x - y) <= std::numeric_limits<T>::epsilon();
312 }

◆ isValid()

template<typename TSpace >
bool DGtal::StarShaped3D< TSpace >::isValid ( ) const

Checks the validity/consistency of the object.

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

◆ meanCurvature()

template<typename TSpace >
virtual double DGtal::StarShaped3D< TSpace >::meanCurvature ( const AngularCoordinates t) const
virtual
Parameters
tis a couple of Teta && Phi wich are 2 angles respectivly between [0,2PI] and [0,Pi]
Returns
the mean curvature at point (x(t),y(t)), positive is convex, negative is concave when shape is to the left and the shape boundary is followed counterclockwise.

◆ moveTo()

template<typename TSpace >
virtual void DGtal::StarShaped3D< TSpace >::moveTo ( const RealPoint newCenter)
pure virtual

Move the center of the star-shaped object to a new position

Parameters
newCenterthe new center position

Implemented in DGtal::Ball3D< TSpace >.

◆ normal()

template<typename TSpace >
virtual RealPoint DGtal::StarShaped3D< TSpace >::normal ( const AngularCoordinates t) const
virtual
Parameters
tis a couple of Teta && Phi wich are 2 angles respectivly between [0,2PI] and [0,Pi].
Returns
the vector normal made unitary which is the unit normal to the shape boundary looking inside the shape.

◆ operator=()

template<typename TSpace >
StarShaped3D & DGtal::StarShaped3D< TSpace >::operator= ( const StarShaped3D< TSpace > &  other)
delete

Assignment.

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

◆ orientation()

template<typename TSpace >
virtual Orientation DGtal::StarShaped3D< TSpace >::orientation ( const RealPoint p) const
virtual

Return the orienatation of a point with respect to a shape.

Parameters
pinput point
Returns
the orientation of the point (<0 means inside, ...)

◆ parameter()

template<typename TSpace >
virtual AngularCoordinates DGtal::StarShaped3D< TSpace >::parameter ( const RealPoint p) const
pure virtual
Parameters
pany point in the sapce.
Returns
the angles parameters (Teta, Phi) corresponding to this point for the shape.

Implemented in DGtal::Ball3D< TSpace >.

◆ rp()

template<typename TSpace >
virtual RealPoint DGtal::StarShaped3D< TSpace >::rp ( const AngularCoordinates t) const
pure virtual
Parameters
tis a couple of Teta && Phi wich are 2 angles respectivly between [0,2PI] and [0,Pi].
Returns
the vector (rp(M)) wich is the first partial derivative with respect to Phi.

Implemented in DGtal::Ball3D< TSpace >.

◆ rpp()

template<typename TSpace >
virtual RealPoint DGtal::StarShaped3D< TSpace >::rpp ( const AngularCoordinates t) const
pure virtual
Parameters
tis a couple of Teta && Phi wich are 2 angles respectivly between [0,2PI] and [0,Pi].
Returns
the vector (rpp(M)) wich is second the partial derivative with respect to Phi.

Implemented in DGtal::Ball3D< TSpace >.

◆ rt()

template<typename TSpace >
virtual RealPoint DGtal::StarShaped3D< TSpace >::rt ( const AngularCoordinates t) const
pure virtual
Parameters
tis a couple of Teta && Phi wich are 2 angles respectivly between [0,2PI] and [0,Pi].
Returns
the vector (rt(M)) wich is the partial derivative with respect to Teta.

Implemented in DGtal::Ball3D< TSpace >.

◆ rtp()

template<typename TSpace >
virtual RealPoint DGtal::StarShaped3D< TSpace >::rtp ( const AngularCoordinates t) const
pure virtual
Parameters
tis a couple of Teta && Phi wich are 2 angles respectivly between [0,2PI] and [0,Pi].
Returns
the vector (rpp(M)) wich is second the partial derivative with respect to Teta then Phi.

Implemented in DGtal::Ball3D< TSpace >.

◆ rtt()

template<typename TSpace >
virtual RealPoint DGtal::StarShaped3D< TSpace >::rtt ( const AngularCoordinates t) const
pure virtual
Parameters
tis a couple of Teta && Phi wich are 2 angles respectivly between [0,2PI] and [0,Pi].
Returns
the vector (rtt(M)) wich is second the partial derivative with respect to Teta(twice).

Implemented in DGtal::Ball3D< TSpace >.

◆ selfDisplay()

template<typename TSpace >
void DGtal::StarShaped3D< TSpace >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

◆ surfacelength()

template<typename TSpace >
virtual double DGtal::StarShaped3D< TSpace >::surfacelength ( const AngularCoordinates t1,
AngularCoordinates  t2,
unsigned int  nb 
) const
virtual
Parameters
t1is a couple of Teta && Phi wich are 2 angles respectivly between [0,2PI] and [0,Pi].
t2is a couple of Teta && Phi wich are 2 angles respectivly between [0,2PI] and [0,Pi]. further from [t1].
nbthe number of points used to estimate the surface between x(Teta1,Phi1) and x(Teta2,Phi2).
Returns
the estimated surfacelength.

◆ x()

template<typename TSpace >
virtual RealPoint DGtal::StarShaped3D< TSpace >::x ( const AngularCoordinates t) const
pure virtual
Parameters
tis a couple of Theta && Phi wich are 2 angles respectivly between [0,2PI] and [0,Pi].
Returns
the vector (x(t),y(t),z(t)) which is the position on the shape boundary.

Implemented in DGtal::Ball3D< TSpace >.


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