|
constexpr | Vector3 () |
| Initializes a new Vector3 with all components to their default value.
|
|
constexpr | Vector3 (T x_value, T y_value, T z_value) noexcept |
| Initializes a new Vector3 with components set to the given values.
|
|
constexpr | Vector3 (const Vector3 &other) |
|
constexpr | Vector3 (Vector3 &&other) noexcept |
|
constexpr Vector3 & | operator= (const Vector3 &other) |
|
constexpr Vector3 & | operator= (Vector3 &&other) noexcept |
|
template<typename To > |
constexpr Vector3< To > | castTo () const noexcept |
| Casts all components of the Vector3 to the type To.
|
|
constexpr | Vector (std::array< std::reference_wrapper< T >, N > values) |
| Initializes a new Vector.
|
|
constexpr bool | operator== (const Vector &other) const noexcept |
| Compares two Vector for equality.
|
|
constexpr bool | operator!= (const Vector &other) const noexcept |
| Compares two Vector for inequality.
|
|
constexpr Vector3< T > | operator+ (const Vector3< T > &other) const noexcept |
| Adds two Vector.
|
|
constexpr Vector3< T > | operator- (const Vector3< T > &other) const noexcept |
| Subtracts two Vector.
|
|
constexpr Vector3< T > | operator- () const noexcept |
| Negates all components of the current Vector.
|
|
constexpr Vector3< T > | operator* (const Vector3< T > &other) const noexcept |
| Multiplies two Vector.
|
|
constexpr Vector3< T > | operator* (const T &value) const noexcept |
| Multiplies a Vector by a value of type T.
|
|
constexpr Vector3< T > | operator/ (const Vector3< T > &other) const noexcept |
| Divides two Vector.
|
|
constexpr Vector3< T > | operator/ (const T &value) const noexcept |
| Divides a Vector by a value of type T.
|
|
constexpr Vector3< T > & | operator+= (const Vector &other) noexcept |
| Adds the value of other to the current vector.
|
|
constexpr Vector3< T > & | operator-= (const Vector &other) noexcept |
| Subtracts the value of other to the current vector.
|
|
constexpr Vector3< T > & | operator*= (const Vector &other) noexcept |
| Multiplies the value of other to the current vector.
|
|
constexpr Vector3< T > & | operator/= (const T &value) noexcept |
| Divides the value of other from the current vector.
|
|
constexpr T | norm () const noexcept |
| Computes the norm of the Vector. (||v|| = sqrt(v1^2 + v2^2 + ... + vn^2))
|
|
constexpr Vector3< T > | normalized () const noexcept |
| Gets the normalized Vector. (v / ||v||)
|
|
constexpr T | dot (const Vector3< T > &other) const noexcept |
| Computes the dot product between the current Vector and other .
|
|
template<typename T>
class spark::math::Vector3< T >
A vector with three components.
- Template Parameters
-
T | The type of three components. |