|
DGtal 1.4.2
|
Aim: Represents a straight line uniquely defined by two 2D points and that is able to return for any given 2D point its signed distance to itself. More...
#include <DGtal/shapes/fromPoints/StraightLineFrom2Points.h>
Public Types | |
| typedef TPoint::Coordinate | Coordinate |
| typedef Coordinate | Distance |
| typedef TPoint | Point |
| typedef TPoint | Vector |
Public Member Functions | |
| StraightLineFrom2Points () | |
| StraightLineFrom2Points (const Point &aFirstPoint, const Point &aSecondPoint) | |
| void | init (const Point &aFirstPoint, const Point &aSecondPoint) |
| StraightLineFrom2Points (const StraightLineFrom2Points &other) | |
| StraightLineFrom2Points & | operator= (const StraightLineFrom2Points &other) |
| ~StraightLineFrom2Points () | |
| void | selfDisplay (std::ostream &out) const |
| bool | isValid () const |
| Distance | signedDistance (const Point &aP) const |
| const Point & | p () const |
| const Point & | q () const |
| std::string | className () const |
Private Attributes | |
| Point | myP |
| Point | myQ |
Aim: Represents a straight line uniquely defined by two 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 68 of file StraightLineFrom2Points.h.
| TPoint::Coordinate DGtal::StraightLineFrom2Points< TPoint >::Coordinate |
Definition at line 74 of file StraightLineFrom2Points.h.
| Coordinate DGtal::StraightLineFrom2Points< TPoint >::Distance |
Definition at line 75 of file StraightLineFrom2Points.h.
| TPoint DGtal::StraightLineFrom2Points< TPoint >::Point |
Definition at line 76 of file StraightLineFrom2Points.h.
| TPoint DGtal::StraightLineFrom2Points< TPoint >::Vector |
Definition at line 77 of file StraightLineFrom2Points.h.
| DGtal::StraightLineFrom2Points< TPoint >::StraightLineFrom2Points | ( | ) |
Default constructor.
| DGtal::StraightLineFrom2Points< TPoint >::StraightLineFrom2Points | ( | const Point & | aFirstPoint, |
| const Point & | aSecondPoint ) |
Constructor.
| aFirstPoint | a point |
| aSecondPoint | another point |
| DGtal::StraightLineFrom2Points< TPoint >::StraightLineFrom2Points | ( | const StraightLineFrom2Points< TPoint > & | other | ) |
Copy constructor.
| other | the object to clone. |
| DGtal::StraightLineFrom2Points< TPoint >::~StraightLineFrom2Points | ( | ) |
Destructor. Does nothing
| std::string DGtal::StraightLineFrom2Points< TPoint >::className | ( | ) | const |
Default drawing style object.
| void DGtal::StraightLineFrom2Points< TPoint >::init | ( | const Point & | aFirstPoint, |
| const Point & | aSecondPoint ) |
Init.
| aFirstPoint | a point |
| aSecondPoint | another point |
| bool DGtal::StraightLineFrom2Points< TPoint >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
| StraightLineFrom2Points & DGtal::StraightLineFrom2Points< TPoint >::operator= | ( | const StraightLineFrom2Points< TPoint > & | other | ) |
Assignment.
| other | the object to copy. |
|
inline |
Definition at line 146 of file StraightLineFrom2Points.h.
References DGtal::StraightLineFrom2Points< TPoint >::myP.
|
inline |
Definition at line 154 of file StraightLineFrom2Points.h.
References DGtal::StraightLineFrom2Points< TPoint >::myQ.
| void DGtal::StraightLineFrom2Points< 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::StraightLineFrom2Points< TPoint >::signedDistance | ( | const Point & | aP | ) | const |
Computes the signed distance of aP to the straight line
| aP | the point to be tested. |
|
private |
First point through which the straight line passes
Definition at line 179 of file StraightLineFrom2Points.h.
Referenced by DGtal::StraightLineFrom2Points< TPoint >::p().
|
private |
Second point through which the straight line passes
Definition at line 183 of file StraightLineFrom2Points.h.
Referenced by DGtal::StraightLineFrom2Points< TPoint >::q().