|
LibGame
v0.4.0
The LG Game Engine - Copyright (C) 2024 ETMSoftware
|
6 #ifndef LG_QUATERNIONS_H
7 #define LG_QUATERNIONS_H
9 #define POW2(x) (x * x)
10 #define POW3(x) (x * x * x)
12 #define RAD_TO_DEG 57.295779513
13 #define DEG_TO_RAD 0.017453293
47 #define QUAT_PI_K (1.0 / 200.0)
121 mat3_t mat3(
float,
float,
float,
float,
float,
float,
float,
float,
float);
LG_AxAng lg_axis_ang(vec3_t axis, double angle)
Definition: lg_quaternions.c:529
Definition: lg_quaternions.h:37
LG_EulerAng lg_euler_ang(double x_rot, double y_rot, double z_rot)
Definition: lg_quaternions.c:509
void lg_quat_normalize(LG_Quat *q)
Definition: lg_quaternions.c:35
Definition: lg_quaternions.h:29
mat3_t mat3(float m00, float m10, float m20, float m01, float m11, float m21, float m02, float m12, float m22)
Definition: lg_quaternions.c:623
void lg_quat_to_axis_angle(LG_Quat q, LG_AxAng *axis_ang)
Definition: lg_quaternions.c:188
LG_Quat lg_quat_from_euler_ang(LG_EulerAng an, const char *rot_order)
Definition: lg_quaternions.c:111
void lg_quat_conjugate(LG_Quat *q)
Definition: lg_quaternions.c:338
Definition: lg_quaternions.h:16
LG_Quat lg_quat(double x, double y, double z, double w)
Definition: lg_quaternions.c:23
Definition: lg_quaternions.h:51
LG_Quat lg_quat_get_conjugate(LG_Quat q)
Definition: lg_quaternions.c:351
vec3_t lg_quat_rotate_vec3(LG_Quat q, vec3_t v)
Definition: lg_quaternions.c:281
double lg_quat_magnitude(LG_Quat q)
Definition: lg_quaternions.c:392
LG_Quat lg_quat_slerp(LG_Quat *q_1, LG_Quat *q_2, float slerp_k)
Definition: lg_quaternions.c:448
mat4_t lg_quat_to_rot_matrix(LG_Quat q2)
Definition: lg_quaternions.c:257
Definition: math_3d.h:111
void lg_quat_set_identity(LG_Quat *q)
Definition: lg_quaternions.c:416
LG_Quat lg_quat_get_identity()
Definition: lg_quaternions.c:429
LG_QuatV * lg_quatv()
Definition: lg_quaternions.c:679
LG_EulerAng lg_axis_angle_to_euler_ang(LG_AxAng axis_ang)
Definition: lg_quaternions.c:562
mat3_t m3_transpose(mat3_t matrix)
Definition: lg_quaternions.c:643
LG_Quat lg_quats_multiply(LG_Quat q1, LG_Quat q2)
Definition: lg_quaternions.c:79
LG_Quat lg_quat_get_normalized(LG_Quat q)
Definition: lg_quaternions.c:59
int lg_quat_copy(LG_Quat *q_dest, const LG_Quat *q_src)
Definition: lg_quaternions.c:299
LG_Quat lg_quat_from_3x3_rot_matrix(mat3_t m)
Definition: lg_quaternions.c:220
LG_Quat lg_quat_get_invert(LG_Quat q)
Definition: lg_quaternions.c:378
Definition: lg_quaternions.h:23
double lg_quats_dot(LG_Quat *q1, LG_Quat *q2)
Definition: lg_quaternions.c:404
zboolean lg_quats_are_equal(LG_Quat *q1, LG_Quat *q2)
Definition: lg_quaternions.c:322
LG_Quat lg_quat_from_axis_angle(LG_AxAng axis_ang)
Definition: lg_quaternions.c:166
void lg_quat_invert(LG_Quat *q)
Definition: lg_quaternions.c:366
Definition: math_3d.h:167