Template Struct tQuat#
Defined in File Quaternion.h
Struct Documentation#
-
template<typename T>
struct tQuat# Public Types
Public Functions
-
constexpr ~tQuat() = default#
Destructor.
-
constexpr tQuat() noexcept = default#
Constructor.
-
template<typename U>
explicit constexpr tQuat(const tQuat<U> &q) noexcept# Explicit conversion constructor.
-
constexpr tQuat(const Vec<3, T> &u, const Vec<3, T> &v)#
Create a quaternion from two normalized axis.
-
explicit constexpr tQuat(const Vec<3, T> &eulerAnglesInRadians)#
Build a quaternion from euler angles (pitch, yaw, roll).
- Parameters:
eulerAnglesInRadians – Euler angles (pitch, yaw, roll).
-
constexpr const T &w() const noexcept#
Retrieve the w component of the quaternion.
- Returns:
w component.
-
constexpr const T &x() const noexcept#
Retrieve the x component of the quaternion.
- Returns:
x component.
-
constexpr const T &y() const noexcept#
Retrieve the y component of the quaternion.
- Returns:
y component.
-
constexpr const T &z() const noexcept#
Retrieve the z component of the quaternion.
- Returns:
z component.
-
constexpr T &operator[](usize i)#
Returns a reference to the element at specified location i.
Note
No bounds checking is performed.
- Parameters:
i – Position of the element to return.
- Returns:
Reference to the requested element.
-
constexpr const T &operator[](usize i) const#
Returns a constant reference to the element at specified location i.
Note
No bounds checking is performed.
- Parameters:
i – Position of the element to return.
- Returns:
Constant reference to the requested element.
-
constexpr T &at(usize i)#
Returns a reference to the element at specified location i, with bounds checking via asserts.
- Parameters:
i – Position of the element to return.
- Returns:
Reference to the requested element.
-
constexpr const T &at(usize i) const#
Returns a constant reference to the element at specified location i, with bounds checking via asserts.
- Parameters:
i – Position of the element to return.
- Returns:
Constant reference to the requested element.
-
constexpr ~tQuat() = default#