|
DGtal 1.4.2
|
Aim: Model of the concept StarShaped represents an astroid. More...
#include <DGtal/shapes/parametric/Astroid2D.h>
Public Types | |
| typedef TSpace | Space |
| typedef Space::RealPoint | RealPoint |
| typedef Space::RealVector | RealVector |
Public Types inherited from DGtal::StarShaped2D< TSpace > | |
| typedef TSpace | Space |
| typedef Space::RealPoint | RealPoint |
Public Member Functions | |
| Astroid2D ()=delete | |
| Astroid2D (const double x0, const double y0, const double a, const double b) | |
| Astroid2D (const RealPoint &aPoint, const double a, const double b) | |
| Astroid2D (const Astroid2D &other) | |
| Astroid2D & | operator= (const Astroid2D &other)=delete |
| ~Astroid2D ()=default | |
| RealPoint | getLowerBound () const |
| RealPoint | getUpperBound () const |
| RealPoint | center () const |
| void | moveTo (const RealPoint &newCenter) |
| double | parameter (const RealPoint &p) const |
| RealPoint | x (const double t) const |
| RealVector | xp (const double t) const |
| RealVector | xpp (const double t) const |
| void | selfDisplay (std::ostream &out) const |
| bool | isValid () const |
Public Member Functions inherited from DGtal::StarShaped2D< TSpace > | |
| StarShaped2D ()=default | |
| StarShaped2D (const StarShaped2D &other)=delete | |
| StarShaped2D & | operator= (const StarShaped2D &other)=delete |
| virtual | ~StarShaped2D ()=default |
| virtual RealPoint | interiorPoint () const |
| Orientation | orientation (const RealPoint &p) const |
| RealPoint | tangent (const double t) const |
| RealPoint | normal (const double t) const |
| double | curvature (const double t) const |
| double | arclength (const double t1, double t2, const unsigned int nb) const |
| RealPoint | findIntersection (const RealPoint &inner, const RealPoint &outer, const double epsilon) const |
| RealPoint | closestPointWithWitnesses (const RealPoint &p, const RealPoint &left, const RealPoint &right, const int step) const |
| void | selfDisplay (std::ostream &out) const |
| bool | isValid () const |
Private Member Functions | |
| template<typename T > | |
| bool | isAlmostEqual (T x, T y) const |
Private Attributes | |
| RealPoint | myCenter |
| double | myA |
| double | myB |
Aim: Model of the concept StarShaped represents an astroid.
Description of template class 'Astroid2D'
Definition at line 61 of file Astroid2D.h.
| Space::RealPoint DGtal::Astroid2D< TSpace >::RealPoint |
Definition at line 67 of file Astroid2D.h.
| Space::RealVector DGtal::Astroid2D< TSpace >::RealVector |
Definition at line 68 of file Astroid2D.h.
| TSpace DGtal::Astroid2D< TSpace >::Space |
Definition at line 66 of file Astroid2D.h.
|
delete |
Constructor. Forbidden by default.
| DGtal::Astroid2D< TSpace >::Astroid2D | ( | const double | x0, |
| const double | y0, | ||
| const double | a, | ||
| const double | b ) |
Constructor. The absolute value of radii parameters is used.
| x0 | the x-coordinate of the astroid center. |
| y0 | the y-coordinate of the astroid center. |
| a | coefficient along x-axis |
| b | coefficient along y-axis |
| DGtal::Astroid2D< TSpace >::Astroid2D | ( | const RealPoint & | aPoint, |
| const double | a, | ||
| const double | b ) |
Constructor. The absolute value of radii parameters is used.
| aPoint | the astroid center |
| a | coefficient along x-axis |
| b | coefficient along y-axis |
| DGtal::Astroid2D< TSpace >::Astroid2D | ( | const Astroid2D< TSpace > & | other | ) |
Copy constructor.
| other | the object to clone. |
|
default |
Destructor.
|
inlinevirtual |
Implements DGtal::StarShaped2D< TSpace >.
Definition at line 139 of file Astroid2D.h.
References DGtal::Astroid2D< TSpace >::myCenter.
Referenced by TEST_CASE(), and TEST_CASE().
|
inlinevirtual |
Implements DGtal::StarShaped2D< TSpace >.
Definition at line 122 of file Astroid2D.h.
References DGtal::Astroid2D< TSpace >::myA, DGtal::Astroid2D< TSpace >::myB, and DGtal::Astroid2D< TSpace >::myCenter.
Referenced by digitize(), laplacian(), TEST_CASE(), TEST_CASE(), and testDigitization().
|
inlinevirtual |
Implements DGtal::StarShaped2D< TSpace >.
Definition at line 131 of file Astroid2D.h.
References DGtal::Astroid2D< TSpace >::myA, DGtal::Astroid2D< TSpace >::myB, and DGtal::Astroid2D< TSpace >::myCenter.
Referenced by digitize(), laplacian(), TEST_CASE(), TEST_CASE(), and testDigitization().
|
inlineprivate |
Equality test using relative tolerance.
Definition at line 229 of file Astroid2D.h.
| bool DGtal::Astroid2D< TSpace >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
|
inlinevirtual |
Modify the shape center
| newCenter | the new center position |
Implements DGtal::StarShaped2D< TSpace >.
Definition at line 149 of file Astroid2D.h.
References DGtal::Astroid2D< TSpace >::myCenter.
|
delete |
Assignment.
| other | the object to copy. |
|
virtual |
| p | any point in the plane. |
Implements DGtal::StarShaped2D< TSpace >.
Referenced by TEST_CASE().
| void DGtal::Astroid2D< TSpace >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
| out | the output stream where the object is written. |
|
virtual |
| t | any angle between 0 and 2*Pi. |
Implements DGtal::StarShaped2D< TSpace >.
Referenced by TEST_CASE().
|
virtual |
| t | any angle between 0 and 2*Pi. |
Implements DGtal::StarShaped2D< TSpace >.
Referenced by TEST_CASE().
|
virtual |
| t | any angle between 0 and 2*Pi. |
Implements DGtal::StarShaped2D< TSpace >.
|
private |
Coefficient along x-axis
Definition at line 198 of file Astroid2D.h.
Referenced by DGtal::Astroid2D< TSpace >::getLowerBound(), and DGtal::Astroid2D< TSpace >::getUpperBound().
|
private |
Coefficient along y-axis
Definition at line 203 of file Astroid2D.h.
Referenced by DGtal::Astroid2D< TSpace >::getLowerBound(), and DGtal::Astroid2D< TSpace >::getUpperBound().
|
private |
Center of the circle.
Definition at line 193 of file Astroid2D.h.
Referenced by DGtal::Astroid2D< TSpace >::center(), DGtal::Astroid2D< TSpace >::getLowerBound(), DGtal::Astroid2D< TSpace >::getUpperBound(), and DGtal::Astroid2D< TSpace >::moveTo().