File failed to load: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/config/TeX-MML-AM_CHTML/MathJax.js
DGtal 2.0.0
DGtal::ImplicitBall< TSpace > Class Template Reference

Aim: model of CEuclideanOrientedShape and CEuclideanBoundedShape concepts to create a ball in nD.. More...

#include <DGtal/shapes/implicit/ImplicitBall.h>

Inheritance diagram for DGtal::ImplicitBall< TSpace >:
[legend]

Public Types

typedef ImplicitBall< TSpace > Self
typedef TSpace Space
typedef Space::RealPoint RealPoint
typedef Space::Integer Integer
typedef double Value

Public Member Functions

 ImplicitBall (const RealPoint &aCenter, const double &aRadius)
 ~ImplicitBall ()
Value operator() (const RealPoint &aPoint) const
Orientation orientation (const RealPoint &aPoint) const
RealPoint getLowerBound () const
RealPoint getUpperBound () const
RealPoint center () const
void moveTo (const RealPoint &newCenter)
void selfDisplay (std::ostream &out) const
bool isValid () const

Protected Member Functions

 ImplicitBall ()

Private Member Functions

ImplicitBalloperator= (const ImplicitBall &other)

Private Attributes

RealPoint myCenter
 Ball center.
double myRadius
 Ball Radius.

Detailed Description

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

Aim: model of CEuclideanOrientedShape and CEuclideanBoundedShape concepts to create a ball in nD..

Description of template class 'ImplicitBall'

Model of CImplicitFunction

Template Parameters
TSpacethe Digital space definition.
Examples
shapes/exampleEuclideanShapesDecorator.cpp, topology/frontierAndBoundary.cpp, and tutorial-examples/volDTGranulo.cpp.

Definition at line 64 of file ImplicitBall.h.

Member Typedef Documentation

◆ Integer

template<typename TSpace>
typedef Space::Integer DGtal::ImplicitBall< TSpace >::Integer

Definition at line 71 of file ImplicitBall.h.

◆ RealPoint

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

Definition at line 70 of file ImplicitBall.h.

◆ Self

template<typename TSpace>
typedef ImplicitBall<TSpace> DGtal::ImplicitBall< TSpace >::Self

Definition at line 68 of file ImplicitBall.h.

◆ Space

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

Definition at line 69 of file ImplicitBall.h.

◆ Value

template<typename TSpace>
typedef double DGtal::ImplicitBall< TSpace >::Value

Definition at line 72 of file ImplicitBall.h.

Constructor & Destructor Documentation

◆ ImplicitBall() [1/2]

template<typename TSpace>
DGtal::ImplicitBall< TSpace >::ImplicitBall ( const RealPoint & aCenter,
const double & aRadius )
inline

Constructor. Contructs a ball with center aCenter and radius aRadius.

Parameters
aCenterthe ball center.
aRadiusthe ball radius.

Definition at line 81 of file ImplicitBall.h.

83 {};
Aim: model of CEuclideanOrientedShape and CEuclideanBoundedShape concepts to create a ball in nD....
double myRadius
Ball Radius.
RealPoint myCenter
Ball center.

◆ ~ImplicitBall()

template<typename TSpace>
DGtal::ImplicitBall< TSpace >::~ImplicitBall ( )

Destructor.

◆ ImplicitBall() [2/2]

template<typename TSpace>
DGtal::ImplicitBall< TSpace >::ImplicitBall ( )
protected

Constructor. Forbidden by default (protected to avoid g++ warnings).

Member Function Documentation

◆ center()

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

Definition at line 128 of file ImplicitBall.h.

129 {
130 return myCenter;
131 }

◆ getLowerBound()

template<typename TSpace>
RealPoint DGtal::ImplicitBall< TSpace >::getLowerBound ( ) const
inline
Examples
tutorial-examples/volDTGranulo.cpp.

Definition at line 114 of file ImplicitBall.h.

115 {
117 }
static Self diagonal(Component val=1)

Referenced by main().

◆ getUpperBound()

template<typename TSpace>
RealPoint DGtal::ImplicitBall< TSpace >::getUpperBound ( ) const
inline
Examples
tutorial-examples/volDTGranulo.cpp.

Definition at line 120 of file ImplicitBall.h.

121 {
123 }

Referenced by main().

◆ isValid()

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

Checks the validity/consistency of the object.

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

◆ moveTo()

template<typename TSpace>
void DGtal::ImplicitBall< TSpace >::moveTo ( const RealPoint & newCenter)
inline

Modify the shape center

Parameters
newCenterthe new center position

Definition at line 138 of file ImplicitBall.h.

139 {
141 }

◆ operator()()

template<typename TSpace>
Value DGtal::ImplicitBall< TSpace >::operator() ( const RealPoint & aPoint) const
inline

Definition at line 96 of file ImplicitBall.h.

97 {
98 return myRadius - (aPoint - myCenter ).norm();
99 }

◆ operator=()

template<typename TSpace>
ImplicitBall & DGtal::ImplicitBall< TSpace >::operator= ( const ImplicitBall< TSpace > & other)
private

Assignment.

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

◆ orientation()

template<typename TSpace>
Orientation DGtal::ImplicitBall< TSpace >::orientation ( const RealPoint & aPoint) const
inline

Definition at line 102 of file ImplicitBall.h.

103 {
104 if (this->operator()(aPoint) > 0.0)
105 return INSIDE;
106 else
107 if (this->operator()(aPoint) < 0.0)
108 return OUTSIDE;
109 else
110 return ON;
111 }

◆ selfDisplay()

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

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

Field Documentation

◆ myCenter

template<typename TSpace>
RealPoint DGtal::ImplicitBall< TSpace >::myCenter
private

Ball center.

Definition at line 164 of file ImplicitBall.h.

◆ myRadius

template<typename TSpace>
double DGtal::ImplicitBall< TSpace >::myRadius
private

Ball Radius.

Definition at line 167 of file ImplicitBall.h.


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