6 #define HYPATIA_VERSION "2.0.0"
10 # define HYPAPI static
12 # define HYPAPI extern
17 # define HYPDEF HYPAPI
22 # define HYP_INLINE __inline
24 # define HYP_INLINE __inline__
29 # ifdef HYPATIA_SINGLE_PRECISION_FLOATS
30 # define HYP_FLOAT float
32 # define HYP_FLOAT double
51 # define HYP_PI 3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679f
55 # define HYP_TAU 6.2831853071795864769252867665590057683943387987502116419498891846156328125724179972560696506842341359f
59 # define HYP_PI_HALF 1.5707963267948966f
62 #ifndef HYP_PI_SQUARED
63 # define HYP_PI_SQUARED 9.8696044010893586f
67 # define HYP_E 2.71828182845904523536028747135266249775724709369995f
70 #ifndef HYP_RAD_PER_DEG
71 # define HYP_RAD_PER_DEG 0.0174532925199432957692369076848861f
74 #ifndef HYP_DEG_PER_RAD
75 # define HYP_DEG_PER_RAD 57.2957795130823208767981548141052f
79 # define HYP_PIOVER180 HYP_RAD_PER_DEG
82 #ifndef HYP_PIUNDER180
83 # define HYP_PIUNDER180 HYP_DEG_PER_RAD
89 # ifdef HYPATIA_SINGLE_PRECISION_FLOATS
90 # define HYP_EPSILON 1E-5f
92 # define HYP_EPSILON 1E-5
100 # define HYP_MEMSET(a, b, c) memset(a, b, c)
106 return (a < b) ? a : b;
112 return (a > b) ? b : a;
122 #ifndef HYP_RANDOM_FLOAT
124 # define HYP_RANDOM_FLOAT (((HYP_FLOAT)rand() - (HYP_FLOAT)rand()) / (HYP_FLOAT)RAND_MAX)
128 #ifndef HYP_DEG_TO_RAD
129 # define HYP_DEG_TO_RAD(angle) ((angle) * HYP_RAD_PER_DEG)
133 #ifndef HYP_RAD_TO_DEG
134 # define HYP_RAD_TO_DEG(radians) ((radians) * HYP_DEG_PER_RAD)
140 return number * number;
145 # define HYP_SQRT(number) ((HYP_FLOAT)sqrt(number))
151 return (value < 0.0f) ? -value : value;
157 return (
HYP_FLOAT)fmod(start + (value - start), (limit - start));
163 return ((value < start) ? start : (value > limit) ? limit : value);
166 #ifndef DOXYGEN_SHOULD_SKIP_THIS
177 #define HYP_REF_VECTOR2_ZERO 0
178 #define HYP_REF_VECTOR2_UNIT_X 1
179 #define HYP_REF_VECTOR2_UNIT_Y 2
180 #define HYP_REF_VECTOR2_UNIT_X_NEGATIVE 3
181 #define HYP_REF_VECTOR2_UNIT_Y_NEGATIVE 4
182 #define HYP_REF_VECTOR2_ONE 5
184 HYPAPI
const struct vector2 *vector2_get_reference_vector2(
int id);
186 #define HYP_REF_VECTOR3_ZERO 0
187 #define HYP_REF_VECTOR3_UNIT_X 1
188 #define HYP_REF_VECTOR3_UNIT_Y 2
189 #define HYP_REF_VECTOR3_UNIT_Z 3
190 #define HYP_REF_VECTOR3_UNIT_X_NEGATIVE 4
191 #define HYP_REF_VECTOR3_UNIT_Y_NEGATIVE 5
192 #define HYP_REF_VECTOR3_UNIT_Z_NEGATIVE 6
193 #define HYP_REF_VECTOR3_ONE 7
195 HYPAPI
const struct vector3 *vector3_get_reference_vector3(
int id);
197 #define HYP_REF_VECTOR4_ZERO 0
198 #define HYP_REF_VECTOR4_UNIT_X 1
199 #define HYP_REF_VECTOR4_UNIT_Y 2
200 #define HYP_REF_VECTOR4_UNIT_Z 3
201 #define HYP_REF_VECTOR4_UNIT_X_NEGATIVE 4
202 #define HYP_REF_VECTOR4_UNIT_Y_NEGATIVE 5
203 #define HYP_REF_VECTOR4_UNIT_Z_NEGATIVE 6
204 #define HYP_REF_VECTOR4_ONE 7
206 HYPAPI
const struct vector4 *vector4_get_reference_vector4(
int id);
212 #define HYP_VECTOR3_ZERO vector3_get_reference_vector3(HYP_REF_VECTOR3_ZERO)
215 #define HYP_VECTOR3_UNIT_X vector3_get_reference_vector3(HYP_REF_VECTOR3_UNIT_X)
218 #define HYP_VECTOR3_UNIT_Y vector3_get_reference_vector3(HYP_REF_VECTOR3_UNIT_Y)
221 #define HYP_VECTOR3_UNIT_Z vector3_get_reference_vector3(HYP_REF_VECTOR3_UNIT_Z)
224 #define HYP_VECTOR3_UNIT_X_NEGATIVE vector3_get_reference_vector3(HYP_REF_VECTOR3_UNIT_X_NEGATIVE)
227 #define HYP_VECTOR3_UNIT_Y_NEGATIVE vector3_get_reference_vector3(HYP_REF_VECTOR3_UNIT_Y_NEGATIVE)
230 #define HYP_VECTOR3_UNIT_Z_NEGATIVE vector3_get_reference_vector3(HYP_REF_VECTOR3_UNIT_Z_NEGATIVE)
233 #define HYP_VECTOR3_ONE vector3_get_reference_vector3(HYP_REF_VECTOR3_ONE)
239 #define HYP_VECTOR2_ZERO vector2_get_reference_vector2(HYP_REF_VECTOR2_ZERO)
242 #define HYP_VECTOR2_UNIT_X vector2_get_reference_vector2(HYP_REF_VECTOR2_UNIT_X)
245 #define HYP_VECTOR2_UNIT_Y vector2_get_reference_vector2(HYP_REF_VECTOR2_UNIT_Y)
248 #define HYP_VECTOR2_UNIT_X_NEGATIVE vector2_get_reference_vector2(HYP_REF_VECTOR2_UNIT_X_NEGATIVE)
251 #define HYP_VECTOR2_UNIT_Y_NEGATIVE vector2_get_reference_vector2(HYP_REF_VECTOR2_UNIT_Y_NEGATIVE)
254 #define HYP_VECTOR2_ONE vector2_get_reference_vector2(HYP_REF_VECTOR2_ONE)
261 #define scalar_equals scalar_equalsf
269 #define HYP_SIN(x) ((HYP_FLOAT)sin(x))
270 #define HYP_COS(x) ((HYP_FLOAT)cos(x))
271 #define HYP_TAN(x) ((HYP_FLOAT)tan(x))
272 #define HYP_ASIN(x) ((HYP_FLOAT)asin(x))
273 #define HYP_ACOS(x) ((HYP_FLOAT)acos(x))
274 #define HYP_ATAN2(y, x) ((HYP_FLOAT)atan2(y, x))
275 #define HYP_COT(a) (1.0f / HYP_TAN(a))
293 HYPAPI
void _matrix4_print_with_columnrow_indexer(
struct matrix4 *
self);
294 HYPAPI
void _matrix4_print_with_rowcolumn_indexer(
struct matrix4 *
self);
297 HYPAPI
void _quaternion_print(
const struct quaternion *
self);
300 HYPAPI
void _vector3_print(
const struct vector3 *
self);
303 HYPAPI
void _vector2_print(
const struct vector2 *
self);
349 #define vector2_length(v) vector2_magnitude(v)
351 #ifndef DOXYGEN_SHOULD_SKIP_THIS
354 #define vec2 struct vector2
402 #define vector3_length(v) vector3_magnitude(v)
404 #ifndef DOXYGEN_SHOULD_SKIP_THIS
407 #define vec3 struct vector3
445 #define vector4_length(v) vector4_magnitude(v)
447 #ifndef DOXYGEN_SHOULD_SKIP_THIS
450 #define vec4 struct vector4
508 #ifndef DOXYGEN_SHOULD_SKIP_THIS
511 #define mat2 struct matrix2
513 #define mat2_equals matrix2_equals
514 #define mat2_zero matrix2_zero
515 #define mat2_identity matrix2_identity
516 #define mat2_set matrix2_setm2
517 #define mat2_add matrix2_add
518 #define mat2_sub matrix2_subtract
519 #define mat2_mul matrix2_multiply
520 #define mat2_transpose matrix2_transpose
522 #define mat2_rotate matrix2_rotate
523 #define mat2_scalev2 matrix2_scalev2
528 #define m2_equals matrix2_equals
529 #define m2_zero matrix2_zero
530 #define m2_identity matrix2_identity
531 #define m2_set matrix2_set
532 #define m2_add matrix2_add
533 #define m2_sub matrix2_subtract
534 #define m2_mul matrix2_multiply
535 #define m2_transpose matrix2_transpose
537 #define m2_rotate matrix2_rotate
538 #define m2_scalev2 matrix2_scalev2
601 #ifndef DOXYGEN_SHOULD_SKIP_THIS
604 #define mat3 struct matrix3
606 #define mat3_equals matrix3_equals
607 #define mat3_zero matrix3_zero
608 #define mat3_identity matrix3_identity
609 #define mat3_set matrix3_setm3
610 #define mat3_add matrix3_add
611 #define mat3_sub matrix3_subtract
612 #define mat3_mul matrix3_multiply
613 #define mat3_transpose matrix3_transpose
615 #define mat3_translatev2 matrix3_translatev2
616 #define mat3_rotate matrix3_rotate
617 #define mat3_scalev2 matrix3_scalev2
620 #define m3 struct matrix3
622 #define m3_equals matrix3_equals
623 #define m3_zero matrix3_zero
624 #define m3_identity matrix3_identity
625 #define m3_set matrix3_set
626 #define m3_add matrix3_add
627 #define m3_sub matrix3_subtract
628 #define m3_mul matrix3_multiply
629 #define m3_transpose matrix3_transpose
631 #define m3_translatev2 matrix3_translatev2
632 #define m3_rotate matrix3_rotate
633 #define m3_scalev2 matrix3_scalev2
699 HYPAPI
struct matrix4 *_matrix4_transpose_rowcolumn(
struct matrix4 *
self);
700 HYPAPI
struct matrix4 *_matrix4_transpose_columnrow(
struct matrix4 *
self);
703 #ifndef DOXYGEN_SHOULD_SKIP_THIS
706 #define mat4 struct matrix4
708 #define mat4_equals matrix4_equals
709 #define mat4_zero matrix4_zero
710 #define mat4_identity matrix4_identity
711 #define mat4_set matrix4_setm4
712 #define mat4_add matrix4_add
713 #define mat4_sub matrix4_subtract
714 #define mat4_mul matrix4_multiply
715 #define mat4_transpose matrix4_transpose
717 #define mat4_translatev3 matrix3_translatev3
718 #define mat4_rotatev3 matrix3_rotatev3
719 #define mat4_scalev3 matrix3_scalev3
722 #define m4 struct matrix4
724 #define m4_equals matrix4_equals
725 #define m4_zero matrix4_zero
726 #define m4_identity matrix4_identity
727 #define m4_set matrix4_set
728 #define m4_add matrix4_add
729 #define m4_sub matrix4_subtract
730 #define m4_mul matrix4_multiply
731 #define m4_transpose matrix4_transpose
733 #define m4_translatev3 matrix3_translatev3
734 #define m4_rotatev3 matrix3_rotatev3
735 #define m4_scalev3 matrix3_scalev3
788 #ifndef DOXYGEN_SHOULD_SKIP_THIS
791 #define quat struct quaternion
793 #define quat_equals quaternion_equals
794 #define quat_identity quaternion_identity
795 #define quat_lerp quaternion_lerp
796 #define quat_nlerp quaternion_nlerp
797 #define quat_slerp quaternion_slerp
825 #ifdef HYPATIA_IMPLEMENTATION
843 if ((
HYP_ABS(f1 - f2) < epsilon) == 0) {
851 static struct vector2 _vector2_zero = { { {0.0f, 0.0f} } };
852 static struct vector2 _vector2_one = { { {1.0f, 1.0f} } };
853 static struct vector2 _vector2_unit_x = { { {1.0f, 0.0f} } };
854 static struct vector2 _vector2_unit_y = { { {0.0f, 1.0f} } };
855 static struct vector2 _vector2_unit_x_negative = { { {-1.0f, 0.0f} } };
856 static struct vector2 _vector2_unit_y_negative = { { {0.0f, -1.0f} } };
859 HYPAPI
const struct vector2 *vector2_get_reference_vector2(
int id)
862 case HYP_REF_VECTOR2_ZERO:
863 return &_vector2_zero;
864 case HYP_REF_VECTOR2_ONE:
865 return &_vector2_one;
866 case HYP_REF_VECTOR2_UNIT_X:
867 return &_vector2_unit_x;
868 case HYP_REF_VECTOR2_UNIT_Y:
869 return &_vector2_unit_y;
870 case HYP_REF_VECTOR2_UNIT_X_NEGATIVE:
871 return &_vector2_unit_x_negative;
872 case HYP_REF_VECTOR2_UNIT_Y_NEGATIVE:
873 return &_vector2_unit_y_negative;
876 return &_vector2_zero;
911 self->
v[0] = -
self->v[0];
912 self->v[1] = -
self->v[1];
919 self->
v[0] += vT->
v[0];
920 self->v[1] += vT->
v[1];
935 self->
v[0] -= vT->
v[0];
936 self->v[1] -= vT->
v[1];
951 self->
v[0] *= vT->
v[0];
952 self->v[1] *= vT->
v[1];
967 self->
v[0] /= vT->
v[0];
968 self->v[1] /= vT->
v[1];
983 return HYP_SQRT((self->x * self->x) + (self->y * self->y));
991 self->x =
self->x / mag;
992 self->y =
self->y / mag;
999 return (self->x * vT->
x) + (
self->y * vT->
y);
1005 vR->
x = (vT1->
x * vT2->
y) - (vT1->
y * vT2->
x);
1006 vR->
y = (vT1->
y * vT2->
x) - (vT1->
x * vT2->
y);
1032 return HYP_SQRT((v2->
x - v1->
x) * (v2->
x - v1->
x) + (v2->
y - v1->
y) * (v2->
y - v1->
y));
1076 #ifndef HYP_NO_STDIO
1077 HYPAPI
void _vector2_print(
const struct vector2 *
self)
1079 printf(
"x:%10f, y:%10f\r\n", self->x, self->y);
1097 static struct vector3 _vector3_zero = { { {0.0f, 0.0f, 0.0f} } };
1098 static struct vector3 _vector3_one = { { {1.0f, 1.0f, 1.0f} } };
1099 static struct vector3 _vector3_unit_x = { { {1.0f, 0.0f, 0.0f} } };
1100 static struct vector3 _vector3_unit_y = { { {0.0f, 1.0f, 0.0f} } };
1101 static struct vector3 _vector3_unit_z = { { {0.0f, 0.0f, 1.0f} } };
1102 static struct vector3 _vector3_unit_x_negative = { { {-1.0f, 0.0f, 0.0f} } };
1103 static struct vector3 _vector3_unit_y_negative = { { {0.0f, -1.0f, 0.0f} } };
1104 static struct vector3 _vector3_unit_z_negative = { { {0.0f, 0.0f, -1.0f} } };
1107 HYPAPI
const struct vector3 *vector3_get_reference_vector3(
int id)
1110 case HYP_REF_VECTOR3_ZERO:
1111 return &_vector3_zero;
1112 case HYP_REF_VECTOR3_ONE:
1113 return &_vector3_one;
1114 case HYP_REF_VECTOR3_UNIT_X:
1115 return &_vector3_unit_x;
1116 case HYP_REF_VECTOR3_UNIT_Y:
1117 return &_vector3_unit_y;
1118 case HYP_REF_VECTOR3_UNIT_Z:
1119 return &_vector3_unit_z;
1120 case HYP_REF_VECTOR3_UNIT_X_NEGATIVE:
1121 return &_vector3_unit_x_negative;
1122 case HYP_REF_VECTOR3_UNIT_Y_NEGATIVE:
1123 return &_vector3_unit_y_negative;
1124 case HYP_REF_VECTOR3_UNIT_Z_NEGATIVE:
1125 return &_vector3_unit_z_negative;
1128 return &_vector3_zero;
1187 self->
v[0] = -
self->v[0];
1188 self->v[1] = -
self->v[1];
1189 self->v[2] = -
self->v[2];
1200 self->
v[0] += vT->
v[0];
1201 self->v[1] += vT->
v[1];
1202 self->v[2] += vT->
v[2];
1226 self->
v[0] -= vT->
v[0];
1227 self->v[1] -= vT->
v[1];
1228 self->v[2] -= vT->
v[2];
1252 self->
v[0] *= vT->
v[0];
1253 self->v[1] *= vT->
v[1];
1254 self->v[2] *= vT->
v[2];
1279 self->
v[0] /= vT->
v[0];
1280 self->v[1] /= vT->
v[1];
1281 self->v[2] /= vT->
v[2];
1292 return HYP_SQRT((self->x * self->x) + (self->y * self->y) + (self->z * self->z));
1313 self->x =
self->x / mag;
1314 self->y =
self->y / mag;
1315 self->z =
self->z / mag;
1327 return (self->x * vT->
x) + (
self->y * vT->
y) + (self->z * vT->
z);
1337 vR->
x = (vT1->
y * vT2->
z) - (vT1->
z * vT2->
y);
1338 vR->
y = (vT1->
z * vT2->
x) - (vT1->
x * vT2->
z);
1339 vR->
z = (vT1->
x * vT2->
y) - (vT1->
y * vT2->
x);
1381 return HYP_SQRT((v2->
x - v1->
x) * (v2->
x - v1->
x) + (v2->
y - v1->
y) * (v2->
y - v1->
y) + (v2->
z - v1->
z) * (v2->
z - v1->
z));
1405 #ifndef HYP_NO_STDIO
1406 HYPAPI
void _vector3_print(
const struct vector3 *
self)
1408 printf(
"x:%10f, y:%10f, z:%10f\r\n", self->x, self->y, self->z);
1488 static struct vector4 _vector4_zero = { { {0.0f, 0.0f, 0.0f, 0.0f} } };
1489 static struct vector4 _vector4_one = { { {1.0f, 1.0f, 1.0f, 1.0f} } };
1490 static struct vector4 _vector4_unit_x = { { {1.0f, 0.0f, 0.0f, 0.0f} } };
1491 static struct vector4 _vector4_unit_y = { { {0.0f, 1.0f, 0.0f, 0.0f} } };
1492 static struct vector4 _vector4_unit_z = { { {0.0f, 0.0f, 1.0f, 0.0f} } };
1493 static struct vector4 _vector4_unit_x_negative = { { {-1.0f, 0.0f, 0.0f, 0.0f} } };
1494 static struct vector4 _vector4_unit_y_negative = { { {0.0f, -1.0f, 0.0f, 0.0f} } };
1495 static struct vector4 _vector4_unit_z_negative = { { {0.0f, 0.0f, -1.0f, 0.0f} } };
1498 HYPAPI
const struct vector4 *vector4_get_reference_vector4(
int id)
1501 case HYP_REF_VECTOR4_ZERO:
1502 return &_vector4_zero;
1503 case HYP_REF_VECTOR4_ONE:
1504 return &_vector4_one;
1505 case HYP_REF_VECTOR4_UNIT_X:
1506 return &_vector4_unit_x;
1507 case HYP_REF_VECTOR4_UNIT_Y:
1508 return &_vector4_unit_y;
1509 case HYP_REF_VECTOR4_UNIT_Z:
1510 return &_vector4_unit_z;
1511 case HYP_REF_VECTOR4_UNIT_X_NEGATIVE:
1512 return &_vector4_unit_x_negative;
1513 case HYP_REF_VECTOR4_UNIT_Y_NEGATIVE:
1514 return &_vector4_unit_y_negative;
1515 case HYP_REF_VECTOR4_UNIT_Z_NEGATIVE:
1516 return &_vector4_unit_z_negative;
1519 return &_vector4_zero;
1580 self->
v[0] = -
self->v[0];
1581 self->v[1] = -
self->v[1];
1582 self->v[2] = -
self->v[2];
1583 self->v[3] = -
self->v[3];
1594 self->
v[0] += vT->
v[0];
1595 self->v[1] += vT->
v[1];
1596 self->v[2] += vT->
v[2];
1597 self->v[3] += vT->
v[3];
1622 self->
v[0] -= vT->
v[0];
1623 self->v[1] -= vT->
v[1];
1624 self->v[2] -= vT->
v[2];
1625 self->v[3] -= vT->
v[3];
1650 self->
v[0] *= vT->
v[0];
1651 self->v[1] *= vT->
v[1];
1652 self->v[2] *= vT->
v[2];
1653 self->v[3] *= vT->
v[3];
1679 self->
v[0] /= vT->
v[0];
1680 self->v[1] /= vT->
v[1];
1681 self->v[2] /= vT->
v[2];
1682 self->v[3] /= vT->
v[3];
1693 return HYP_SQRT((self->x * self->x) + (self->y * self->y) + (self->z * self->z) + (self->w * self->w));
1714 self->x =
self->x / mag;
1715 self->y =
self->y / mag;
1716 self->z =
self->z / mag;
1717 self->w =
self->w / mag;
1729 return (self->x * vT->
x) + (
self->y * vT->
y) + (self->z * vT->
z) + (
self->w * vT->
w);
1739 vR->
x = (vT1->
y * vT2->
z) - (vT1->
z * vT2->
y);
1740 vR->
y = (vT1->
z * vT2->
x) - (vT1->
x * vT2->
z);
1741 vR->
z = (vT1->
x * vT2->
y) - (vT1->
y * vT2->
x);
1742 vR->
w = (vT1->
w * vT2->
w) - (vT1->
w * vT2->
w);
1757 + (v2->
y - v1->
y) * (v2->
y - v1->
y)
1758 + (v2->
z - v1->
z) * (v2->
z - v1->
z)
1759 + (v2->
w - v1->
w) * (v2->
w - v1->
w));
1763 #ifndef HYP_NO_STDIO
1766 printf(
"x:%10f, y:%10f, z:%10f, w:%10f\r\n", self->x, self->y, self->z, self->w);
1803 m->c00 = 1.0f,
m->c10 = 0.0f;
1804 m->c01 = 0.0f,
m->c11 = 1.0f;
1821 for (i = 0; i < 4; i++) {
1822 self->
m[i] = mT->
m[i];
1838 for (i = 0; i < 4; i++) {
1860 for (i = 0; i < 4; i++) {
1861 self->
m[i] += mT->
m[i];
1880 for (i = 0; i < 4; i++) {
1881 self->
m[i] -= mT->
m[i];
1899 for (i = 0; i < 4; i++) {
1900 self->
m[i] *= scalar;
1925 r.r00 =
self->c00 * mT->
c00 +
self->c01 * mT->
c10;
1926 r.r01 =
self->c10 * mT->
c00 +
self->c11 * mT->
c10;
1929 r.r10 =
self->c00 * mT->
c01 +
self->c01 * mT->
c11;
1930 r.r11 =
self->c10 * mT->
c01 +
self->c11 * mT->
c11;
1948 vR->
x = vT->
x *
self->c00 + vT->
y *
self->c01;
1949 vR->
y = vT->
x *
self->c10 + vT->
y *
self->c11;
1993 #ifndef HYP_NO_STDIO
2001 printf(
"%10f, %10f\r\n", self->c00, self->c10);
2002 printf(
"%10f, %10f\r\n", self->c01, self->c11);
2007 #ifndef HYP_NO_STDIO
2015 printf(
"%10f, %10f\r\n", self->r00, self->r01);
2016 printf(
"%10f, %10f\r\n", self->r10, self->r11);
2029 for (i = 0; i < 4; i++) {
2046 self->r00 = scale->
x;
2047 self->r11 = scale->
y;
2088 struct matrix2 rotationMatrix;
2125 self->r00 *
self->r11
2126 -
self->r10 *
self->r01
2146 for (i = 0; i < 4; i++) {
2147 self->
m[i] = inverse.m[i];
2176 determinant = 1.0f / determinant;
2179 inverse.c00 =
self->c11;
2180 inverse.c01 = -
self->c01;
2181 inverse.c10 = -
self->c10;
2182 inverse.c11 =
self->c00;
2185 for (i = 0; i < 4; i++) {
2186 mR->
m[i] = inverse.m[i] * determinant;
2210 m->c00 = 1.0f,
m->c10 = 0.0f,
m->c20 = 0.0f;
2211 m->c01 = 0.0f,
m->c11 = 1.0f,
m->c21 = 0.0f;
2212 m->c02 = 0.0f,
m->c12 = 0.0f,
m->c22 = 1.0f;
2229 for (i = 0; i < 9; i++) {
2230 self->
m[i] = mT->
m[i];
2246 for (i = 0; i < 9; i++) {
2268 for (i = 0; i < 9; i++) {
2269 self->
m[i] += mT->
m[i];
2288 for (i = 0; i < 9; i++) {
2289 self->
m[i] -= mT->
m[i];
2307 for (i = 0; i < 9; i++) {
2308 self->
m[i] *= scalar;
2333 r.r00 =
self->c00 * mT->
c00 +
self->c01 * mT->
c10 +
self->c02 * mT->
c20;
2334 r.r01 =
self->c10 * mT->
c00 +
self->c11 * mT->
c10 +
self->c12 * mT->
c20;
2335 r.r02 =
self->c20 * mT->
c00 +
self->c21 * mT->
c10 +
self->c22 * mT->
c20;
2338 r.r10 =
self->c00 * mT->
c01 +
self->c01 * mT->
c11 +
self->c02 * mT->
c21;
2339 r.r11 =
self->c10 * mT->
c01 +
self->c11 * mT->
c11 +
self->c12 * mT->
c21;
2340 r.r12 =
self->c20 * mT->
c01 +
self->c21 * mT->
c11 +
self->c22 * mT->
c21;
2343 r.r20 =
self->c00 * mT->
c02 +
self->c01 * mT->
c12 +
self->c02 * mT->
c22;
2344 r.r21 =
self->c10 * mT->
c02 +
self->c11 * mT->
c12 +
self->c12 * mT->
c22;
2345 r.r22 =
self->c20 * mT->
c02 +
self->c21 * mT->
c12 +
self->c22 * mT->
c22;
2363 vR->
x = vT->
x *
self->c00 + vT->
y *
self->c01 +
self->c20;
2364 vR->
y = vT->
x *
self->c10 + vT->
y *
self->c11 +
self->c21;
2412 #ifndef HYP_NO_STDIO
2420 printf(
"%10f, %10f, %10f\r\n", self->c00, self->c10, self->c20);
2421 printf(
"%10f, %10f, %10f\r\n", self->c01, self->c11, self->c21);
2422 printf(
"%10f, %10f, %10f\r\n", self->c02, self->c12, self->c22);
2427 #ifndef HYP_NO_STDIO
2435 printf(
"%10f, %10f, %10f\r\n", self->r00, self->r01, self->r02);
2436 printf(
"%10f, %10f, %10f\r\n", self->r10, self->r11, self->r12);
2437 printf(
"%10f, %10f, %10f\r\n", self->r20, self->r21, self->r22);
2450 for (i = 0; i < 9; i++) {
2467 self->r02 = translation->
x;
2468 self->r12 = translation->
y;
2483 self->r00 = scale->
x;
2484 self->r11 = scale->
y;
2524 struct matrix3 translationMatrix;
2543 struct matrix3 rotationMatrix;
2568 #define _HYP_CAT(a, ...) _HYP_PRIMITIVE_CAT(a, __VA_ARGS__)
2569 #define _HYP_PRIMITIVE_CAT(a, ...) a ## __VA_ARGS__
2570 #define _HYP_DEC(x) _HYP_PRIMITIVE_CAT(DEC_, x)
2587 #define A(x) _HYP_CAT(self->r, _HYP_DEC(x))
2588 #define B(x) _HYP_CAT(inverse.r, _HYP_DEC(x))
2589 #define A4(x1, x2, x3, x4) (A(x1) * A(x2) * A(x3) * A(x4))
2590 #define A3(x1, x2, x3) (A(x1) * A(x2) * A(x3))
2591 #define A2(x1, x2) (A(x1) * A(x2))
2606 (A(11) * (A2(22, 33) - A2(32, 23)))
2607 - (A(12) * (A2(21, 33) - A2(31, 23)))
2608 + (A(13) * (A2(21, 32) - A2(31, 22)))
2628 for (i = 0; i < 9; i++) {
2629 self->
m[i] = inverse.m[i];
2658 determinant = 1.0f / determinant;
2663 B(11) = A2(22, 33) - A2(32, 23);
2664 B(12) = A2(32, 13) - A2(12, 33);
2665 B(13) = A2(12, 23) - A2(22, 13);
2667 B(21) = A2(23, 31) - A2(33, 21);
2668 B(22) = A2(33, 11) - A2(13, 31);
2669 B(23) = A2(13, 21) - A2(23, 11);
2671 B(31) = A2(21, 32) - A2(31, 22);
2672 B(32) = A2(31, 12) - A2(11, 32);
2673 B(33) = A2(11, 22) - A2(21, 12);
2676 for (i = 0; i < 9; i++) {
2677 mR->
m[i] = inverse.m[i] * determinant;
2701 m->c00 = 1.0f,
m->c10 = 0.0f,
m->c20 = 0.0f,
m->c30 = 0.0f;
2702 m->c01 = 0.0f,
m->c11 = 1.0f,
m->c21 = 0.0f,
m->c31 = 0.0f;
2703 m->c02 = 0.0f,
m->c12 = 0.0f,
m->c22 = 1.0f,
m->c32 = 0.0f;
2704 m->c03 = 0.0f,
m->c13 = 0.0f,
m->c23 = 0.0f,
m->c33 = 1.0f;
2721 for (i = 0; i < 16; i++) {
2722 self->
m[i] = mT->
m[i];
2738 for (i = 0; i < 16; i++) {
2760 for (i = 0; i < 16; i++) {
2761 self->
m[i] += mT->
m[i];
2780 for (i = 0; i < 16; i++) {
2781 self->
m[i] -= mT->
m[i];
2799 for (i = 0; i < 16; i++) {
2800 self->
m[i] *= scalar;
2825 r.r00 =
self->c00 * mT->
c00 +
self->c01 * mT->
c10 +
self->c02 * mT->
c20 +
self->c03 * mT->
c30;
2826 r.r01 =
self->c10 * mT->
c00 +
self->c11 * mT->
c10 +
self->c12 * mT->
c20 +
self->c13 * mT->
c30;
2827 r.r02 =
self->c20 * mT->
c00 +
self->c21 * mT->
c10 +
self->c22 * mT->
c20 +
self->c23 * mT->
c30;
2828 r.r03 =
self->c30 * mT->
c00 +
self->c31 * mT->
c10 +
self->c32 * mT->
c20 +
self->c33 * mT->
c30;
2831 r.r10 =
self->c00 * mT->
c01 +
self->c01 * mT->
c11 +
self->c02 * mT->
c21 +
self->c03 * mT->
c31;
2832 r.r11 =
self->c10 * mT->
c01 +
self->c11 * mT->
c11 +
self->c12 * mT->
c21 +
self->c13 * mT->
c31;
2833 r.r12 =
self->c20 * mT->
c01 +
self->c21 * mT->
c11 +
self->c22 * mT->
c21 +
self->c23 * mT->
c31;
2834 r.r13 =
self->c30 * mT->
c01 +
self->c31 * mT->
c11 +
self->c32 * mT->
c21 +
self->c33 * mT->
c31;
2837 r.r20 =
self->c00 * mT->
c02 +
self->c01 * mT->
c12 +
self->c02 * mT->
c22 +
self->c03 * mT->
c32;
2838 r.r21 =
self->c10 * mT->
c02 +
self->c11 * mT->
c12 +
self->c12 * mT->
c22 +
self->c13 * mT->
c32;
2839 r.r22 =
self->c20 * mT->
c02 +
self->c21 * mT->
c12 +
self->c22 * mT->
c22 +
self->c23 * mT->
c32;
2840 r.r23 =
self->c30 * mT->
c02 +
self->c31 * mT->
c12 +
self->c32 * mT->
c22 +
self->c33 * mT->
c32;
2843 r.r30 =
self->c00 * mT->
c03 +
self->c01 * mT->
c13 +
self->c02 * mT->
c23 +
self->c03 * mT->
c33;
2844 r.r31 =
self->c10 * mT->
c03 +
self->c11 * mT->
c13 +
self->c12 * mT->
c23 +
self->c13 * mT->
c33;
2845 r.r32 =
self->c20 * mT->
c03 +
self->c21 * mT->
c13 +
self->c22 * mT->
c23 +
self->c23 * mT->
c33;
2846 r.r33 =
self->c30 * mT->
c03 +
self->c31 * mT->
c13 +
self->c32 * mT->
c23 +
self->c33 * mT->
c33;
2866 vR->
x = vT->
x *
self->r00 + vT->
y *
self->r01 + vT->
z *
self->r02 + vT->
w *
self->r03;
2867 vR->
y = vT->
x *
self->r10 + vT->
y *
self->r11 + vT->
z *
self->r12 + vT->
w *
self->r13;
2868 vR->
z = vT->
x *
self->r20 + vT->
y *
self->r21 + vT->
z *
self->r22 + vT->
w *
self->r23;
2869 vR->
w = vT->
x *
self->r30 + vT->
y *
self->r31 + vT->
z *
self->r32 + vT->
w *
self->r33;
2885 vR->
x = vT->
x *
self->r00 + vT->
y *
self->r01 + vT->
z *
self->r02 +
self->r03;
2886 vR->
y = vT->
x *
self->r10 + vT->
y *
self->r11 + vT->
z *
self->r12 +
self->r13;
2887 vR->
z = vT->
x *
self->r20 + vT->
y *
self->r21 + vT->
z *
self->r22 +
self->r23;
2903 vR->
x = vT->
x *
self->r00 + vT->
y *
self->r01 +
self->r02 +
self->r03;
2904 vR->
y = vT->
x *
self->r10 + vT->
y *
self->r11 +
self->r12 +
self->r13;
2918 return _matrix4_transpose_columnrow(
self);
2927 HYPAPI
struct matrix4 *_matrix4_transpose_rowcolumn(
struct matrix4 *
self)
2945 HYPAPI
struct matrix4 *_matrix4_transpose_columnrow(
struct matrix4 *
self)
2958 #ifndef HYP_NO_STDIO
2964 HYPAPI
void _matrix4_print_with_columnrow_indexer(
struct matrix4 *
self)
2966 printf(
"%10f, %10f, %10f, %10f\r\n", self->c00, self->c10, self->c20, self->c30);
2967 printf(
"%10f, %10f, %10f, %10f\r\n", self->c01, self->c11, self->c21, self->c31);
2968 printf(
"%10f, %10f, %10f, %10f\r\n", self->c02, self->c12, self->c22, self->c32);
2969 printf(
"%10f, %10f, %10f, %10f\r\n", self->c03, self->c13, self->c23, self->c33);
2978 HYPAPI
void _matrix4_print_with_rowcolumn_indexer(
struct matrix4 *
self)
2980 printf(
"%10f, %10f, %10f, %10f\r\n", self->r00, self->r01, self->r02, self->r03);
2981 printf(
"%10f, %10f, %10f, %10f\r\n", self->r10, self->r11, self->r12, self->r13);
2982 printf(
"%10f, %10f, %10f, %10f\r\n", self->r20, self->r21, self->r22, self->r23);
2983 printf(
"%10f, %10f, %10f, %10f\r\n", self->r30, self->r31, self->r32, self->r33);
2997 for (i = 0; i < 16; i++) {
3021 m->
m[0] = 1.0f - 2.0f * (
q->y *
q->y +
q->z *
q->z);
3022 m->
m[4] = 2.0f * (
q->x *
q->y -
q->z *
q->w);
3023 m->
m[8] = 2.0f * (
q->x *
q->z +
q->y *
q->w);
3024 m->
m[1] = 2.0f * (
q->x *
q->y +
q->z *
q->w);
3025 m->
m[5] = 1.0f - 2.0f * (
q->x *
q->x +
q->z *
q->z);
3026 m->
m[9] = 2.0f * (
q->y *
q->z -
q->x *
q->w);
3027 m->
m[2] = 2.0f * (
q->x *
q->z -
q->y *
q->w);
3028 m->
m[6] = 2.0f * (
q->y *
q->z +
q->x *
q->w);
3029 m->
m[10] = 1.0f - 2.0f * (
q->x *
q->x +
q->y *
q->y);
3044 self->c30 = translation->
x;
3045 self->c31 = translation->
y;
3046 self->c32 = translation->
z;
3061 self->c00 = scale->
x;
3062 self->c11 = scale->
y;
3063 self->c22 = scale->
z;
3151 struct matrix4 translationMatrix;
3170 struct matrix4 rotationMatrix;
3212 A4(11, 22, 33, 44) + A4(11, 23, 34, 42) + A4(11, 24, 32, 43)
3213 + A4(12, 21, 34, 43) + A4(12, 23, 31, 44) + A4(12, 24, 33, 41)
3214 + A4(13, 21, 32, 44) + A4(13, 22, 34, 41) + A4(13, 24, 31, 42)
3215 + A4(14, 21, 33, 42) + A4(14, 22, 31, 43) + A4(14, 23, 32, 41)
3216 - A4(11, 22, 34, 43) - A4(11, 23, 32, 44) - A4(11, 24, 33, 42)
3217 - A4(12, 21, 33, 44) - A4(12, 23, 34, 41) - A4(12, 24, 31, 43)
3218 - A4(13, 21, 34, 42) - A4(13, 22, 31, 44) - A4(13, 24, 32, 41)
3219 - A4(14, 21, 32, 43) - A4(14, 22, 33, 41) - A4(14, 23, 31, 42)
3239 for (i = 0; i < 16; i++) {
3240 self->
m[i] = inverse.m[i];
3269 determinant = 1.0f / determinant;
3273 B(11) = A3(22, 33, 44) + A3(23, 34, 42) + A3(24, 32, 43) - A3(22, 34, 43) - A3(23, 32, 44) - A3(24, 33, 42);
3274 B(12) = A3(12, 34, 43) + A3(13, 32, 44) + A3(14, 33, 42) - A3(12, 33, 44) - A3(13, 34, 42) - A3(14, 32, 43);
3275 B(13) = A3(12, 23, 44) + A3(13, 24, 42) + A3(14, 22, 43) - A3(12, 24, 43) - A3(13, 22, 44) - A3(14, 23, 42);
3276 B(14) = A3(12, 24, 33) + A3(13, 22, 34) + A3(14, 23, 32) - A3(12, 23, 34) - A3(13, 24, 32) - A3(14, 22, 33);
3277 B(21) = A3(21, 34, 43) + A3(23, 31, 44) + A3(24, 33, 41) - A3(21, 33, 44) - A3(23, 34, 41) - A3(24, 31, 43);
3278 B(22) = A3(11, 33, 44) + A3(13, 34, 41) + A3(14, 31, 43) - A3(11, 34, 43) - A3(13, 31, 44) - A3(14, 33, 41);
3279 B(23) = A3(11, 24, 43) + A3(13, 21, 44) + A3(14, 23, 41) - A3(11, 23, 44) - A3(13, 24, 41) - A3(14, 21, 43);
3280 B(24) = A3(11, 23, 34) + A3(13, 24, 31) + A3(14, 21, 33) - A3(11, 24, 33) - A3(13, 21, 34) - A3(14, 23, 31);
3281 B(31) = A3(21, 32, 44) + A3(22, 34, 41) + A3(24, 31, 42) - A3(21, 34, 42) - A3(22, 31, 44) - A3(24, 32, 41);
3282 B(32) = A3(11, 34, 42) + A3(12, 31, 44) + A3(14, 32, 41) - A3(11, 32, 44) - A3(12, 34, 41) - A3(14, 31, 42);
3283 B(33) = A3(11, 22, 44) + A3(12, 24, 41) + A3(14, 21, 42) - A3(11, 24, 42) - A3(12, 21, 44) - A3(14, 22, 41);
3284 B(34) = A3(11, 24, 32) + A3(12, 21, 34) + A3(14, 22, 31) - A3(11, 22, 34) - A3(12, 24, 31) - A3(14, 21, 32);
3285 B(41) = A3(21, 33, 42) + A3(22, 31, 43) + A3(23, 32, 41) - A3(21, 32, 43) - A3(22, 33, 41) - A3(23, 31, 42);
3286 B(42) = A3(11, 32, 43) + A3(12, 33, 41) + A3(13, 31, 42) - A3(11, 33, 42) - A3(12, 31, 43) - A3(13, 32, 41);
3287 B(43) = A3(11, 23, 42) + A3(12, 21, 43) + A3(13, 22, 41) - A3(11, 22, 43) - A3(12, 23, 41) - A3(13, 21, 42);
3288 B(44) = A3(11, 22, 33) + A3(12, 23, 31) + A3(13, 21, 32) - A3(11, 23, 32) - A3(12, 21, 33) - A3(13, 22, 31);
3291 for (i = 0; i < 16; i++) {
3292 mR->
m[i] = inverse.m[i] * determinant;
3442 *ax =
HYP_ATAN2(qy * qz + qw * qx, 0.5f - ((qx * qx) + (qy * qy)));
3443 *ay =
HYP_ASIN(-2.0f * ((qx * qz) - (qw * qy)));
3444 *az =
HYP_ATAN2(((qx * qy) + (qw * qz)), 0.5f - ((qy * qy) + (qz * qz)));
3471 return (self->x * self->x) + (
self->y *
self->y) + (self->z * self->z) + (
self->w *
self->w);
3664 f1 = 1.0f - percent;
3670 qR->
w = f1 * start->
w + f2 * end->
w;
3671 qR->
x = f1 * start->
x + f2 * end->
x;
3672 qR->
y = f1 * start->
y + f2 * end->
y;
3673 qR->
z = f1 * start->
z + f2 * end->
z;
3753 f1 =
HYP_SIN((1.0 - percent) * theta) / s;
3755 f2 =
HYP_SIN(percent * theta) / s;
3760 qR->
w = f1 * start->
w + f2 * end->
w;
3761 qR->
x = f1 * start->
x + f2 * end->
x;
3762 qR->
y = f1 * start->
y + f2 * end->
y;
3763 qR->
z = f1 * start->
z + f2 * end->
z;
3777 return (self->x * qT->
x) + (
self->y * qT->
y) + (self->z * qT->
z) + (
self->w * qT->
w);
3845 r.
x =
self->w * qT->
x +
self->x * qT->
w +
self->y * qT->
z -
self->z * qT->
y;
3846 r.y =
self->w * qT->
y -
self->x * qT->
z +
self->y * qT->
w +
self->z * qT->
x;
3847 r.z =
self->w * qT->
z +
self->x * qT->
y -
self->y * qT->
x +
self->z * qT->
w;
3848 r.w =
self->w * qT->
w -
self->x * qT->
x -
self->y * qT->
y -
self->z * qT->
z;
3866 r.
x =
self->w * vT->
x +
self->y * vT->
z -
self->z * vT->
y;
3867 r.y =
self->w * vT->
y -
self->x * vT->
z +
self->z * vT->
x;
3868 r.z =
self->w * vT->
z +
self->x * vT->
y -
self->y * vT->
x;
3869 r.w =
self->x * vT->
x -
self->y * vT->
y -
self->z * vT->
z;
3898 vR->
x =
self->x / scale;
3899 vR->
y =
self->y / scale;
3900 vR->
z =
self->z / scale;
3924 #ifndef HYP_NO_STDIO
3929 HYPAPI
void _quaternion_print(
const struct quaternion *
self)
3931 printf(
"x:%10f, y:%10f, z:%10f, w:%10f\r\n", self->x, self->y, self->z, self->w);
4032 diff.
x = q2->
x - q1->
x;
4033 diff.y = q2->
y - q1->
y;
4034 diff.z = q2->
z - q1->
z;
4035 diff.w = q2->
w - q1->
w;
4083 r.
x = (
self->y * vT->
z) - (self->z * vT->
y);
4084 r.y = (
self->z * vT->
x) - (self->x * vT->
z);
4085 r.z = (
self->x * vT->
y) - (self->y * vT->
x);
4086 r.w = -((
self->x * vT->
x) + (self->y * vT->
y) + (
self->z * vT->
z));
4140 p = zFar / (zNear - zFar);
4169 width = xmax - xmin;
4170 height = ymax - ymin;
4172 self->c00 = 2.0f / width;
4173 self->c11 = 2.0f / height;
4174 self->c22 = 1.0f / (zFar - zNear);
4175 self->c23 = zNear / (zNear - zFar);
4217 self->c00 = (x * x) * (1.0f - c) + c;
4218 self->c01 = (x * y) * (1.0f - c) + (z * s);
4219 self->c02 = (x * z) * (1.0f - c) - (y * s);
4222 self->c10 = (y * x) * (1.0f - c) - (z * s);
4223 self->c11 = (y * y) * (1.0f - c) + c;
4224 self->c12 = (y * z) * (1.0f - c) + (x * s);
4227 self->c20 = (z * x) * (1.0f - c) + (y * s);
4228 self->c21 = (z * y) * (1.0f - c) - (x * s);
4229 self->c22 = (z * z) * (1.0f - c) + c;
4274 self->c10 = BD * E + A * F;
4275 self->c11 = -BD * F + A * E;
4279 self->c20 = -AD * E + B * F;
4280 self->c21 = AD * F + B * E;
4313 zaxis.
x = target->
x - eye->
x;
4314 zaxis.y = target->
y - eye->
y;
4315 zaxis.z = target->
z - eye->
z;
4327 self->c00 = xaxis.x;
4328 self->c10 = xaxis.y;
4329 self->c20 = xaxis.z;
4331 self->c01 = yaxis.x;
4332 self->c11 = yaxis.y;
4333 self->c21 = yaxis.z;
4335 self->c02 = -zaxis.x;
4336 self->c12 = -zaxis.y;
4337 self->c22 = -zaxis.z;
4369 struct matrix4 scaleM, rotateM;
4380 self->c30 = translation->
x;
4381 self->c31 = translation->
y;
4382 self->c32 = translation->
z;
4392 translation->
x =
self->c30;
4393 translation->
y =
self->c31;
4394 translation->
z =
self->c32;
4403 signx = ((
self->c00 *
self->c01 *
self->c02 *
self->c03) < 0) ? -1.0f : 1.0f;
4404 signy = ((
self->c10 *
self->c11 *
self->c12 *
self->c13) < 0) ? -1.0f : 1.0f;
4405 signz = ((
self->c20 *
self->c21 *
self->c22 *
self->c23) < 0) ? -1.0f : 1.0f;
4408 scale->
x = signx *
HYP_SQRT(self->c00 * self->c00 + self->c01 * self->c01 + self->c02 * self->c02);
4409 scale->
y = signy *
HYP_SQRT(self->c10 * self->c10 + self->c11 * self->c11 + self->c12 * self->c12);
4410 scale->
z = signz *
HYP_SQRT(self->c20 * self->c20 + self->c21 * self->c21 + self->c22 * self->c22);
4419 #undef _HYP_PRIMITIVE_CAT
HYPAPI HYP_FLOAT matrix2_determinant(const struct matrix2 *self)
HYPAPI struct vector4 * _vector4_set_random(struct vector4 *self)
HYPAPI struct vector4 * matrix4_multiplyv4(const struct matrix4 *self, const struct vector4 *vT, struct vector4 *vR)
HYPAPI struct vector3 * vector3_add(struct vector3 *self, const struct vector3 *vT)
HYPAPI struct matrix2 * matrix2_zero(struct matrix2 *self)
#define HYP_RANDOM_FLOAT
A macro that returns a random float point number up to RAND_MAX.
Definition: hypatia.h:124
HYPAPI struct vector4 * vector4_multiplyf(struct vector4 *self, HYP_FLOAT fT)
#define HYP_MEMSET(a, b, c)
A macro that enabled you to override memset.
Definition: hypatia.h:100
HYPAPI struct vector3 * vector3_rotate_by_quaternion(struct vector3 *self, const struct quaternion *qT)
HYPAPI struct matrix4 * matrix4_invert(struct matrix4 *self)
HYPAPI struct matrix4 * matrix4_inverse(const struct matrix4 *self, struct matrix4 *mR)
HYPAPI int vector2_equals(const struct vector2 *self, const struct vector2 *vT)
HYPAPI struct matrix4 * matrix4_projection_perspective_fovy_rh_EXP(struct matrix4 *self, HYP_FLOAT fovy, HYP_FLOAT aspect, HYP_FLOAT zNear, HYP_FLOAT zFar)
HYPAPI struct matrix4 * matrix4_scalev3(struct matrix4 *self, const struct vector3 *scale)
HYPAPI struct matrix4 * matrix4_transpose(struct matrix4 *self)
HYPAPI struct matrix4 * matrix4_make_transformation_translationv3(struct matrix4 *self, const struct vector3 *translation)
HYPAPI struct vector3 * vector3_divide(struct vector3 *self, const struct vector3 *vT)
#define HYP_INLINE
Definition: hypatia.h:24
HYPAPI int matrix3_equals(const struct matrix3 *self, const struct matrix3 *mT)
HYPAPI struct matrix4 * matrix4_identity(struct matrix4 *self)
HYPAPI struct vector2 * vector2_multiplym3(struct vector2 *self, const struct matrix3 *mT)
HYPAPI struct quaternion * quaternion_multiply(struct quaternion *self, const struct quaternion *qT)
HYPAPI HYP_FLOAT matrix3_determinant(const struct matrix3 *self)
static HYP_INLINE HYP_FLOAT HYP_MAX(HYP_FLOAT a, HYP_FLOAT b)
A macro that returns the maximum of a and b.
Definition: hypatia.h:110
HYPAPI struct matrix4 * matrix4_set_from_quaternion_EXP(struct matrix4 *self, const struct quaternion *qT)
HYPAPI struct matrix3 * matrix3_invert(struct matrix3 *self)
HYPAPI struct vector2 * vector2_subtractf(struct vector2 *self, HYP_FLOAT fT)
#define HYP_COT(a)
Definition: hypatia.h:275
HYPAPI struct vector3 * vector3_multiply(struct vector3 *self, const struct vector3 *vT)
HYPAPI struct quaternion * quaternion_conjugate(struct quaternion *self)
HYPAPI struct vector2 * vector2_setf2(struct vector2 *self, HYP_FLOAT xT, HYP_FLOAT yT)
HYPAPI struct matrix4 * matrix4_transformation_compose_EXP(struct matrix4 *self, const struct vector3 *scale, const struct quaternion *rotation, const struct vector3 *translation)
HYPAPI struct vector2 * matrix3_multiplyv2(const struct matrix3 *self, const struct vector2 *vT, struct vector2 *vR)
HYPAPI struct matrix3 * matrix3_zero(struct matrix3 *self)
HYPAPI struct quaternion * quaternion_lerp(const struct quaternion *start, const struct quaternion *end, HYP_FLOAT percent, struct quaternion *qR)
#define HYP_ATAN2(y, x)
Definition: hypatia.h:274
HYPAPI struct vector4 * vector4_dividef(struct vector4 *self, HYP_FLOAT fT)
HYPAPI struct vector4 * vector4_set(struct vector4 *self, const struct vector4 *vT)
static HYP_INLINE HYP_FLOAT HYP_ABS(HYP_FLOAT value)
A macro that returns the absolute value.
Definition: hypatia.h:149
HYPAPI struct matrix3 * matrix3_transpose(struct matrix3 *self)
HYPAPI struct matrix2 * matrix2_identity(struct matrix2 *self)
HYPAPI void quaternion_get_euler_anglesf3(const struct quaternion *self, HYP_FLOAT *ax, HYP_FLOAT *ay, HYP_FLOAT *az)
HYPAPI void _matrix2_print_with_rowcolumn_indexer(struct matrix2 *self)
static HYP_INLINE void HYP_SWAP(HYP_FLOAT *a, HYP_FLOAT *b)
A macro that swaps a and b.
Definition: hypatia.h:116
HYPAPI struct matrix2 * _matrix2_transpose_columnrow(struct matrix2 *self)
HYPAPI short scalar_equalsf(const HYP_FLOAT f1, const HYP_FLOAT f2)
HYPAPI HYP_FLOAT quaternion_dot_product(const struct quaternion *self, const struct quaternion *qT)
HYPAPI struct quaternion * quaternion_identity(struct quaternion *self)
HYPAPI struct quaternion * quaternion_rotate_by_axis_angle_EXP(struct quaternion *self, const struct vector3 *axis, HYP_FLOAT angle)
HYPAPI HYP_FLOAT vector2_dot_product(const struct vector2 *self, const struct vector2 *vT)
HYPAPI struct matrix2 * matrix2_make_transformation_rotationf_z(struct matrix2 *self, HYP_FLOAT angle)
HYPAPI struct vector2 * vector2_negate(struct vector2 *self)
HYPAPI struct matrix4 * matrix4_multiplyf(struct matrix4 *self, HYP_FLOAT scalar)
HYPAPI struct matrix4 * matrix4_set_from_axisf3_angle_EXP(struct matrix4 *self, HYP_FLOAT x, HYP_FLOAT y, HYP_FLOAT z, const HYP_FLOAT angle)
HYPAPI struct vector3 * vector3_dividef(struct vector3 *self, HYP_FLOAT fT)
HYPAPI HYP_FLOAT quaternion_difference_EXP(const struct quaternion *q1, const struct quaternion *q2)
HYPAPI struct matrix3 * matrix3_subtract(struct matrix3 *self, const struct matrix3 *mT)
HYPAPI struct matrix4 * matrix4_add(struct matrix4 *self, const struct matrix4 *mT)
HYPAPI struct matrix2 * matrix2_set(struct matrix2 *self, const struct matrix2 *mT)
#define HYP_FLOAT
Definition: hypatia.h:32
static HYP_INLINE HYP_FLOAT HYP_MIN(HYP_FLOAT a, HYP_FLOAT b)
A function that returns the minimum of a and b.
Definition: hypatia.h:104
HYPAPI struct quaternion * quaternion_set_from_euler_anglesf3(struct quaternion *self, HYP_FLOAT ax, HYP_FLOAT ay, HYP_FLOAT az)
HYPAPI struct vector3 * vector3_find_normal_axis_between(struct vector3 *vR, const struct vector3 *vT1, const struct vector3 *vT2)
HYPAPI struct vector2 * vector2_multiplym2(struct vector2 *self, const struct matrix2 *mT)
HYPAPI HYP_FLOAT vector2_distance(const struct vector2 *v1, const struct vector2 *v2)
HYPAPI struct vector4 * vector4_add(struct vector4 *self, const struct vector4 *vT)
HYPAPI short quaternion_is_unit(struct quaternion *self)
HYPAPI struct matrix2 * matrix2_invert(struct matrix2 *self)
HYPAPI struct matrix3 * _matrix3_set_random(struct matrix3 *self)
#define HYP_SIN(x)
Definition: hypatia.h:269
HYPAPI struct vector4 * vector4_negate(struct vector4 *self)
HYPAPI struct vector2 * vector2_dividef(struct vector2 *self, HYP_FLOAT fT)
HYPAPI struct matrix3 * matrix3_make_transformation_scalingv2(struct matrix3 *self, const struct vector2 *scale)
HYPAPI struct matrix4 * matrix4_subtract(struct matrix4 *self, const struct matrix4 *mT)
HYPAPI void _matrix2_print_with_columnrow_indexer(struct matrix2 *self)
HYPAPI struct matrix2 * matrix2_rotate(struct matrix2 *self, HYP_FLOAT angle)
HYPAPI struct vector4 * vector4_addf(struct vector4 *self, HYP_FLOAT fT)
HYPAPI struct matrix2 * matrix2_scalev2(struct matrix2 *self, const struct vector2 *scale)
HYPAPI HYP_FLOAT vector2_magnitude(const struct vector2 *self)
HYPAPI struct matrix3 * _matrix3_transpose_columnrow(struct matrix3 *self)
HYPAPI struct vector2 * vector2_find_normal_axis_between(struct vector2 *vR, const struct vector2 *vT1, const struct vector2 *vT2)
HYPAPI struct matrix2 * matrix2_multiply(struct matrix2 *self, const struct matrix2 *mT)
HYPAPI struct vector2 * vector2_normalize(struct vector2 *self)
static HYP_INLINE HYP_FLOAT HYP_CLAMP(HYP_FLOAT value, HYP_FLOAT start, HYP_FLOAT limit)
A macro that constrains the value between two limits a and b.
Definition: hypatia.h:161
HYPAPI struct matrix4 * matrix4_view_lookat_rh_EXP(struct matrix4 *self, const struct vector3 *eye, const struct vector3 *target, const struct vector3 *up)
HYPAPI void quaternion_axis_between_EXP(const struct quaternion *self, const struct quaternion *qT, struct quaternion *qR)
#define HYP_ASIN(x)
Definition: hypatia.h:272
HYPAPI struct vector4 * vector4_normalize(struct vector4 *self)
HYPAPI struct matrix4 * matrix4_make_transformation_rotationf_z(struct matrix4 *self, HYP_FLOAT angle)
HYPAPI struct matrix4 * matrix4_make_transformation_rotationv3_EXP(struct matrix4 *self, const struct vector3 *vR)
HYPAPI struct vector3 * vector3_normalize(struct vector3 *self)
HYPAPI int matrix4_equals(const struct matrix4 *self, const struct matrix4 *mT)
static HYP_INLINE HYP_FLOAT HYP_SQUARE(HYP_FLOAT number)
A macro that squares a value squared.
Definition: hypatia.h:138
HYPAPI struct matrix4 * matrix4_set_from_euler_anglesf3_EXP(struct matrix4 *self, const HYP_FLOAT x, const HYP_FLOAT y, const HYP_FLOAT z)
HYPAPI struct matrix4 * matrix4_set(struct matrix4 *self, const struct matrix4 *mT)
HYPAPI HYP_FLOAT vector3_magnitude(const struct vector3 *self)
HYPAPI struct vector2 * matrix2_multiplyv2(const struct matrix2 *self, const struct vector2 *vT, struct vector2 *vR)
static HYP_INLINE HYP_FLOAT HYP_WRAP(HYP_FLOAT value, HYP_FLOAT start, HYP_FLOAT limit)
A macro that wraps a value around and around in a range.
Definition: hypatia.h:155
HYPAPI void quaternion_get_axis_anglev3(const struct quaternion *self, struct vector3 *vR, HYP_FLOAT *angle)
HYPAPI struct matrix3 * matrix3_add(struct matrix3 *self, const struct matrix3 *mT)
HYPAPI struct vector2 * matrix4_multiplyv2(const struct matrix4 *self, const struct vector2 *vT, struct vector2 *vR)
HYPAPI struct matrix3 * matrix3_identity(struct matrix3 *self)
HYPAPI struct vector3 * matrix4_multiplyv3_EXP(const struct matrix4 *m, const struct vector3 *vT, struct vector3 *vR)
HYPAPI int matrix2_equals(const struct matrix2 *self, const struct matrix2 *mT)
HYPAPI struct vector3 * vector3_multiplym4(struct vector3 *self, const struct matrix4 *mT)
HYPAPI HYP_FLOAT quaternion_magnitude(const struct quaternion *self)
HYPAPI struct vector4 * vector4_multiply(struct vector4 *self, const struct vector4 *vT)
HYPAPI struct matrix3 * matrix3_make_transformation_rotationf_z(struct matrix3 *self, HYP_FLOAT angle)
HYPAPI struct vector3 * vector3_setf3(struct vector3 *self, HYP_FLOAT xT, HYP_FLOAT yT, HYP_FLOAT zT)
#define HYP_COS(x)
Definition: hypatia.h:270
HYPAPI struct vector2 * vector2_addf(struct vector2 *self, HYP_FLOAT fT)
HYPAPI struct matrix2 * matrix2_subtract(struct matrix2 *self, const struct matrix2 *mT)
HYPAPI struct quaternion * quaternion_rotate_by_euler_angles_EXP(struct quaternion *self, HYP_FLOAT ax, HYP_FLOAT ay, HYP_FLOAT az)
HYPAPI struct matrix2 * matrix2_inverse(const struct matrix2 *self, struct matrix2 *mR)
HYPAPI int vector4_equals(const struct vector4 *self, const struct vector4 *vT)
#define scalar_equals
Definition: hypatia.h:261
HYPAPI struct vector2 * vector2_zero(struct vector2 *self)
HYPAPI struct vector2 * vector2_set(struct vector2 *self, const struct vector2 *vT)
HYPAPI struct matrix4 * matrix4_make_transformation_rotationf_y(struct matrix4 *self, HYP_FLOAT angle)
HYPAPI struct matrix3 * matrix3_multiplyf(struct matrix3 *self, HYP_FLOAT scalar)
HYPAPI struct matrix3 * matrix3_make_transformation_translationv2(struct matrix3 *self, const struct vector2 *translation)
HYPAPI void _matrix3_print_with_columnrow_indexer(struct matrix3 *self)
HYPAPI struct quaternion * quaternion_set(struct quaternion *self, const struct quaternion *qT)
HYPAPI struct vector3 * vector3_reflect_by_quaternion(struct vector3 *self, const struct quaternion *qT)
HYPAPI struct vector3 * vector3_subtract(struct vector3 *self, const struct vector3 *vT)
HYPAPI struct vector4 * vector4_zero(struct vector4 *self)
HYPAPI struct matrix4 * matrix4_make_transformation_scalingv3(struct matrix4 *self, const struct vector3 *scale)
HYPAPI struct quaternion * quaternion_set_from_axis_anglef3(struct quaternion *self, HYP_FLOAT x, HYP_FLOAT y, HYP_FLOAT z, HYP_FLOAT angle)
HYPAPI void _vector4_print(const struct vector4 *self)
HYPAPI struct quaternion * quaternion_negate(struct quaternion *self)
HYPAPI struct quaternion quaternion_cross_product_EXP(const struct quaternion *self, const struct quaternion *vT)
HYPAPI struct quaternion * quaternion_multiplyf(struct quaternion *self, HYP_FLOAT f)
HYPAPI struct quaternion * quaternion_slerp(const struct quaternion *start, const struct quaternion *end, HYP_FLOAT percent, struct quaternion *qR)
HYPAPI struct matrix2 * _matrix2_set_random(struct matrix2 *self)
HYPAPI struct vector2 * vector2_multiply(struct vector2 *self, const struct vector2 *vT)
#define HYP_SQRT(number)
A macro that finds the square root of a value.
Definition: hypatia.h:145
HYPAPI HYP_FLOAT vector3_dot_product(const struct vector3 *self, const struct vector3 *vT)
HYPAPI struct vector3 * vector3_multiplyf(struct vector3 *self, HYP_FLOAT fT)
HYPAPI uint8_t matrix4_transformation_decompose_EXP(struct matrix4 *self, struct vector3 *scale, struct quaternion *rotation, struct vector3 *translation)
HYPAPI HYP_FLOAT vector2_angle_between(const struct vector2 *self, const struct vector2 *vT)
HYPAPI struct quaternion * quaternion_nlerp(const struct quaternion *start, const struct quaternion *end, HYP_FLOAT percent, struct quaternion *qR)
HYPAPI int vector3_equals(const struct vector3 *self, const struct vector3 *vT)
HYPAPI struct quaternion * quaternion_rotate_by_quaternion_EXP(struct quaternion *self, const struct quaternion *qT)
HYPAPI struct matrix4 * matrix4_translatev3(struct matrix4 *self, const struct vector3 *translation)
HYPAPI struct matrix2 * matrix2_transpose(struct matrix2 *self)
HYPAPI struct vector2 * vector2_cross_product(struct vector2 *vR, const struct vector2 *vT1, const struct vector2 *vT2)
HYPAPI struct quaternion * quaternion_multiplyv3(struct quaternion *self, const struct vector3 *vT)
HYPAPI struct matrix4 * matrix4_make_transformation_rotationq(struct matrix4 *self, const struct quaternion *qT)
HYPAPI struct matrix2 * matrix2_add(struct matrix2 *self, const struct matrix2 *mT)
HYPAPI struct vector4 * vector4_subtract(struct vector4 *self, const struct vector4 *vT)
HYPAPI struct matrix3 * matrix3_inverse(const struct matrix3 *self, struct matrix3 *mR)
HYPAPI struct matrix2 * _matrix2_transpose_rowcolumn(struct matrix2 *self)
HYPAPI struct matrix3 * matrix3_rotate(struct matrix3 *self, HYP_FLOAT angle)
HYPAPI HYP_FLOAT vector3_distance(const struct vector3 *v1, const struct vector3 *v2)
HYPAPI struct quaternion * quaternion_setf4(struct quaternion *self, HYP_FLOAT x, HYP_FLOAT y, HYP_FLOAT z, HYP_FLOAT w)
HYPAPI struct matrix2 * matrix2_make_transformation_scalingv2(struct matrix2 *self, const struct vector2 *scale)
#define HYP_EPSILON
Epsilon. This is the value that is used to determine how much rounding error is tolerated.
Definition: hypatia.h:92
HYPAPI struct vector3 * vector3_cross_product(struct vector3 *vR, const struct vector3 *vT1, const struct vector3 *vT2)
HYPAPI struct vector2 * vector2_subtract(struct vector2 *self, const struct vector2 *vT)
HYPAPI short quaternion_is_pure(struct quaternion *self)
HYPAPI HYP_FLOAT vector3_angle_between(const struct vector3 *self, const struct vector3 *vT)
HYPAPI struct matrix4 * matrix4_multiply(struct matrix4 *self, const struct matrix4 *mT)
HYPAPI struct vector3 * vector3_negate(struct vector3 *self)
HYPAPI struct quaternion * quaternion_add(struct quaternion *self, const struct quaternion *qT)
HYPAPI struct vector4 * vector4_setf4(struct vector4 *self, HYP_FLOAT xT, HYP_FLOAT yT, HYP_FLOAT zT, HYP_FLOAT wT)
HYPAPI short scalar_equals_epsilonf(const HYP_FLOAT f1, const HYP_FLOAT f2, const HYP_FLOAT epsilon)
HYPAPI HYP_FLOAT quaternion_angle_between_EXP(const struct quaternion *self, const struct quaternion *qT)
HYPAPI struct matrix3 * matrix3_multiply(struct matrix3 *self, const struct matrix3 *mT)
HYPAPI struct quaternion * quaternion_normalize(struct quaternion *self)
HYPAPI struct matrix3 * matrix3_scalev2(struct matrix3 *self, const struct vector2 *scale)
HYPAPI struct matrix3 * matrix3_set(struct matrix3 *self, const struct matrix3 *mT)
HYPAPI struct vector3 * matrix4_get_translation_EXP(const struct matrix4 *self, struct vector3 *vT)
HYPAPI struct matrix3 * _matrix3_transpose_rowcolumn(struct matrix3 *self)
HYPAPI struct quaternion * quaternion_inverse(struct quaternion *self)
HYPAPI struct quaternion * quaternion_subtract(struct quaternion *self, const struct quaternion *qT)
HYPAPI struct matrix4 * matrix4_set_from_axisv3_angle_EXP(struct matrix4 *self, const struct vector3 *axis, HYP_FLOAT angle)
HYPAPI struct vector2 * vector2_divide(struct vector2 *self, const struct vector2 *vT)
HYPAPI struct matrix4 * matrix4_make_transformation_rotationf_x(struct matrix4 *self, HYP_FLOAT angle)
HYPAPI struct vector3 * vector3_addf(struct vector3 *self, HYP_FLOAT fT)
HYPAPI struct vector2 * vector2_multiplyf(struct vector2 *self, HYP_FLOAT fT)
HYPAPI struct matrix4 * matrix4_zero(struct matrix4 *self)
HYPAPI struct quaternion * quaternion_set_from_axis_anglev3(struct quaternion *self, const struct vector3 *axis, HYP_FLOAT angle)
HYPAPI struct vector3 * matrix4_multiplyv3(const struct matrix4 *self, const struct vector3 *vT, struct vector3 *vR)
HYPAPI HYP_FLOAT quaternion_norm(const struct quaternion *self)
HYPAPI struct vector3 * vector3_zero(struct vector3 *self)
HYPAPI struct matrix4 * matrix4_rotatev3(struct matrix4 *self, const struct vector3 *axis, HYP_FLOAT angle)
HYPAPI struct matrix2 * matrix2_multiplyf(struct matrix2 *self, HYP_FLOAT scalar)
#define HYP_ACOS(x)
Definition: hypatia.h:273
HYPAPI struct vector4 * vector4_divide(struct vector4 *self, const struct vector4 *vT)
HYPAPI HYP_FLOAT vector4_dot_product(const struct vector4 *self, const struct vector4 *vT)
HYPAPI struct vector3 * vector3_subtractf(struct vector3 *self, HYP_FLOAT fT)
HYPAPI struct vector4 * vector4_cross_product(struct vector4 *vR, const struct vector4 *vT1, const struct vector4 *vT2)
HYPAPI struct matrix3 * matrix3_translatev2(struct matrix3 *self, const struct vector2 *translation)
HYPAPI HYP_FLOAT matrix4_determinant(const struct matrix4 *self)
HYPAPI void _matrix3_print_with_rowcolumn_indexer(struct matrix3 *self)
HYPAPI struct matrix4 * matrix4_projection_ortho3d_rh_EXP(struct matrix4 *self, HYP_FLOAT xmin, HYP_FLOAT xmax, HYP_FLOAT ymin, HYP_FLOAT ymax, HYP_FLOAT zNear, HYP_FLOAT zFar)
HYPAPI struct vector3 * vector3_set(struct vector3 *self, const struct vector3 *vT)
HYPAPI struct vector4 * vector4_subtractf(struct vector4 *self, HYP_FLOAT fT)
HYPAPI struct vector2 * vector2_add(struct vector2 *self, const struct vector2 *vT)
HYPAPI int quaternion_equals(const struct quaternion *self, const struct quaternion *vT)
HYPAPI struct quaternion * quaternion_get_rotation_tov3(const struct vector3 *from, const struct vector3 *to, struct quaternion *qR)
HYPAPI HYP_FLOAT vector4_magnitude(const struct vector4 *self)
HYPAPI HYP_FLOAT vector4_distance(const struct vector4 *v1, const struct vector4 *v2)
Definition: hypatia.h:455
HYP_FLOAT r01
Definition: hypatia.h:474
HYP_FLOAT c00
Definition: hypatia.h:469
HYP_FLOAT m[4]
Definition: hypatia.h:457
HYP_FLOAT c01
Definition: hypatia.h:470
HYP_FLOAT i03
Definition: hypatia.h:465
HYP_FLOAT r00
Definition: hypatia.h:474
HYP_FLOAT c10
Definition: hypatia.h:469
HYP_FLOAT r10
Definition: hypatia.h:475
HYP_FLOAT r11
Definition: hypatia.h:475
HYP_FLOAT c11
Definition: hypatia.h:470
HYP_FLOAT m22[2][2]
Definition: hypatia.h:460
HYP_FLOAT i01
Definition: hypatia.h:465
HYP_FLOAT i00
Definition: hypatia.h:464
HYP_FLOAT i02
Definition: hypatia.h:464
Definition: hypatia.h:543
HYP_FLOAT r02
Definition: hypatia.h:564
HYP_FLOAT r11
Definition: hypatia.h:565
HYP_FLOAT c22
Definition: hypatia.h:560
HYP_FLOAT i02
Definition: hypatia.h:554
HYP_FLOAT r21
Definition: hypatia.h:566
HYP_FLOAT r10
Definition: hypatia.h:565
HYP_FLOAT c11
Definition: hypatia.h:559
HYP_FLOAT m[9]
Definition: hypatia.h:545
HYP_FLOAT c21
Definition: hypatia.h:559
HYP_FLOAT r22
Definition: hypatia.h:566
HYP_FLOAT i05
Definition: hypatia.h:554
HYP_FLOAT i00
Definition: hypatia.h:552
HYP_FLOAT i06
Definition: hypatia.h:552
HYP_FLOAT r01
Definition: hypatia.h:564
HYP_FLOAT i08
Definition: hypatia.h:554
HYP_FLOAT c10
Definition: hypatia.h:558
HYP_FLOAT i04
Definition: hypatia.h:553
HYP_FLOAT r20
Definition: hypatia.h:566
HYP_FLOAT c02
Definition: hypatia.h:560
HYP_FLOAT c20
Definition: hypatia.h:558
HYP_FLOAT i07
Definition: hypatia.h:553
HYP_FLOAT i01
Definition: hypatia.h:553
HYP_FLOAT c00
Definition: hypatia.h:558
HYP_FLOAT c12
Definition: hypatia.h:560
HYP_FLOAT m33[3][3]
Definition: hypatia.h:548
HYP_FLOAT r00
Definition: hypatia.h:564
HYP_FLOAT r12
Definition: hypatia.h:565
HYP_FLOAT i03
Definition: hypatia.h:552
HYP_FLOAT c01
Definition: hypatia.h:559
Definition: hypatia.h:638
HYP_FLOAT r01
Definition: hypatia.h:661
HYP_FLOAT r20
Definition: hypatia.h:663
HYP_FLOAT c12
Definition: hypatia.h:656
HYP_FLOAT r30
Definition: hypatia.h:664
HYP_FLOAT i15
Definition: hypatia.h:650
HYP_FLOAT r33
Definition: hypatia.h:664
HYP_FLOAT i05
Definition: hypatia.h:648
HYP_FLOAT i07
Definition: hypatia.h:650
HYP_FLOAT r22
Definition: hypatia.h:663
HYP_FLOAT r03
Definition: hypatia.h:661
HYP_FLOAT i14
Definition: hypatia.h:649
HYP_FLOAT c21
Definition: hypatia.h:655
HYP_FLOAT c01
Definition: hypatia.h:655
HYP_FLOAT i11
Definition: hypatia.h:650
HYP_FLOAT c23
Definition: hypatia.h:657
HYP_FLOAT i09
Definition: hypatia.h:648
HYP_FLOAT c00
Definition: hypatia.h:654
HYP_FLOAT c03
Definition: hypatia.h:657
HYP_FLOAT r21
Definition: hypatia.h:663
HYP_FLOAT r13
Definition: hypatia.h:662
HYP_FLOAT i03
Definition: hypatia.h:650
HYP_FLOAT r12
Definition: hypatia.h:662
HYP_FLOAT i01
Definition: hypatia.h:648
HYP_FLOAT i00
Definition: hypatia.h:647
HYP_FLOAT r32
Definition: hypatia.h:664
HYP_FLOAT r00
Definition: hypatia.h:661
HYP_FLOAT r23
Definition: hypatia.h:663
HYP_FLOAT c10
Definition: hypatia.h:654
HYP_FLOAT c30
Definition: hypatia.h:654
HYP_FLOAT i06
Definition: hypatia.h:649
HYP_FLOAT c11
Definition: hypatia.h:655
HYP_FLOAT c20
Definition: hypatia.h:654
HYP_FLOAT r11
Definition: hypatia.h:662
HYP_FLOAT i12
Definition: hypatia.h:647
HYP_FLOAT c02
Definition: hypatia.h:656
HYP_FLOAT c13
Definition: hypatia.h:657
HYP_FLOAT m[16]
Definition: hypatia.h:640
HYP_FLOAT r10
Definition: hypatia.h:662
HYP_FLOAT c31
Definition: hypatia.h:655
HYP_FLOAT r31
Definition: hypatia.h:664
HYP_FLOAT r02
Definition: hypatia.h:661
HYP_FLOAT i02
Definition: hypatia.h:649
HYP_FLOAT i13
Definition: hypatia.h:648
HYP_FLOAT i08
Definition: hypatia.h:647
HYP_FLOAT c33
Definition: hypatia.h:657
HYP_FLOAT i04
Definition: hypatia.h:647
HYP_FLOAT c22
Definition: hypatia.h:656
HYP_FLOAT m44[4][4]
Definition: hypatia.h:643
HYP_FLOAT c32
Definition: hypatia.h:656
HYP_FLOAT i10
Definition: hypatia.h:649
Definition: hypatia.h:740
HYP_FLOAT x
Definition: hypatia.h:744
HYP_FLOAT q[4]
Definition: hypatia.h:742
HYP_FLOAT a
Definition: hypatia.h:747
HYP_FLOAT y
Definition: hypatia.h:744
HYP_FLOAT w
Definition: hypatia.h:744
HYP_FLOAT j
Definition: hypatia.h:747
HYP_FLOAT z
Definition: hypatia.h:744
HYP_FLOAT i
Definition: hypatia.h:747
HYP_FLOAT k
Definition: hypatia.h:747
Definition: hypatia.h:311
HYP_FLOAT y
Definition: hypatia.h:315
HYP_FLOAT x
Definition: hypatia.h:315
HYP_FLOAT v[2]
Definition: hypatia.h:313
Definition: hypatia.h:359
HYP_FLOAT pitch
Definition: hypatia.h:366
HYP_FLOAT roll
Definition: hypatia.h:366
HYP_FLOAT x
Definition: hypatia.h:363
HYP_FLOAT y
Definition: hypatia.h:363
HYP_FLOAT v[3]
Definition: hypatia.h:361
HYP_FLOAT z
Definition: hypatia.h:363
HYP_FLOAT yaw
Definition: hypatia.h:366
Definition: hypatia.h:412
HYP_FLOAT x
Definition: hypatia.h:416
HYP_FLOAT w
Definition: hypatia.h:416
HYP_FLOAT z
Definition: hypatia.h:416
HYP_FLOAT v[4]
Definition: hypatia.h:414
HYP_FLOAT y
Definition: hypatia.h:416