a 3d unit (vector)
More...
|
| constexpr n3 | operator- () const |
| constexpr bool | is_valid () const |
| | returns false if the length isn't 1
|
| bool | operator== (const n3 &rhs)=delete |
| constexpr | n3 (float a, float b, float c) |
| | asserts that the length is 1
|
| constexpr | n3 (const v3 &v) |
| | asserts that the length is 1
|
| | v3 (float a) |
| | v3 (const std::tuple< float, float, float > &a) |
| constexpr | v3 (float ax, float ay, float az) |
| | v3 (const float *a) |
| | assumes the given pointer is a array of 3 floats
|
| float | dot (const v3 &rhs) const |
| v3 | cross (const v3 &u) const |
| void | operator+= (const v3 &rhs) |
| void | operator-= (const v3 &rhs) |
| void | operator/= (float rhs) |
| void | operator*= (float rhs) |
| v3 | operator- () const |
| float * | get_data_ptr () |
| | Returns an array to the data.
|
| const float * | get_data_ptr () const |
| | Returns an array to the data.
|
| constexpr float | get_length_squared () const |
| | Returns the squared length of the vector.
|
| float | get_length () const |
| | Returns the length of the vector.
|
| bool | normalize () |
| | Changes the length to 1.
|
| std::optional< n3 > | get_normalized () const |
| | Returns a unit vector.
|
| std::optional< n3 > | cross_norm (const v3 &u) const |
| bool | operator== (const v3 &rhs)=delete |
|
| static v3 | from_to (const v3 &from, const v3 &to) |
| | creates a vector going from from to to
|
| static v3 | from_localspace_rui (const Q &rotation, float right, float up, float in) |
| | Creates a vector in quaterion local space from Right Up In.
|
| float | x |
| float | y |
| float | z |
a 3d unit (vector)
Definition at line 93 of file vec3.h.
◆ n3() [1/2]
| eu::n3::n3 |
( |
float | a, |
|
|
float | b, |
|
|
float | c ) |
|
inlineconstexpr |
asserts that the length is 1
Definition at line 110 of file vec3.h.
◆ n3() [2/2]
| eu::n3::n3 |
( |
const v3 & | v | ) |
|
|
inlineexplicitconstexpr |
asserts that the length is 1
Definition at line 117 of file vec3.h.
◆ is_valid()
| bool eu::n3::is_valid |
( |
| ) |
const |
|
inlinenodiscardconstexpr |
returns false if the length isn't 1
Definition at line 102 of file vec3.h.
◆ operator-()
| n3 eu::n3::operator- |
( |
| ) |
const |
|
inlineconstexpr |
◆ operator==()
| bool eu::n3::operator== |
( |
const n3 & | rhs | ) |
|
|
delete |
The documentation for this struct was generated from the following file: