|
constexpr | vector3 (vector3 const &) noexcept=default |
|
constexpr | vector3 (vector3 &&) noexcept=default |
|
constexpr vector3 & | operator= (vector3 const &) noexcept=default |
|
constexpr vector3 & | operator= (vector3 &&) noexcept=default |
|
constexpr | vector3 (vector2 const &other) noexcept |
| Construct a vector from a lower dimension vector.
|
|
constexpr | operator vector2 () noexcept |
| Construct a vector from a higher dimension vector.
|
|
constexpr | operator array_type () const noexcept |
| Convert a vector to its array_type-nummeric_array.
|
|
constexpr | vector3 (array_type const &other) noexcept |
| Construct a vector from a array_type-simd.
|
|
constexpr | vector3 () noexcept |
| Construct a empty vector / zero length.
|
|
constexpr | vector3 (float x, float y, float z=0.0f) noexcept |
| Construct a 3D vector from x, y and z elements.
|
|
constexpr float & | x () noexcept |
| Access the x element from the vector.
|
|
constexpr float & | y () noexcept |
| Access the y element from the vector.
|
|
constexpr float & | z () noexcept |
| Access the z element from the vector.
|
|
constexpr float | x () const noexcept |
| Access the x element from the vector.
|
|
constexpr float | y () const noexcept |
| Access the y element from the vector.
|
|
constexpr float | z () const noexcept |
| Access the z element from the vector.
|
|
constexpr vector3 | operator- () const noexcept |
| Mirror this vector.
|
|
constexpr vector3 & | operator+= (vector3 const &rhs) noexcept |
|
constexpr vector3 & | operator-= (vector3 const &rhs) noexcept |
|
constexpr vector3 & | operator*= (float const &rhs) noexcept |
|
constexpr bool | holds_invariant () const noexcept |
| Check if the vector is valid.
|
|
|
constexpr friend vector3 | operator+ (vector3 const &lhs, vector3 const &rhs) noexcept |
| Add two vectors from each other.
|
|
constexpr friend vector3 | operator- (vector3 const &lhs, vector3 const &rhs) noexcept |
| Subtract two vectors from each other.
|
|
constexpr friend vector3 | operator* (vector3 const &lhs, float const &rhs) noexcept |
| Scale the vector by a scaler.
|
|
constexpr friend vector3 | operator* (float const &lhs, vector3 const &rhs) noexcept |
| Scale the vector by a scaler.
|
|
constexpr friend bool | operator== (vector3 const &lhs, vector3 const &rhs) noexcept |
| Compare if two vectors are equal.
|
|
constexpr friend float | squared_hypot (vector3 const &rhs) noexcept |
| Get the squared length of the vector.
|
|
float | hypot (vector3 const &rhs) noexcept |
| Get the length of the vector.
|
|
constexpr friend float | rcp_hypot (vector3 const &rhs) noexcept |
| Get the length of the vector.
|
|
constexpr friend vector3 | normalize (vector3 const &rhs) noexcept |
| Normalize a vector to a unit vector.
|
|
constexpr friend float | dot (vector3 const &lhs, vector3 const &rhs) noexcept |
| Get the dot product between two vectors.
|
|
constexpr friend vector3 | normal (vector3 const &rhs, float angle) noexcept |
| Get the normal on a 3D vector.
|
|
constexpr friend vector3 | cross (vector3 const &lhs, vector3 const &rhs) noexcept |
| Get the cross product between two 3D vectors.
|
|
constexpr vector3 | min (vector3 const &lhs, vector3 const &rhs) noexcept |
| Mix the two vectors and get the lowest value of each element.
|
|
constexpr vector3 | max (vector3 const &lhs, vector3 const &rhs) noexcept |
| Mix the two vectors and get the highest value of each element.
|
|
constexpr vector3 | round (vector3 const &rhs) noexcept |
| Round the elements of the vector toward nearest integer.
|
|
constexpr vector3 | ceil (vector3 const &rhs) noexcept |
| Round the elements of the vector toward upward and to the right.
|
|
constexpr vector3 | floor (vector3 const &rhs) noexcept |
| Round the elements of the vector toward downward and to the left.
|
|
std::string | to_string (vector3 const &rhs) noexcept |
|
std::ostream & | operator<< (std::ostream &lhs, vector3 const &rhs) noexcept |
|
A high-level geometric vector Part of the high-level vector, point, mat and color types.
A vector, for both 2D or 3D is internally represented as a 4D homogeneous vector. Which can be efficiently implemented as a __m128 SSE register.