struct

Quat

Module
Math
Header
#include "Math/Quat.h"
Namespace
Mowo

Properties

TypeNameDescription
float x, y, z,w

Constructors

SignatureNameDescription
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

ReturnsNameDescription
QuatIdentity
QuatFromAxisAngle
QuatEuler
QuatFromEulerEngine-wide euler convention: R = Rx(x) * Ry(y) * Rz(z), the same order TransformComponent::GetLocalMatrix bakes into world matrices.
Vec3ToEulerExact inverse of FromEuler (Rx * Ry * Rz decomposition).
floatLength
floatLengthSquared
QuatNormalized
voidNormalize
QuatConjugate
QuatInverse
Quatoperator*
Vec3operator*
floatDot
QuatSlerp

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() const

Exact 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() const

LengthSquared

C++
float LengthSquared() const

Normalized

C++
Quat Normalized() const

Normalize

C++
void Normalize()

Conjugate

C++
Quat Conjugate() const

Inverse

C++
Quat Inverse() const

operator*

C++
Quat operator*(const Quat& other) const

operator*

C++
Vec3 operator*(const Vec3& v) const

Dot

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