DGtal 1.4.0
|
Aim: Represents a circle uniquely defined by three 2D points and that is able to return for any given 2D point its signed distance to itself. More...
#include <DGtal/shapes/fromPoints/CircleFrom3Points.h>
Public Types | |
typedef TPoint::Coordinate | Coordinate |
typedef Coordinate | Distance |
typedef TPoint | Point |
typedef TPoint | Vector |
Public Member Functions | |
CircleFrom3Points () | |
CircleFrom3Points (const Point &aFirstPoint, const Point &aSecondPoint, const Point &aThirdPoint) | |
void | init (const Point &aFirstPoint, const Point &aSecondPoint, const Point &aThirdPoint) |
CircleFrom3Points (const CircleFrom3Points &other) | |
CircleFrom3Points & | operator= (const CircleFrom3Points &other) |
~CircleFrom3Points () | |
Distance | signedDistance (const Point &aP) const |
bool | isValid () const |
void | getParameters (double &cx, double &cy, double &rr) const |
double | getCurvature () const |
const Point & | p () const |
const Point & | q () const |
const Point & | r () const |
void | selfDisplay (std::ostream &out) const |
std::string | className () const |
Private Member Functions | |
BOOST_STATIC_ASSERT ((TPoint::dimension==2)) | |
Private Attributes | |
Point | myP |
Point | myQ |
Point | myR |
Aim: Represents a circle uniquely defined by three 2D points and that is able to return for any given 2D point its signed distance to itself.
TPoint | a type of points. |
Definition at line 66 of file CircleFrom3Points.h.
typedef TPoint::Coordinate DGtal::CircleFrom3Points< TPoint >::Coordinate |
Definition at line 74 of file CircleFrom3Points.h.
typedef Coordinate DGtal::CircleFrom3Points< TPoint >::Distance |
Definition at line 75 of file CircleFrom3Points.h.
typedef TPoint DGtal::CircleFrom3Points< TPoint >::Point |
Definition at line 76 of file CircleFrom3Points.h.
typedef TPoint DGtal::CircleFrom3Points< TPoint >::Vector |
Definition at line 77 of file CircleFrom3Points.h.
DGtal::CircleFrom3Points< TPoint >::CircleFrom3Points | ( | ) |
Default constructor.
DGtal::CircleFrom3Points< TPoint >::CircleFrom3Points | ( | const Point & | aFirstPoint, |
const Point & | aSecondPoint, | ||
const Point & | aThirdPoint ) |
Constructor.
aFirstPoint | a point |
aSecondPoint | a second point |
aThirdPoint | a third point |
DGtal::CircleFrom3Points< TPoint >::CircleFrom3Points | ( | const CircleFrom3Points< TPoint > & | other | ) |
Copy constructor.
other | the object to clone. |
DGtal::CircleFrom3Points< TPoint >::~CircleFrom3Points | ( | ) |
Destructor. Does nothing
|
private |
std::string DGtal::CircleFrom3Points< TPoint >::className | ( | ) | const |
double DGtal::CircleFrom3Points< TPoint >::getCurvature | ( | ) | const |
void DGtal::CircleFrom3Points< TPoint >::getParameters | ( | double & | cx, |
double & | cy, | ||
double & | rr ) const |
Computes the parameters of the circle
cx | returned x-coordinate of the circle |
cy | returned y-coordinate of the circle |
rr | returned radius of the circle |
void DGtal::CircleFrom3Points< TPoint >::init | ( | const Point & | aFirstPoint, |
const Point & | aSecondPoint, | ||
const Point & | aThirdPoint ) |
Init.
aFirstPoint | a point |
aSecondPoint | a second point |
aThirdPoint | a third point |
bool DGtal::CircleFrom3Points< TPoint >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
CircleFrom3Points & DGtal::CircleFrom3Points< TPoint >::operator= | ( | const CircleFrom3Points< TPoint > & | other | ) |
Assignment.
other | the object to copy. |
|
inline |
Definition at line 157 of file CircleFrom3Points.h.
References DGtal::CircleFrom3Points< TPoint >::myP.
|
inline |
Definition at line 165 of file CircleFrom3Points.h.
References DGtal::CircleFrom3Points< TPoint >::myQ.
|
inline |
Definition at line 173 of file CircleFrom3Points.h.
References DGtal::CircleFrom3Points< TPoint >::myR.
void DGtal::CircleFrom3Points< 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::CircleFrom3Points< TPoint >::signedDistance | ( | const Point & | aP | ) | const |
Computes the signed distance of aP to the circle
aP | the point to be tested. |
|
private |
First point through which the circle passes
Definition at line 201 of file CircleFrom3Points.h.
Referenced by DGtal::CircleFrom3Points< TPoint >::p().
|
private |
Second point through which the circle passes
Definition at line 205 of file CircleFrom3Points.h.
Referenced by DGtal::CircleFrom3Points< TPoint >::q().
|
private |
Third point through which the circle passes
Definition at line 209 of file CircleFrom3Points.h.
Referenced by DGtal::CircleFrom3Points< TPoint >::r().