![]() |
V3FIT
|
A vector. More...
#include <vector3d.hpp>
Public Member Functions | |
| vector3d (const double x_, const double y_, const double z_) | |
| vector3d constructor. More... | |
| const double | length () const |
| Length of a vector3d instance. More... | |
| const vector3d | normalize () const |
| Normalize vector3d instance. More... | |
Static Public Member Functions | |
| static const vector3d | cross_product (const vector3d &v1, const vector3d &v2) |
| Takes the cross product of two vectors. More... | |
| static const double | dot_product (const vector3d &v1, const vector3d &v2) |
| Takes the doc product of two vectors. More... | |
Public Attributes | |
| const double | x |
| x component. | |
| const double | y |
| y component. | |
| const double | z |
| z component. | |
A vector.
Class representing a vector in cartesian coordinates.
Definition at line 19 of file vector3d.hpp.
| vector3d::vector3d | ( | const double | x_, |
| const double | y_, | ||
| const double | z_ | ||
| ) |
vector3d constructor.
Constructs a vector at a x, y, z position.
| [in] | x_ | X position. |
| [in] | y_ | Y position. |
| [in] | z_ | Z position. |
Definition at line 21 of file vector3d.cpp.
Takes the cross product of two vectors.
V1 X V2.
| [in] | v1 | First vector. |
| [in] | v2 | Second vector. |
Definition at line 56 of file vector3d.cpp.
Takes the doc product of two vectors.
V1 . V2.
| [in] | v1 | First vector. |
| [in] | v2 | Second vector. |
Definition at line 71 of file vector3d.cpp.
| const double vector3d::length | ( | ) | const |
Length of a vector3d instance.
Length is defined as Sqrt(V.V).
Definition at line 32 of file vector3d.cpp.
| const vector3d vector3d::normalize | ( | ) | const |
Normalize vector3d instance.
The normalized vector is defined as V/|V|.
Definition at line 43 of file vector3d.cpp.
1.8.17