lv_gltf_math.hpp
API reference for lv_gltf_math.hpp
GLTF math utilities and helper functions.
Summary
Functions
lv_gltf_math_look_at_rh
fastgltf::math::fmat4x4 lv_gltf_math_look_at_rh(const fastgltf::math::fvec3 &eye, const fastgltf::math::fvec3 ¢er, const fastgltf::math::fvec3 &up) noexcept| Name | Type |
|---|---|
eye | const fastgltf::math::fvec3 & |
center | const fastgltf::math::fvec3 & |
up | const fastgltf::math::fvec3 & |
lv_gltf_math_perspective_rh
fastgltf::math::fmat4x4 lv_gltf_math_perspective_rh(float fov, float ratio, float z_near, float z_far) noexcept| Name | Type |
|---|---|
fov | float |
ratio | float |
z_near | float |
z_far | float |
lv_gltf_math_euler_to_quaternion
Build a rotation quaternion from Euler angles given in radians. The angles are the rotations around the X, Y and Z axis, in that order.
template <typename T>
fastgltf::math::quat< T > lv_gltf_math_euler_to_quaternion(T x, T y, T z)| Name | Type |
|---|---|
x | T |
y | T |
z | T |
Template Parameters:
| Name | Type | Description |
|---|---|---|
T | typename |
lv_gltf_math_quaternion_to_euler
Decompose a rotation quaternion into Euler angles in radians. The result holds the rotations around the X, Y and Z axis, in that order, so that it can be passed back to lv_gltf_math_euler_to_quaternion().
template <typename T>
fastgltf::math::vec< T, 3 > lv_gltf_math_quaternion_to_euler(fastgltf::math::quat< T > q)| Name | Type |
|---|---|
q | fastgltf::math::quat< T > |
Template Parameters:
| Name | Type | Description |
|---|---|---|
T | typename |
Macros
M_PI
#define M_PI 3.14159265358979323846264338327950288Dependencies
lvgl_public.hmath.hpp
Last updated on