#include <point.h>
Inheritance diagram for fl::Point:

Public Methods | |
| Point () | |
| Point (float x, float y) | |
| template<class T> | Point (const MatrixAbstract< T > &A) |
| Point (std::istream &stream) | |
| Vector< float > | homogenous (float third) const |
| Vector< float > | homogenous (float third, float fourth) const |
| virtual float & | operator() (const int row, const int column) const |
| Element accesss. | |
| virtual float & | operator[] (const int row) const |
| Element access, treating us as a vector. | |
| virtual int | rows () const |
| virtual int | columns () const |
| virtual MatrixAbstract< float > * | duplicate () const |
| Make a new instance of self on the heap, with shallow copy semantics. Used for views. Since this is class sensitive, it must be overridden. | |
| virtual void | resize (const int rows, const int columns=1) |
| We only have one size. This will throw an exception if (rows * columns) != 2. | |
| virtual void | read (std::istream &stream) |
| virtual void | write (std::ostream &stream, bool withName=false) |
| withName is ignored, and no class id is ever written for Points | |
| float | distance (const Point &that) const |
| Euclidean distance between two points. | |
| float | distance () const |
| Euclidean distance from origin. | |
| float | angle (const Point &that) const |
| Determines angle of vector (that - this). | |
| float | angle () const |
| Determines angle of vector from origin to this point. | |
Public Attributes | |
| float | x |
| float | y |
Point uses float values for x and y, so we define the following convention for interpreting the fractional part of a pixel coordinate: The image coordinate system starts in the upper left corner. Positive x goes to the right, and positive y goes down. Integer pixel coordinates (eg: 0, 1.0, 2.0, etc.) refer to the center of the pixel. IE: a pixel begins at -0.5 and ends at 0.5. This convention allows easy conversion between ints and floats that is also geometrically consistent and valid. The only thing it makes more difficult is determining the edges and center of an image, usually one-time calculations.
|
|
|
|
||||||||||||
|
|
|
||||||||||
|
|
|
|
|
|
|
Determines angle of vector from origin to this point.
|
|
|
Determines angle of vector (that - this).
|
|
|
Reimplemented from fl::MatrixAbstract< float >. |
|
|
Euclidean distance from origin.
|
|
|
Euclidean distance between two points.
|
|
|
Make a new instance of self on the heap, with shallow copy semantics. Used for views. Since this is class sensitive, it must be overridden.
Implements fl::MatrixAbstract< float >. |
|
||||||||||||
|
|
|
|
|
|
||||||||||||
|
Element accesss.
Implements fl::MatrixAbstract< float >. |
|
|
Element access, treating us as a vector.
Reimplemented from fl::MatrixAbstract< float >. |
|
|
Reimplemented from fl::MatrixAbstract< float >. Reimplemented in fl::PointInterest, and fl::PointAffine. |
|
||||||||||||
|
We only have one size. This will throw an exception if (rows * columns) != 2.
Implements fl::MatrixAbstract< float >. |
|
|
Reimplemented from fl::MatrixAbstract< float >. |
|
||||||||||||
|
withName is ignored, and no class id is ever written for Points
Reimplemented in fl::PointInterest, and fl::PointAffine. |
|
|
|
|
|
|
1.2.18