DGtal  1.3.beta
Public Types | Public Member Functions | Private Attributes
DGtal::Ball3D< TSpace > Class Template Referencefinal

Aim: Model of the concept StarShaped3D represents any Sphere in the space. More...

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

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

Public Types

typedef TSpace Space
 
typedef Space::RealPoint RealPoint
 
typedef std::pair< double, double > AngularCoordinates
 
- Public Types inherited from DGtal::StarShaped3D< TSpace >
typedef TSpace Space
 
typedef Space::RealPoint RealPoint
 
typedef std::pair< double, double > AngularCoordinates
 

Public Member Functions

 Ball3D ()=delete
 
 Ball3D (const double x0, const double y0, const double z0, const double r)
 
 Ball3D (const RealPoint &aPoint, const double r)
 
 Ball3D (const Ball3D &other)
 
Ball3Doperator= (const Ball3D &other)=delete
 
 ~Ball3D ()=default
 
RealPoint getLowerBound () const
 
RealPoint getUpperBound () const
 
RealPoint center () const
 
void moveTo (const RealPoint &newCenter)
 
AngularCoordinates parameter (const RealPoint &p) const
 
RealPoint x (const AngularCoordinates &t) const
 
virtual RealPoint gradient (const AngularCoordinates &t) const
 
virtual RealPoint rt (const AngularCoordinates &t) const
 
virtual RealPoint rp (const AngularCoordinates &t) const
 
virtual RealPoint rtt (const AngularCoordinates &t) const
 
virtual RealPoint rpp (const AngularCoordinates &t) const
 
virtual RealPoint rtp (const AngularCoordinates &t) const
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 
- Public Member Functions inherited from DGtal::StarShaped3D< TSpace >
 StarShaped3D ()=default
 
StarShaped3Doperator= (const StarShaped3D &other)=delete
 
virtual ~StarShaped3D ()=default
 
virtual RealPoint interiorPoint () const
 
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 Attributes

double myRadius
 
RealPoint myCenter
 

Detailed Description

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

Aim: Model of the concept StarShaped3D represents any Sphere in the space.

Description of template class 'Ball3D'

Examples
dec/exampleHeatLaplace.cpp, and tutorial-examples/AreaSurfaceEstimation-final.cpp.

Definition at line 60 of file Ball3D.h.

Member Typedef Documentation

◆ AngularCoordinates

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

Definition at line 67 of file Ball3D.h.

◆ RealPoint

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

Definition at line 66 of file Ball3D.h.

◆ Space

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

Definition at line 65 of file Ball3D.h.

Constructor & Destructor Documentation

◆ Ball3D() [1/4]

template<typename TSpace >
DGtal::Ball3D< TSpace >::Ball3D ( )
delete

Constructor. Forbidden by default.

◆ Ball3D() [2/4]

template<typename TSpace >
DGtal::Ball3D< TSpace >::Ball3D ( const double  x0,
const double  y0,
const double  z0,
const double  r 
)

Constructor.

Parameters
x0the x-coordinate of the sphere center.
y0the y-coordinate of the sphere center.
z0the z-coordinate of the sphere center.
rthe radius of the sphere.

◆ Ball3D() [3/4]

template<typename TSpace >
DGtal::Ball3D< TSpace >::Ball3D ( const RealPoint aPoint,
const double  r 
)

Constructor.

Parameters
aPointthe sphere center.
rthe radius of the sphere.

◆ Ball3D() [4/4]

template<typename TSpace >
DGtal::Ball3D< TSpace >::Ball3D ( const Ball3D< TSpace > &  other)

Copy constructor.

Parameters
otherthe object to clone.

◆ ~Ball3D()

template<typename TSpace >
DGtal::Ball3D< TSpace >::~Ball3D ( )
default

Destructor.

Member Function Documentation

◆ center()

template<typename TSpace >
RealPoint DGtal::Ball3D< TSpace >::center ( ) const
inlinevirtual
Returns
the center of the sphere.

Implements DGtal::StarShaped3D< TSpace >.

Definition at line 135 of file Ball3D.h.

136  {
137  return myCenter;
138  }

References DGtal::Ball3D< TSpace >::myCenter.

◆ getLowerBound()

template<typename TSpace >
RealPoint DGtal::Ball3D< TSpace >::getLowerBound ( ) const
inlinevirtual
Returns
the lower bound of the sphere.

Implements DGtal::StarShaped3D< TSpace >.

Definition at line 117 of file Ball3D.h.

118  {
119 
120  return myCenter - myRadius;
121  }

References DGtal::Ball3D< TSpace >::myCenter, and DGtal::Ball3D< TSpace >::myRadius.

◆ getUpperBound()

template<typename TSpace >
RealPoint DGtal::Ball3D< TSpace >::getUpperBound ( ) const
inlinevirtual
Returns
the upper bound of the sphere.

Implements DGtal::StarShaped3D< TSpace >.

Definition at line 127 of file Ball3D.h.

128  {
129  return myCenter + myRadius;
130  }

References DGtal::Ball3D< TSpace >::myCenter, and DGtal::Ball3D< TSpace >::myRadius.

◆ gradient()

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

Implements DGtal::StarShaped3D< TSpace >.

◆ isValid()

template<typename TSpace >
bool DGtal::Ball3D< 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::Ball3D< TSpace >::moveTo ( const RealPoint newCenter)
inlinevirtual

Modify the shape center

Parameters
newCenterthe new center position

Implements DGtal::StarShaped3D< TSpace >.

Definition at line 145 of file Ball3D.h.

146  {
147  myCenter = newCenter;
148  }

References DGtal::Ball3D< TSpace >::myCenter.

◆ operator=()

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

Assignment.

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

◆ parameter()

template<typename TSpace >
AngularCoordinates DGtal::Ball3D< TSpace >::parameter ( const RealPoint p) const
virtual
Parameters
pany point in the space.
Returns
the couple of angles parameters Teta && Phi which are respectivly between [-Pi/2,Pi/2) and [-Pi,Pi] corresponding to this point for the shape.

Implements DGtal::StarShaped3D< TSpace >.

◆ rp()

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

Implements DGtal::StarShaped3D< TSpace >.

◆ rpp()

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

Implements DGtal::StarShaped3D< TSpace >.

◆ rt()

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

Implements DGtal::StarShaped3D< TSpace >.

◆ rtp()

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

Implements DGtal::StarShaped3D< TSpace >.

◆ rtt()

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

Implements DGtal::StarShaped3D< TSpace >.

◆ selfDisplay()

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

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

◆ x()

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

Implements DGtal::StarShaped3D< TSpace >.

Field Documentation

◆ myCenter

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

◆ myRadius

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

Radius of the sphere.

Definition at line 216 of file Ball3D.h.

Referenced by DGtal::Ball3D< TSpace >::getLowerBound(), and DGtal::Ball3D< TSpace >::getUpperBound().


The documentation for this class was generated from the following file:
DGtal::Ball3D::myCenter
RealPoint myCenter
Definition: Ball3D.h:221
DGtal::Ball3D::myRadius
double myRadius
Definition: Ball3D.h:216