#include <vector2D.h>
Public Member Functions | |
| Vector2D () | |
| The default constructor initializes to (0, 0). | |
| Vector2D (double x, double y) | |
| This constructor explicitly sets the 2D coordinates. | |
| Vector2D (double x, double y, double alpha) | |
| This constructor explicitly sets 2D homogeneous coordinates. | |
| Vector2D (const Vector2D &vec) | |
| The copy constructor deep copies its argument. | |
| ~Vector2D () | |
| The destructor destroys the Vector2D instance. | |
| void | setValue (double x, double y) |
| This member function explicitly sets the sets coordinates of the Vector2D instance. | |
| void | setValue (double x, double y, double alpha) |
| This constructor explicitly sets 2D homogeneous coordinates. | |
| double & | x () |
| This member function returns the X component of the Vector2D by reference. | |
| double | x () const |
| This member function returns the X component of the Vector2D by value. | |
| double & | y () |
| This member function returns the Y component of the Vector2D by value. | |
| double | y () const |
| This member function returns the Y component of the Vector2D by value. | |
| Vector2D & | operator= (const Vector2D &vec) |
| The assignment operator deep copies its argument. | |
| Vector2D & | operator *= (double scalar) |
| This operator multiplies each component of the Vector2D instance by a scalar. | |
| Vector2D & | operator/= (double scalar) |
| This operator divides each component of the Vector2D instance by a scalar. | |
| Vector2D & | operator+= (const Vector2D &vec) |
| This operator adds a scalar to each component of the Vector2D instance. | |
| Vector2D & | operator-= (const Vector2D &vec) |
| This operator subtracts a scalar from each component of the Vector2D instance. | |
| Vector2D | operator- () |
| This operator returns a Vector2D equal to *this, but with each element negated. | |
Definition at line 28 of file vector2D.h.
| dlr::numeric::Vector2D::Vector2D | ( | ) | [inline] |
The default constructor initializes to (0, 0).
Definition at line 34 of file vector2D.h.
Referenced by operator-().
| dlr::numeric::Vector2D::Vector2D | ( | double | x, | |
| double | y | |||
| ) | [inline] |
| dlr::numeric::Vector2D::Vector2D | ( | double | x, | |
| double | y, | |||
| double | alpha | |||
| ) | [inline] |
This constructor explicitly sets 2D homogeneous coordinates.
The equivalent 2D coordinates are (x/alpha, y/alpha).
| x | The first component of the Vector2D. | |
| y | The second component of the Vector2D. | |
| alpha | The projective scale parameter. |
Definition at line 59 of file vector2D.h.
| dlr::numeric::Vector2D::Vector2D | ( | const Vector2D & | vec | ) | [inline] |
The copy constructor deep copies its argument.
| other | This argument is the Vector2D instance to be copied. |
Definition at line 69 of file vector2D.h.
| dlr::numeric::Vector2D::~Vector2D | ( | ) | [inline] |
| void dlr::numeric::Vector2D::setValue | ( | double | x, | |
| double | y | |||
| ) | [inline] |
This member function explicitly sets the sets coordinates of the Vector2D instance.
Definition at line 88 of file vector2D.h.
Referenced by operator=(), and dlr::numeric::operator>>().
| void dlr::numeric::Vector2D::setValue | ( | double | x, | |
| double | y, | |||
| double | alpha | |||
| ) | [inline] |
This constructor explicitly sets 2D homogeneous coordinates.
The equivalent 2D coordinates are (x/alpha, y/alpha).
| x | The first component of the Vector2D. | |
| y | The second component of the Vector2D. | |
| alpha | The projective scale parameter. |
Definition at line 103 of file vector2D.h.
| double& dlr::numeric::Vector2D::x | ( | ) | [inline] |
This member function returns the X component of the Vector2D by reference.
Definition at line 114 of file vector2D.h.
Referenced by dlr::numeric::AmanatidesWoo2D< ARRAY2D >::AmanatidesWoo2D(), dlr::numeric::bilaterate(), dlr::numeric::dot(), dlr::numeric::magnitudeSquared(), dlr::numeric::operator *(), dlr::numeric::Transform2D::operator *(), dlr::numeric::operator+(), dlr::numeric::operator-(), dlr::numeric::operator/(), dlr::numeric::operator<<(), and dlr::numeric::operator==().
| double dlr::numeric::Vector2D::x | ( | ) | const [inline] |
This member function returns the X component of the Vector2D by value.
Definition at line 123 of file vector2D.h.
| double& dlr::numeric::Vector2D::y | ( | ) | [inline] |
This member function returns the Y component of the Vector2D by value.
Definition at line 132 of file vector2D.h.
Referenced by dlr::numeric::AmanatidesWoo2D< ARRAY2D >::AmanatidesWoo2D(), dlr::numeric::bilaterate(), dlr::numeric::dot(), dlr::numeric::magnitudeSquared(), dlr::numeric::operator *(), dlr::numeric::Transform2D::operator *(), dlr::numeric::operator+(), dlr::numeric::operator-(), dlr::numeric::operator/(), dlr::numeric::operator<<(), and dlr::numeric::operator==().
| double dlr::numeric::Vector2D::y | ( | ) | const [inline] |
This member function returns the Y component of the Vector2D by value.
Definition at line 141 of file vector2D.h.
The assignment operator deep copies its argument.
| other | This argument is the Vector2D instance to be copied. |
Definition at line 153 of file vector2D.h.
References m_x, m_y, and setValue().
| Vector2D& dlr::numeric::Vector2D::operator *= | ( | double | scalar | ) | [inline] |
This operator multiplies each component of the Vector2D instance by a scalar.
| scalar | This argument is the scalar by which to multiply. |
Definition at line 167 of file vector2D.h.
| Vector2D& dlr::numeric::Vector2D::operator/= | ( | double | scalar | ) | [inline] |
This operator divides each component of the Vector2D instance by a scalar.
| scalar | This argument is the scalar by which to divide. |
Definition at line 181 of file vector2D.h.
References DLR_THROW.
This operator adds a scalar to each component of the Vector2D instance.
| scalar | This argument is the scalar to be added. |
Definition at line 199 of file vector2D.h.
This operator subtracts a scalar from each component of the Vector2D instance.
| scalar | This argument is the scalar to be subtracted. |
Definition at line 213 of file vector2D.h.
| Vector2D dlr::numeric::Vector2D::operator- | ( | ) | [inline] |
This operator returns a Vector2D equal to *this, but with each element negated.
Definition at line 224 of file vector2D.h.
References Vector2D().
1.5.2