-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
package.lisp
120 lines (110 loc) · 3.6 KB
/
package.lisp
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#|
This file is a part of 3d-math
(c) 2023 Shirakumo http://shirakumo.org (shirakumo@tymoon.eu)
|#
(eval-when (:compile-toplevel :load-toplevel :execute)
#-3d-math-u32 (push :3d-math-no-u32 *features*)
#-3d-math-no-f32 (push :3d-math-f32 *features*)
#-3d-math-no-f64 (push :3d-math-f64 *features*)
#-3d-math-no-i32 (push :3d-math-i32 *features*))
#+sbcl
(eval-when (:compile-toplevel)
(when (< (floor (sb-ext:dynamic-space-size) (* 1024 1024 1024)) 4)
(error "3d-Math requires at least 4GB of dynamic space size to compile
SBCL is currently configured for ~dGB
Make sure SBCL is built or run with --dynamic-space-size 4Gb or more."
(ceiling (sb-ext:dynamic-space-size) (* 1024 1024 1024)))))
(defpackage #:org.shirakumo.fraf.math.internal
(:use #:cl #:org.shirakumo.type-templates)
(:import-from #:org.shirakumo.type-templates #:dbg #:lambda-list-variables)
(:export
#:dbg
#:lambda-list-variables)
;; template types
(:export
#:<t>
#:<s>
#:vec-type
#:mat-type
#:quat-type
#:quat2-type
#:transform-type
#:attribute
#:n
#:rows
#:cols
#:arr
#:*zero
#:*as)
;; toolkit.lisp
(:export
#:*matrix-limit*
#:dimension
#:index
#:enlist
#:f32
#:f64
#:u32
#:i32
#:type-array
#:type-prefix
#:sqr
#:sqr2
#:grid
#:sqrt+
#:lerp
#:clamp
#:type-random
#:~=
#:ensure-function
#:do-times
#:zero
#:eye
#:rand
#:define-exports
#:do-type-combinations
#:do-instance-combinations
#:define-type-reductor
#:define-value-reductor
#:define-pure-alias
#:define-modifying-alias
#:define-simple-alias
#:define-rest-alias
#:define-slot-accessor))
(unless (find-package '#:org.shirakumo.fraf.math.vectors)
(make-package '#:org.shirakumo.fraf.math.vectors
:use '(#:cl
#:org.shirakumo.type-templates
#:org.shirakumo.fraf.math.internal))
(make-package '#:org.shirakumo.fraf.math.matrices
:use '(#:cl
#:org.shirakumo.type-templates
#:org.shirakumo.fraf.math.internal
#:org.shirakumo.fraf.math.vectors))
(make-package '#:org.shirakumo.fraf.math.quaternions
:use '(#:cl
#:org.shirakumo.type-templates
#:org.shirakumo.fraf.math.internal
#:org.shirakumo.fraf.math.vectors
#:org.shirakumo.fraf.math.matrices))
(make-package '#:org.shirakumo.fraf.math.dual-quaternions
:use '(#:cl
#:org.shirakumo.type-templates
#:org.shirakumo.fraf.math.internal
#:org.shirakumo.fraf.math.vectors
#:org.shirakumo.fraf.math.matrices
#:org.shirakumo.fraf.math.quaternions))
(make-package '#:org.shirakumo.fraf.math.transforms
:use '(#:cl
#:org.shirakumo.type-templates
#:org.shirakumo.fraf.math.internal
#:org.shirakumo.fraf.math.vectors
#:org.shirakumo.fraf.math.matrices
#:org.shirakumo.fraf.math.quaternions
#:org.shirakumo.fraf.math.dual-quaternions))
(make-package '#:org.shirakumo.fraf.math
:use '(#:org.shirakumo.fraf.math.vectors
#:org.shirakumo.fraf.math.matrices
#:org.shirakumo.fraf.math.quaternions
#:org.shirakumo.fraf.math.transforms
#:org.shirakumo.fraf.math.dual-quaternions)))