DGtal
1.5.beta
|
Aim: Model of the concept StarShaped represents any flower with k-petals in the plane. More...
#include <DGtal/shapes/parametric/Flower2D.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 | |
Flower2D ()=delete | |
Flower2D (const double x0, const double y0, const double r, const double smallr, const unsigned int k, const double phi) | |
Flower2D (const RealPoint &aPoint, const double r, const double smallr, const unsigned int k, const double phi) | |
Flower2D (const Flower2D &other) | |
Flower2D & | operator= (const Flower2D &other)=delete |
~Flower2D ()=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 Attributes | |
RealPoint | myCenter |
double | myRadius |
double | myVarRadius |
unsigned int | myK |
double | myPhi |
Aim: Model of the concept StarShaped represents any flower with k-petals in the plane.
Description of template class 'Flower2D'
NB: A backport from ImaGene.
Definition at line 64 of file Flower2D.h.
typedef Space::RealPoint DGtal::Flower2D< TSpace >::RealPoint |
Definition at line 70 of file Flower2D.h.
typedef Space::RealVector DGtal::Flower2D< TSpace >::RealVector |
Definition at line 71 of file Flower2D.h.
typedef TSpace DGtal::Flower2D< TSpace >::Space |
Definition at line 69 of file Flower2D.h.
|
delete |
Constructor. Forbidden by default.
DGtal::Flower2D< TSpace >::Flower2D | ( | const double | x0, |
const double | y0, | ||
const double | r, | ||
const double | smallr, | ||
const unsigned int | k, | ||
const double | phi | ||
) |
Constructor.
x0 | the x-coordinate of the flower center. |
y0 | the y-coordinate of the flower center. |
r | the radius of the flower. |
smallr | the variable small radius of the flower. |
k | the number of flower extremeties. |
phi | the phase of the flower (in radian). |
DGtal::Flower2D< TSpace >::Flower2D | ( | const RealPoint & | aPoint, |
const double | r, | ||
const double | smallr, | ||
const unsigned int | k, | ||
const double | phi | ||
) |
Constructor.
aPoint | the flower center. |
r | the radius of the flower. |
smallr | the variable small radius of the flower. |
k | the number of flower extremeties. |
phi | the phase of the flower (in radian). |
DGtal::Flower2D< TSpace >::Flower2D | ( | const Flower2D< TSpace > & | other | ) |
Copy constructor.
other | the object to clone. |
|
default |
Destructor.
|
inlinevirtual |
Implements DGtal::StarShaped2D< TSpace >.
Definition at line 152 of file Flower2D.h.
References DGtal::Flower2D< TSpace >::myCenter.
|
inlinevirtual |
Implements DGtal::StarShaped2D< TSpace >.
Definition at line 135 of file Flower2D.h.
References DGtal::Flower2D< TSpace >::myCenter, DGtal::Flower2D< TSpace >::myRadius, and DGtal::Flower2D< TSpace >::myVarRadius.
|
inlinevirtual |
Implements DGtal::StarShaped2D< TSpace >.
Definition at line 144 of file Flower2D.h.
References DGtal::Flower2D< TSpace >::myCenter, DGtal::Flower2D< TSpace >::myRadius, and DGtal::Flower2D< TSpace >::myVarRadius.
bool DGtal::Flower2D< 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 162 of file Flower2D.h.
References DGtal::Flower2D< TSpace >::myCenter.
|
delete |
Assignment.
other | the object to copy. |
|
virtual |
p | any point in the plane. |
Implements DGtal::StarShaped2D< TSpace >.
void DGtal::Flower2D< 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 >.
|
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 |
Center of the flower.
Definition at line 206 of file Flower2D.h.
Referenced by DGtal::Flower2D< TSpace >::center(), DGtal::Flower2D< TSpace >::getLowerBound(), DGtal::Flower2D< TSpace >::getUpperBound(), and DGtal::Flower2D< TSpace >::moveTo().
|
private |
the number of flower extremeties.
Definition at line 221 of file Flower2D.h.
|
private |
the phase of the flower (in radian).
Definition at line 226 of file Flower2D.h.
|
private |
Radius of the flower.
Definition at line 211 of file Flower2D.h.
Referenced by DGtal::Flower2D< TSpace >::getLowerBound(), and DGtal::Flower2D< TSpace >::getUpperBound().
|
private |
the variable small radius of the flower.
Definition at line 216 of file Flower2D.h.
Referenced by DGtal::Flower2D< TSpace >::getLowerBound(), and DGtal::Flower2D< TSpace >::getUpperBound().