DGtal
1.5.beta
|
Aim: Represents a circle that passes through a given point and that is thus uniquely defined by two other points. It is able to return for any given point its signed distance to itself. More...
#include <DGtal/shapes/fromPoints/CircleFrom2Points.h>
Public Types | |
typedef TPoint::Coordinate | Coordinate |
typedef Coordinate | Distance |
typedef TPoint | Point |
typedef TPoint | Vector |
Public Member Functions | |
CircleFrom2Points (const Point &aPole) | |
CircleFrom2Points (const Point &aPole, const Point &aFirstPoint, const Point &aSecondPoint) | |
void | init (const Point &aFirstPoint, const Point &aSecondPoint) |
CircleFrom2Points (const CircleFrom2Points &other) | |
CircleFrom2Points & | operator= (const CircleFrom2Points &other) |
~CircleFrom2Points () | |
void | selfDisplay (std::ostream &out) const |
bool | isValid () const |
Distance | signedDistance (const Point &aP) const |
void | getParameters (double &cx, double &cy, double &r) const |
const Point & | pole () const |
const Point & | p () const |
const Point & | q () const |
std::string | className () const |
Private Attributes | |
Point | myPole |
Point | myP |
Point | myQ |
Aim: Represents a circle that passes through a given point and that is thus uniquely defined by two other points. It is able to return for any given point its signed distance to itself.
TPoint | a type of points. |
Definition at line 67 of file CircleFrom2Points.h.
typedef TPoint::Coordinate DGtal::CircleFrom2Points< TPoint >::Coordinate |
Definition at line 73 of file CircleFrom2Points.h.
typedef Coordinate DGtal::CircleFrom2Points< TPoint >::Distance |
Definition at line 74 of file CircleFrom2Points.h.
typedef TPoint DGtal::CircleFrom2Points< TPoint >::Point |
Definition at line 75 of file CircleFrom2Points.h.
typedef TPoint DGtal::CircleFrom2Points< TPoint >::Vector |
Definition at line 76 of file CircleFrom2Points.h.
DGtal::CircleFrom2Points< TPoint >::CircleFrom2Points | ( | const Point & | aPole | ) |
Constructor.
aPole | a point |
DGtal::CircleFrom2Points< TPoint >::CircleFrom2Points | ( | const Point & | aPole, |
const Point & | aFirstPoint, | ||
const Point & | aSecondPoint | ||
) |
Constructor with initialization.
aPole | a point |
aFirstPoint | a point |
aSecondPoint | a second point |
DGtal::CircleFrom2Points< TPoint >::CircleFrom2Points | ( | const CircleFrom2Points< TPoint > & | other | ) |
Copy constructor.
other | the object to clone. |
DGtal::CircleFrom2Points< TPoint >::~CircleFrom2Points | ( | ) |
Destructor. Does nothing
std::string DGtal::CircleFrom2Points< TPoint >::className | ( | ) | const |
Default drawing style object.
void DGtal::CircleFrom2Points< TPoint >::getParameters | ( | double & | cx, |
double & | cy, | ||
double & | r | ||
) | const |
Computes the parameters of the circle
cx | returned x-coordinate of the circle |
cy | returned y-coordinate of the circle |
r | returned radius of the circle |
void DGtal::CircleFrom2Points< TPoint >::init | ( | const Point & | aFirstPoint, |
const Point & | aSecondPoint | ||
) |
Init.
aFirstPoint | a point |
aSecondPoint | a second point |
bool DGtal::CircleFrom2Points< TPoint >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
CircleFrom2Points& DGtal::CircleFrom2Points< TPoint >::operator= | ( | const CircleFrom2Points< TPoint > & | other | ) |
Assignment.
other | the object to copy. |
|
inline |
Definition at line 163 of file CircleFrom2Points.h.
References DGtal::CircleFrom2Points< TPoint >::myP.
|
inline |
Definition at line 155 of file CircleFrom2Points.h.
References DGtal::CircleFrom2Points< TPoint >::myPole.
|
inline |
Definition at line 171 of file CircleFrom2Points.h.
References DGtal::CircleFrom2Points< TPoint >::myQ.
void DGtal::CircleFrom2Points< TPoint >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
Distance DGtal::CircleFrom2Points< TPoint >::signedDistance | ( | const Point & | aP | ) | const |
Computes the signed distance of aP to the circle
aP | the point to be tested. |
|
private |
Second point through which the circle passes
Definition at line 200 of file CircleFrom2Points.h.
Referenced by DGtal::CircleFrom2Points< TPoint >::p().
|
private |
First (and not mutable) point through which the circle passes
Definition at line 196 of file CircleFrom2Points.h.
Referenced by DGtal::CircleFrom2Points< TPoint >::pole().
|
private |
Third point through which the circle passes
Definition at line 204 of file CircleFrom2Points.h.
Referenced by DGtal::CircleFrom2Points< TPoint >::q().