5#ifndef SAPPHIRE_MATHS_VECTOR4_GUARD
6#define SAPPHIRE_MATHS_VECTOR4_GUARD
71 constexpr Vec4(T _x, T _y, T _z, T _w)
noexcept;
78 constexpr Vec4(T _scale)
noexcept;
94 template <
typename TIn>
106 template <
typename TIn>
117 template <typename TIn>
128 template <typename TIn>
129 constexpr
Vec4(const
Vec3<TIn>&_other, T _w = T(0)) noexcept;
150 constexpr
bool Equals(const
Vec4& _other, T _epsilon = std::numeric_limits<T>::epsilon()) const noexcept;
160 constexpr
bool operator==(const
Vec4 & _rhs) const noexcept;
169 constexpr
bool operator!=(const
Vec4 & _rhs) const noexcept;
186 const T*
Data() const noexcept;
196 T& operator[](uint32_t _index);
205 const T& operator[](uint32_t _index) const;
242 template <
typename T>
243 std::string ToString(
const Vec4<T>& _v);
264 template <
typename T>
290#include <SA/Maths/Space/Vector4.inl>
Maths module Debug compatibility definition.
Equals method implementation.
Vector 2 Sapphire's class.
Definition Vector2.hpp:41
Vector 3 Sapphire-Maths class.
Definition Vector3.hpp:43
Vector 4 Sapphire-Maths class.
Definition Vector4.hpp:41
constexpr bool IsZero() const noexcept
Whether this vector is a zero vector.
constexpr Vec4(T _x, T _y, T _z, T _w) noexcept
Value constructor.
constexpr Vec4(const Vec2< TIn > &_other, T _z=T(0), T _w=T(0)) noexcept
Value constructor from Vec2.
T * Data() noexcept
Getter of vector data
T w
Vector's W component (stored after xyz).
Definition Vector4.hpp:55
Vec4()=default
Default constructor.
constexpr Vec4(T _scale) noexcept
Scale Value constructor.
constexpr Vec4(const Vec4< TIn > &_other) noexcept
Value constructor from another Vec4 type.
T Type
Type of the Vector.
Definition Vector4.hpp:43
Vec4(Vec4 &&)=default
Default move constructor.
constexpr bool Equals(const Vec4 &_other, T _epsilon=std::numeric_limits< T >::epsilon()) const noexcept
Compare 2 vector.
T y
Vector's Y component (axis value).
Definition Vector4.hpp:49
Vec4(const Vec4 &)=default
Default copy constructor.
T z
Vector's Z component (axis value).
Definition Vector4.hpp:52
T x
Vector's X component (axis value).
Definition Vector4.hpp:46