struct
Quat
- Module
- Math
- Header
#include "Math/Quat.h"- Namespace
Mowo
Properties
| Type | Name | Description |
|---|---|---|
float x, y, z, | w |
Constructors
| Signature | Name | Description |
|---|---|---|
Quat() : x(0), y(0), z(0), w(1) | Quat | |
Quat(float x, float y, float z, float w) : x(x), y(y), z(z), w(w) | Quat |
Public functions
| Returns | Name | Description |
|---|---|---|
Quat | Identity | |
Quat | FromAxisAngle | |
Quat | Euler | |
Quat | FromEuler | Engine-wide euler convention: R = Rx(x) * Ry(y) * Rz(z), the same order TransformComponent::GetLocalMatrix bakes into world matrices. |
Vec3 | ToEuler | Exact inverse of FromEuler (Rx * Ry * Rz decomposition). |
float | Length | |
float | LengthSquared | |
Quat | Normalized | |
void | Normalize | |
Quat | Conjugate | |
Quat | Inverse | |
Quat | operator* | |
Vec3 | operator* | |
float | Dot | |
Quat | Slerp |
Function details
Quat
C++
Quat() : x(0), y(0), z(0), w(1)Quat
C++
Quat(float x, float y, float z, float w) : x(x), y(y), z(z), w(w)Identity
C++
static Quat Identity()FromAxisAngle
C++
static Quat FromAxisAngle(const Vec3& axis, float angleRadians)Euler
C++
static Quat Euler(const Vec3& euler)FromEuler
C++
static Quat FromEuler(const Vec3& euler)Engine-wide euler convention: R = Rx(x) * Ry(y) * Rz(z), the same order TransformComponent::GetLocalMatrix bakes into world matrices. Any other composition here would make quat-driven rotations (actors, physics, decomposed imports) disagree with what renders on screen.
ToEuler
C++
Vec3 ToEuler() constExact inverse of FromEuler (Rx * Ry * Rz decomposition). Component mapping matches FRotator: x = Pitch (about X), y = Yaw (about the Y up-axis), z = Roll (about Z). The asin-clamped axis is Y — triples for |yaw| > 90 come back as an equivalent (x±π, mirrored y, z±π) set, which recomposes to the identical rotation in this same order.
Length
C++
float Length() constLengthSquared
C++
float LengthSquared() constNormalized
C++
Quat Normalized() constNormalize
C++
void Normalize()Conjugate
C++
Quat Conjugate() constInverse
C++
Quat Inverse() constoperator*
C++
Quat operator*(const Quat& other) constoperator*
C++
Vec3 operator*(const Vec3& v) constDot
C++
static float Dot(const Quat& a, const Quat& b)Slerp
C++
static Quat Slerp(const Quat& a, const Quat& b, float t)Generated from Math/Quat.h via math.json · Nov 4, 2026Version 1.0.0