#include <vector3D.h>
Public Member Functions | |
| Vector3D () | |
| Default constructor initializes to (0, 0, 0). | |
| Vector3D (double x, double y, double z) | |
| Explicitly sets 3D coordinates. | |
| Vector3D (double x, double y, double z, double alpha) | |
| Explicitly sets 3D homogeneous coordinates. | |
| Vector3D (const Vector3D &source) | |
| Copy constructor. | |
| ~Vector3D () | |
| Destructor. | |
| void | setValue (double x, double y, double z) |
| Explicitly sets 3D coordinates. | |
| void | setValue (double x, double y, double z, double alpha) |
| Explicitly sets 3D homogeneous coordinates. | |
| double & | x () |
| Returns the x component of the vector by reference. | |
| double | x () const |
| Returns the x component of the vector by value. | |
| double & | y () |
| Returns the y component of the vector by reference. | |
| double | y () const |
| Returns the y component of the vector by value. | |
| double & | z () |
| Returns the z component of the vector by reference. | |
| double | z () const |
| Returns the z component of the vector by value. | |
| Vector3D & | operator= (const Vector3D &source) |
| Assignment operator. | |
| Vector3D & | operator *= (double scalar) |
| Multiplies each element by a scalar. | |
| Vector3D & | operator/= (double scalar) |
| Divides each element by a scalar. | |
| Vector3D & | operator+= (const Vector3D &vec) |
| Adds the elements of another Vector3D. | |
| Vector3D & | operator-= (const Vector3D &vec) |
| Subtracts the elements of another Vector3D. | |
| Vector3D | operator- () |
| Returns a Vector3D equal to *this, but with each element negated. | |
Definition at line 28 of file vector3D.h.
| dlr::numeric::Vector3D::Vector3D | ( | ) | [inline] |
Default constructor initializes to (0, 0, 0).
Definition at line 33 of file vector3D.h.
Referenced by operator-().
| dlr::numeric::Vector3D::Vector3D | ( | double | x, | |
| double | y, | |||
| double | z | |||
| ) | [inline] |
Explicitly sets 3D coordinates.
| x | After construction, the vector will have this value as its X coordinate. | |
| y | After construction, the vector will have this value as its Y coordinate. | |
| z | After construction, the vector will have this value as its Z coordinate. |
Definition at line 46 of file vector3D.h.
| dlr::numeric::Vector3D::Vector3D | ( | double | x, | |
| double | y, | |||
| double | z, | |||
| double | alpha | |||
| ) | [inline] |
Explicitly sets 3D homogeneous coordinates.
A 3D homogeneous vector has the form (x, y, z, alpha), and corresponds to the 3D point (x/alpha, y/alpha, z/alpha).
| x | The homogeneous X coordinate. | |
| y | The homogeneous Y coordinate. | |
| z | The homogeneous Z coordinate. | |
| alpha | Scale factor. |
Definition at line 59 of file vector3D.h.
| dlr::numeric::Vector3D::Vector3D | ( | const Vector3D & | source | ) | [inline] |
Copy constructor.
| source | The Vector3D to be copied. |
Definition at line 67 of file vector3D.h.
| dlr::numeric::Vector3D::~Vector3D | ( | ) | [inline] |
| void dlr::numeric::Vector3D::setValue | ( | double | x, | |
| double | y, | |||
| double | z | |||
| ) | [inline] |
Explicitly sets 3D coordinates.
| x | The desired X coordinate. | |
| y | The desired Y coordinate. | |
| z | The desired Z coordinate. |
Definition at line 83 of file vector3D.h.
Referenced by operator=(), and dlr::numeric::operator>>().
| void dlr::numeric::Vector3D::setValue | ( | double | x, | |
| double | y, | |||
| double | z, | |||
| double | alpha | |||
| ) | [inline] |
Explicitly sets 3D homogeneous coordinates.
| x | The homogeneous X coordinate. | |
| y | The homogeneous Y coordinate. | |
| z | The homogeneous Z coordinate. | |
| alpha | Scale factor. |
Definition at line 95 of file vector3D.h.
| double& dlr::numeric::Vector3D::x | ( | ) | [inline] |
Returns the x component of the vector by reference.
Definition at line 105 of file vector3D.h.
Referenced by dlr::numeric::AmanatidesWoo3D< ARRAY3D >::AmanatidesWoo3D(), dlr::numeric::angleAxisToQuaternion(), dlr::numeric::cross(), dlr::numeric::dot(), dlr::numeric::magnitudeSquared(), dlr::numeric::operator *(), dlr::numeric::Transform3DTo2D::operator *(), dlr::numeric::Transform3D::operator *(), dlr::numeric::operator+(), dlr::numeric::operator-(), dlr::numeric::operator/(), dlr::numeric::operator<<(), dlr::numeric::operator==(), dlr::numeric::rollPitchYawToTransform3D(), and dlr::numeric::transform3DToQuaternion().
| double dlr::numeric::Vector3D::x | ( | ) | const [inline] |
Returns the x component of the vector by value.
Definition at line 112 of file vector3D.h.
| double& dlr::numeric::Vector3D::y | ( | ) | [inline] |
Returns the y component of the vector by reference.
Definition at line 119 of file vector3D.h.
Referenced by dlr::numeric::AmanatidesWoo3D< ARRAY3D >::AmanatidesWoo3D(), dlr::numeric::angleAxisToQuaternion(), dlr::numeric::cross(), dlr::numeric::dot(), dlr::numeric::magnitudeSquared(), dlr::numeric::operator *(), dlr::numeric::Transform3DTo2D::operator *(), dlr::numeric::Transform3D::operator *(), dlr::numeric::operator+(), dlr::numeric::operator-(), dlr::numeric::operator/(), dlr::numeric::operator<<(), dlr::numeric::operator==(), dlr::numeric::rollPitchYawToTransform3D(), and dlr::numeric::transform3DToQuaternion().
| double dlr::numeric::Vector3D::y | ( | ) | const [inline] |
Returns the y component of the vector by value.
Definition at line 126 of file vector3D.h.
| double& dlr::numeric::Vector3D::z | ( | ) | [inline] |
Returns the z component of the vector by reference.
Definition at line 133 of file vector3D.h.
Referenced by dlr::numeric::AmanatidesWoo3D< ARRAY3D >::AmanatidesWoo3D(), dlr::numeric::angleAxisToQuaternion(), dlr::numeric::cross(), dlr::numeric::dot(), dlr::numeric::magnitudeSquared(), dlr::numeric::operator *(), dlr::numeric::Transform3DTo2D::operator *(), dlr::numeric::Transform3D::operator *(), dlr::numeric::operator+(), dlr::numeric::operator-(), dlr::numeric::operator/(), dlr::numeric::operator<<(), dlr::numeric::operator==(), dlr::numeric::rollPitchYawToTransform3D(), and dlr::numeric::transform3DToQuaternion().
| double dlr::numeric::Vector3D::z | ( | ) | const [inline] |
Returns the z component of the vector by value.
Definition at line 140 of file vector3D.h.
Assignment operator.
| source | The vector to be copied. |
Definition at line 148 of file vector3D.h.
References m_x, m_y, m_z, and setValue().
| Vector3D& dlr::numeric::Vector3D::operator *= | ( | double | scalar | ) | [inline] |
Multiplies each element by a scalar.
| scalar | X, Y, and Z values will be multiplied by this value. |
Definition at line 158 of file vector3D.h.
| Vector3D& dlr::numeric::Vector3D::operator/= | ( | double | scalar | ) | [inline] |
Divides each element by a scalar.
| scalar | X, Y, and Z values will be divided by this value. |
Definition at line 168 of file vector3D.h.
References DLR_THROW.
| Vector3D dlr::numeric::Vector3D::operator- | ( | ) | [inline] |
Returns a Vector3D equal to *this, but with each element negated.
Definition at line 201 of file vector3D.h.
References Vector3D().
1.5.2