-
Notifications
You must be signed in to change notification settings - Fork 1
/
raymath.scm
87 lines (73 loc) · 3.07 KB
/
raymath.scm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
;; raymath
(foreign-constructor* make-matrix
matrix
"Matrix"
((float m0) (float m4) (float m8) (float m12)
(float m1) (float m5) (float m9) (float m13)
(float m2) (float m6) (float m10) (float m14)
(float m3) (float m7) (float m11) (float m15)))
(foreign-constructor matrix-identity
"MatrixIdentity"
matrix
(c-pointer (struct Matrix)))
(foreign-constructor matrix-invert
"MatrixInvert"
matrix
(c-pointer (struct Matrix))
(((c-pointer (struct Matrix)) targetMatrix)))
(foreign-constructor matrix-multiply
"MatrixMultiply"
matrix
(c-pointer (struct Matrix))
(((c-pointer (struct Matrix)) left)
((c-pointer (struct Matrix)) right)))
(foreign-constructor matrix-rotate
"MatrixRotate"
matrix
(c-pointer (struct Matrix))
(((c-pointer (struct Vector3)) axis)
(float angle)))
(foreign-constructor matrix-rotate-x
"MatrixRotateX"
matrix
(c-pointer (struct Matrix))
((float angle)))
(foreign-constructor matrix-rotate-y
"MatrixRotateY"
matrix
(c-pointer (struct Matrix))
((float angle)))
(foreign-constructor matrix-rotate-z
"MatrixRotateZ"
matrix
(c-pointer (struct Matrix))
((float angle)))
(foreign-constructor vector-3-add
"Vector3Add"
vector-3
(c-pointer (struct Vector3))
(((c-pointer (struct Vector3)) vector1)
((c-pointer (struct Vector3)) vector2)))
(foreign-constructor vector-3-negate
"Vector3Negate"
vector-3
(c-pointer (struct Vector3))
(((c-pointer (struct Vector3)) vector)))
(foreign-constructor vector-3-scale
"Vector3Scale"
vector-3
(c-pointer (struct Vector3))
(((c-pointer (struct Vector3)) vector)
(float scale)))
(foreign-constructor vector-3-substract
"Vector3Subtract"
vector-3
(c-pointer (struct Vector3))
(((c-pointer (struct Vector3)) vector1)
((c-pointer (struct Vector3)) vector2)))
(foreign-constructor vector-3-transform
"Vector3Transform"
vector-3
(c-pointer (struct Vector3))
(((c-pointer (struct Vector3)) vector)
((c-pointer (struct Matrix)) matrix)))