a 3d vector
More...
|
| 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.
|
a 3d vector
Definition at line 26 of file vec3.h.
◆ v3() [1/4]
◆ v3() [2/4]
| eu::v3::v3 |
( |
const std::tuple< float, float, float > & | a | ) |
|
|
explicit |
◆ v3() [3/4]
| eu::v3::v3 |
( |
float | ax, |
|
|
float | ay, |
|
|
float | az ) |
|
inlineconstexpr |
◆ v3() [4/4]
| eu::v3::v3 |
( |
const float * | a | ) |
|
|
explicit |
assumes the given pointer is a array of 3 floats
◆ cross()
| v3 eu::v3::cross |
( |
const v3 & | u | ) |
const |
|
nodiscard |
◆ cross_norm()
| std::optional< n3 > eu::v3::cross_norm |
( |
const v3 & | u | ) |
const |
|
nodiscard |
◆ dot()
| float eu::v3::dot |
( |
const v3 & | rhs | ) |
const |
|
nodiscard |
◆ from_localspace_rui()
| v3 eu::v3::from_localspace_rui |
( |
const Q & | rotation, |
|
|
float | right, |
|
|
float | up, |
|
|
float | in ) |
|
staticnodiscard |
Creates a vector in quaterion local space from Right Up In.
◆ from_to()
| v3 eu::v3::from_to |
( |
const v3 & | from, |
|
|
const v3 & | to ) |
|
static |
creates a vector going from from to to
◆ get_data_ptr() [1/2]
| float * eu::v3::get_data_ptr |
( |
| ) |
|
Returns an array to the data.
non const so it's useful for letting an API tweak the members.
◆ get_data_ptr() [2/2]
| const float * eu::v3::get_data_ptr |
( |
| ) |
const |
|
nodiscard |
Returns an array to the data.
◆ get_length()
| float eu::v3::get_length |
( |
| ) |
const |
|
nodiscard |
Returns the length of the vector.
◆ get_length_squared()
| float eu::v3::get_length_squared |
( |
| ) |
const |
|
inlinenodiscardconstexpr |
Returns the squared length of the vector.
This is useful if you want to compare to zero, sort by length or similar, otherwise see get_length()
Definition at line 66 of file vec3.h.
◆ get_normalized()
| std::optional< n3 > eu::v3::get_normalized |
( |
| ) |
const |
|
nodiscard |
Returns a unit vector.
if the length is zero, nullopt is returend
◆ normalize()
| bool eu::v3::normalize |
( |
| ) |
|
Changes the length to 1.
If the calculated length is zero, the vector is changed to a known value and false is returned
◆ operator*=()
| void eu::v3::operator*= |
( |
float | rhs | ) |
|
◆ operator+=()
| void eu::v3::operator+= |
( |
const v3 & | rhs | ) |
|
◆ operator-()
| v3 eu::v3::operator- |
( |
| ) |
const |
◆ operator-=()
| void eu::v3::operator-= |
( |
const v3 & | rhs | ) |
|
◆ operator/=()
| void eu::v3::operator/= |
( |
float | rhs | ) |
|
◆ operator==()
| bool eu::v3::operator== |
( |
const v3 & | rhs | ) |
|
|
delete |
The documentation for this struct was generated from the following file: