DGtal 1.3.0
|
Aim: model of CEuclideanOrientedShape and CEuclideanBoundedShape concepts to create an hypercube in nD.. More...
#include <DGtal/shapes/implicit/ImplicitHyperCube.h>
Public Types | |
typedef ImplicitHyperCube< TSpace > | Self |
typedef TSpace | Space |
typedef Space::RealPoint | RealPoint |
typedef double | Value |
Public Member Functions | |
ImplicitHyperCube (const RealPoint &aCenter, const double &aHalfWidth) | |
~ImplicitHyperCube () | |
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 | |
ImplicitHyperCube () | |
Private Member Functions | |
ImplicitHyperCube & | operator= (const ImplicitHyperCube &other) |
Private Attributes | |
RealPoint | myCenter |
Ball center. More... | |
double | myHalfWidth |
Ball HalfWidth. More... | |
Aim: model of CEuclideanOrientedShape and CEuclideanBoundedShape concepts to create an hypercube in nD..
Description of template class 'ImplicitHyperCube'
TSpace | the Digital space definition. |
Definition at line 59 of file ImplicitHyperCube.h.
typedef Space::RealPoint DGtal::ImplicitHyperCube< TSpace >::RealPoint |
Definition at line 65 of file ImplicitHyperCube.h.
typedef ImplicitHyperCube<TSpace> DGtal::ImplicitHyperCube< TSpace >::Self |
Definition at line 63 of file ImplicitHyperCube.h.
typedef TSpace DGtal::ImplicitHyperCube< TSpace >::Space |
Definition at line 64 of file ImplicitHyperCube.h.
typedef double DGtal::ImplicitHyperCube< TSpace >::Value |
Definition at line 66 of file ImplicitHyperCube.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 ImplicitHyperCube.h.
DGtal::ImplicitHyperCube< TSpace >::~ImplicitHyperCube | ( | ) |
Destructor.
|
protected |
Constructor. Forbidden by default (protected to avoid g++ warnings).
|
inline |
Definition at line 157 of file ImplicitHyperCube.h.
References DGtal::ImplicitHyperCube< TSpace >::myCenter.
|
inline |
Returns the lower bound of the Shape bounding box.
Definition at line 137 of file ImplicitHyperCube.h.
References DGtal::PointVector< dim, TEuclideanRing, TContainer >::diagonal(), DGtal::ImplicitHyperCube< TSpace >::myCenter, and DGtal::ImplicitHyperCube< TSpace >::myHalfWidth.
|
inline |
Returns the upper bound of the Shape bounding box.
Definition at line 149 of file ImplicitHyperCube.h.
References DGtal::PointVector< dim, TEuclideanRing, TContainer >::diagonal(), DGtal::ImplicitHyperCube< TSpace >::myCenter, and DGtal::ImplicitHyperCube< TSpace >::myHalfWidth.
|
inline |
Return true if the given point belongs to the shape.
aPoint | the point to evalute the function at. |
Definition at line 112 of file ImplicitHyperCube.h.
References DGtal::ImplicitHyperCube< TSpace >::operator()().
bool DGtal::ImplicitHyperCube< 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 ImplicitHyperCube.h.
References DGtal::ImplicitHyperCube< TSpace >::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 ImplicitHyperCube.h.
References aPoint(), DGtal::PointVector< dim, TEuclideanRing, TContainer >::L_infty, DGtal::ImplicitHyperCube< TSpace >::myCenter, and DGtal::ImplicitHyperCube< TSpace >::myHalfWidth.
Referenced by DGtal::ImplicitHyperCube< TSpace >::isInside().
|
private |
Assignment.
other | the object to copy. |
|
inline |
Definition at line 119 of file ImplicitHyperCube.h.
References DGtal::INSIDE, DGtal::ON, and DGtal::OUTSIDE.
void DGtal::ImplicitHyperCube< 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 ImplicitHyperCube.h.
Referenced by DGtal::ImplicitHyperCube< TSpace >::center(), DGtal::ImplicitHyperCube< TSpace >::getLowerBound(), DGtal::ImplicitHyperCube< TSpace >::getUpperBound(), DGtal::ImplicitHyperCube< TSpace >::moveTo(), and DGtal::ImplicitHyperCube< TSpace >::operator()().
|
private |
Ball HalfWidth.
Definition at line 196 of file ImplicitHyperCube.h.
Referenced by DGtal::ImplicitHyperCube< TSpace >::getLowerBound(), DGtal::ImplicitHyperCube< TSpace >::getUpperBound(), and DGtal::ImplicitHyperCube< TSpace >::operator()().