A three-dimensional unit vector using doubles.
More...
#include <DoubleUnitVec3D.h>
A three-dimensional unit vector using doubles.
Inherits of the class DoubleVec3D. Each time a value is changed, automatically calls the DoubleVec3D::normalise() method.
◆ DoubleUnitVec3D() [1/4]
| DoubleUnitVec3D::DoubleUnitVec3D |
( |
| ) |
|
Default constructor.
Sets the vector to (1, 0, 0).
◆ DoubleUnitVec3D() [2/4]
| DoubleUnitVec3D::DoubleUnitVec3D |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z, |
|
|
bool |
alreadyNormalised = false |
|
) |
| |
Main constructor.
- Parameters
-
| x | The first coordinate. |
| y | The second coordinate. |
| z | The third coordinate. |
| alreadyNormalised | If true, skips the normalisation when instantiated. |
- See also
- DoubleVec3D::normalise()
◆ DoubleUnitVec3D() [3/4]
| DoubleUnitVec3D::DoubleUnitVec3D |
( |
const DoubleVec3D & |
vec, |
|
|
bool |
alreadyNormalised = false |
|
) |
| |
Converting constructor for DoubleVec3D.
- Parameters
-
| vec | The vector that will be converted. |
| alreadyNormalised | If true, skips the normalisation when instantiated. |
- See also
- DoubleVec3D::normalise()
◆ DoubleUnitVec3D() [4/4]
Copy constructor.
- Parameters
-
| vec | The unit vector that will be copied. |
◆ operator=()
| void DoubleUnitVec3D::operator= |
( |
const DoubleVec3D & |
vec | ) |
|
Assignment operator.
- Parameters
-
| vec | The vector to which this will be equal. |
◆ setVals()
| void DoubleUnitVec3D::setVals |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z |
|
) |
| |
|
virtual |
Setter for all coordinates.
Calls the normalisation method after this one.
- Parameters
-
| x | The first coordinate. |
| y | The second coordinate. |
| z | The third coordinate. |
- See also
- normalise()
Reimplemented from DoubleVec3D.
The documentation for this class was generated from the following files: