|
DGtal 2.0.0
|
Aim: Model of the concept StarShaped represents any ellipse in the plane. More...
#include <DGtal/shapes/parametric/Ellipse2D.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 | |
| Ellipse2D ()=delete | |
| Ellipse2D (const double x0, const double y0, const double a0, const double a1, const double theta) | |
| Ellipse2D (const RealPoint &aPoint, const double a0, const double a1, const double theta) | |
| Ellipse2D (const Ellipse2D &other) | |
| Ellipse2D & | operator= (const Ellipse2D &other)=delete |
| ~Ellipse2D ()=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 | myAxis1 |
| double | myAxis2 |
| double | myTheta |
Aim: Model of the concept StarShaped represents any ellipse in the plane.
Description of template class 'Ellipse2D'
NB: A backport from ImaGene.
Definition at line 64 of file Ellipse2D.h.
| typedef Space::RealPoint DGtal::Ellipse2D< TSpace >::RealPoint |
Definition at line 70 of file Ellipse2D.h.
| typedef Space::RealVector DGtal::Ellipse2D< TSpace >::RealVector |
Definition at line 71 of file Ellipse2D.h.
| typedef TSpace DGtal::Ellipse2D< TSpace >::Space |
Definition at line 69 of file Ellipse2D.h.
|
delete |
Constructor. Forbidden by default.
Referenced by Ellipse2D(), and operator=().
| DGtal::Ellipse2D< TSpace >::Ellipse2D | ( | const double | x0, |
| const double | y0, | ||
| const double | a0, | ||
| const double | a1, | ||
| const double | theta ) |
Constructor.
| x0 | the x-coordinate of the circle center. |
| y0 | the y-coordinate of the circle center. |
| a0 | the half big axis of the ellipse. |
| a1 | the half small axis of the ellipse. |
| theta | the orientation of the ellipse. |
| DGtal::Ellipse2D< TSpace >::Ellipse2D | ( | const RealPoint & | aPoint, |
| const double | a0, | ||
| const double | a1, | ||
| const double | theta ) |
Constructor.
| aPoint | the circle center. |
| a0 | the half big axis of the ellipse. |
| a1 | the half small axis of the ellipse. |
| theta | the orientation of the ellipse. |
References aPoint.
| DGtal::Ellipse2D< TSpace >::Ellipse2D | ( | const Ellipse2D< TSpace > & | other | ) |
|
default |
Destructor.
|
inlinevirtual |
Implements DGtal::StarShaped2D< TSpace >.
Definition at line 143 of file Ellipse2D.h.
References myCenter.
|
inlinevirtual |
Implements DGtal::StarShaped2D< TSpace >.
Definition at line 126 of file Ellipse2D.h.
|
inlinevirtual |
Implements DGtal::StarShaped2D< TSpace >.
Definition at line 135 of file Ellipse2D.h.
|
inlineprivate |
Equality test using relative tolerance.
Definition at line 238 of file Ellipse2D.h.
References x().
| bool DGtal::Ellipse2D< 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 153 of file Ellipse2D.h.
References myCenter.
|
delete |
Assignment.
| other | the object to copy. |
References Ellipse2D().
|
virtual |
| p | any point in the plane. |
Implements DGtal::StarShaped2D< TSpace >.
| void DGtal::Ellipse2D< 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 isAlmostEqual().
|
virtual |
| t | any angle between 0 and 2*Pi. |
Implements DGtal::StarShaped2D< TSpace >.
|
virtual |
| t | any angle between 0 and 2*Pi. |
Implements DGtal::StarShaped2D< TSpace >.
|
private |
First axis.
Definition at line 202 of file Ellipse2D.h.
Referenced by getLowerBound(), and getUpperBound().
|
private |
Second axis.
Definition at line 208 of file Ellipse2D.h.
|
private |
Center of the circle.
Definition at line 197 of file Ellipse2D.h.
Referenced by center(), getLowerBound(), getUpperBound(), and moveTo().
|
private |
Orientation (radian).
Definition at line 213 of file Ellipse2D.h.