DGtal 2.0.0
|
Aim: model of CEuclideanOrientedShape and CEuclideanBoundedShape concepts to create a ball for the L_1 norm in nD. More...
#include <DGtal/shapes/implicit/ImplicitNorm1Ball.h>
Public Types | |
typedef ImplicitNorm1Ball< TSpace > | Self |
typedef TSpace | Space |
typedef Space::RealPoint | RealPoint |
typedef double | Value |
Public Member Functions | |
ImplicitNorm1Ball (const RealPoint &aCenter, const double &aHalfWidth) | |
~ImplicitNorm1Ball () | |
double | operator() (const RealPoint &aPoint) const |
bool | isInside (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 | |
ImplicitNorm1Ball () |
Private Member Functions | |
ImplicitNorm1Ball & | operator= (const ImplicitNorm1Ball &other) |
Private Attributes | |
RealPoint | myCenter |
Ball center. | |
double | myHalfWidth |
Ball HalfWidth. |
Aim: model of CEuclideanOrientedShape and CEuclideanBoundedShape concepts to create a ball for the L_1 norm in nD.
Description of template class 'ImplicitNorm1Ball'
TSpace | the Digital space definition. |
Definition at line 59 of file ImplicitNorm1Ball.h.
typedef Space::RealPoint DGtal::ImplicitNorm1Ball< TSpace >::RealPoint |
Definition at line 65 of file ImplicitNorm1Ball.h.
typedef ImplicitNorm1Ball<TSpace> DGtal::ImplicitNorm1Ball< TSpace >::Self |
Definition at line 63 of file ImplicitNorm1Ball.h.
typedef TSpace DGtal::ImplicitNorm1Ball< TSpace >::Space |
Definition at line 64 of file ImplicitNorm1Ball.h.
typedef double DGtal::ImplicitNorm1Ball< TSpace >::Value |
Definition at line 66 of file ImplicitNorm1Ball.h.
|
inline |
Constructor. Contructs a ball with center aCenter and width aWidth.
aCenter | the cube center. |
aHalfWidth | the cube half-width. |
Definition at line 75 of file ImplicitNorm1Ball.h.
References myCenter, and myHalfWidth.
Referenced by operator=().
DGtal::ImplicitNorm1Ball< TSpace >::~ImplicitNorm1Ball | ( | ) |
Destructor.
|
protected |
Constructor. Forbidden by default (protected to avoid g++ warnings).
|
inline |
Definition at line 157 of file ImplicitNorm1Ball.h.
References myCenter.
|
inline |
Returns the lower bound of the Shape bounding box.
Definition at line 137 of file ImplicitNorm1Ball.h.
References DGtal::PointVector< dim, double >::diagonal(), myCenter, and myHalfWidth.
|
inline |
Returns the upper bound of the Shape bounding box.
Definition at line 149 of file ImplicitNorm1Ball.h.
References DGtal::PointVector< dim, double >::diagonal(), myCenter, and myHalfWidth.
|
inline |
Return true if the given point belongs to the shape.
aPoint | the point to evalute the function at. |
Definition at line 111 of file ImplicitNorm1Ball.h.
References aPoint, and operator()().
bool DGtal::ImplicitNorm1Ball< TSpace >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
|
inline |
Modify the shape center
newCenter | the new center position |
Definition at line 167 of file ImplicitNorm1Ball.h.
References myCenter.
|
inline |
Operator() of the implicit function. Given a point, it returns the function value at p. In Shapes, positive values are used to construct a set.
aPoint | the point to evalute the function at. |
Definition at line 99 of file ImplicitNorm1Ball.h.
References aPoint, DGtal::PointVector< dim, double >::L_1, and myCenter.
Referenced by isInside().
|
private |
Assignment.
other | the object to copy. |
References ImplicitNorm1Ball().
|
inline |
Definition at line 119 of file ImplicitNorm1Ball.h.
References aPoint, DGtal::INSIDE, DGtal::ON, and DGtal::OUTSIDE.
void DGtal::ImplicitNorm1Ball< TSpace >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
|
private |
Ball center.
Definition at line 193 of file ImplicitNorm1Ball.h.
Referenced by center(), getLowerBound(), getUpperBound(), ImplicitNorm1Ball(), moveTo(), and operator()().
|
private |
Ball HalfWidth.
Definition at line 196 of file ImplicitNorm1Ball.h.
Referenced by getLowerBound(), getUpperBound(), and ImplicitNorm1Ball().