DGtal  0.9.3beta
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
DGtal::Ball3D< TSpace > Class Template Reference

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

Inheritance diagram for DGtal::Ball3D< TSpace >:
[legend]
Collaboration 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 ()
 
 Ball3D (const double x0, const double y0, const double z0, const double r)
 
 Ball3D (const RealPoint &aPoint, const double r)
 
RealPoint getLowerBound () const
 
RealPoint getUpperBound () const
 
RealPoint center () const
 
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 ()
 
 ~StarShaped3D ()
 
virtual RealPoint interiorPoint () const
 
virtual Orientation orientation (const RealPoint &p) const
 
virtual RealPoint normal (AngularCoordinates t) const
 
virtual double gaussianCurvature (AngularCoordinates t) const
 
virtual double meanCurvature (AngularCoordinates t) const
 
virtual double arclength (AngularCoordinates t1, AngularCoordinates t2, unsigned int nb) const
 
virtual double surfacelength (AngularCoordinates t1, AngularCoordinates t2, unsigned int nb) const
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 

Protected Member Functions

 Ball3D ()
 

Private Member Functions

Ball3Doperator= (const Ball3D &other)
 

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:
tutorial-examples/AreaSurfaceEstimation-final.cpp.

Definition at line 60 of file Ball3D.h.

Member Typedef Documentation

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

Definition at line 67 of file Ball3D.h.

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

Definition at line 66 of file Ball3D.h.

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

Definition at line 65 of file Ball3D.h.

Constructor & Destructor Documentation

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

Destructor.

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.
template<typename TSpace >
DGtal::Ball3D< TSpace >::Ball3D ( const RealPoint aPoint,
const double  r 
)

Constructor.

Parameters
aPointthe sphere center.
rthe radius of the sphere.
template<typename TSpace >
DGtal::Ball3D< TSpace >::Ball3D ( )
protected

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

Member Function Documentation

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

Implements DGtal::StarShaped3D< TSpace >.

Definition at line 129 of file Ball3D.h.

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

130  {
131  return myCenter;
132  }
RealPoint myCenter
Definition: Ball3D.h:220
template<typename TSpace >
RealPoint DGtal::Ball3D< TSpace >::getLowerBound ( ) const
inlinevirtual
Returns
the lower bound of the sphere.

Implements DGtal::StarShaped3D< TSpace >.

Definition at line 107 of file Ball3D.h.

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

108  {
109 
110  return RealPoint(myCenter[0] - myRadius,
111  myCenter[1] - myRadius ,
112  myCenter[2] - myRadius );
113  }
double myRadius
Definition: Ball3D.h:215
RealPoint myCenter
Definition: Ball3D.h:220
Space::RealPoint RealPoint
Definition: Ball3D.h:66
template<typename TSpace >
RealPoint DGtal::Ball3D< TSpace >::getUpperBound ( ) const
inlinevirtual
Returns
the upper bound of the sphere.

Implements DGtal::StarShaped3D< TSpace >.

Definition at line 119 of file Ball3D.h.

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

120  {
121  return RealPoint(myCenter[0] + myRadius ,
122  myCenter[1] + myRadius,
123  myCenter[2] + myRadius);
124  }
double myRadius
Definition: Ball3D.h:215
RealPoint myCenter
Definition: Ball3D.h:220
Space::RealPoint RealPoint
Definition: Ball3D.h:66
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 >.

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.
template<typename TSpace >
Ball3D& DGtal::Ball3D< TSpace >::operator= ( const Ball3D< TSpace > &  other)
private

Copy constructor.

Parameters
otherthe object to clone. Forbidden by default. Assignment.
otherthe object to copy.
Returns
a reference on 'this'. Forbidden by default.
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 wich are respectivly between [-Pi/2,Pi/2) and [-Pi,Pi] corresponding to this point for the shape.

Implements DGtal::StarShaped3D< TSpace >.

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 >.

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 >.

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 >.

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 >.

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 >.

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.
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

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

Radius of the sphere.

Definition at line 215 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: