-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpackage.lisp
140 lines (135 loc) · 3.64 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
(defpackage #:org.shirakumo.fraf.trial.space
(:use #:cl #:org.shirakumo.fraf.math)
(:local-nicknames
(#:sequences #:org.shirakumo.trivial-extensible-sequences))
(:intern
#:ensure-function
#:clamp
#:box-intersects-box-p
#:box-contains-box-p
#:sphere-intersects-box-p
#:ray-intersects-box-p)
(:export
#:location
#:bsize
#:radius
#:bounding-box
#:oriented-bounding-box
#:bounding-sphere
#:geometry
#:group
#:ensure-region
#:check
#:clear
#:reoptimize
#:object-count
#:enter
#:leave
#:update
#:call-with-all
#:call-with-candidates
#:call-with-overlapping
#:call-with-contained
#:call-with-intersecting
#:call-with-pairs
#:container
#:container-p
#:region
#:region-size
#:region*
#:sphere
#:sphere-radius
#:plane
#:plane-distance
#:mesh
#:mesh-vertices
#:mesh-faces
#:do-all
#:do-candidates
#:do-contained
#:do-overlapping
#:do-intersecting
#:do-pairs
#:find-region
#:region-overlaps-p
#:region-contains-p
#:serialize
#:deserialize))
(macrolet ((defpackage* (name &rest args)
`(defpackage ,name
,@args
(:local-nicknames
(#:sequences #:org.shirakumo.trivial-extensible-sequences))
(:export ,@(loop for s being the external-symbols of '#:org.shirakumo.fraf.trial.space
collect s)))))
(defpackage* #:org.shirakumo.fraf.trial.space.bvh2
(:use #:cl #:org.shirakumo.fraf.math #:org.shirakumo.fraf.trial.space)
(:import-from #:org.shirakumo.fraf.trial.space
#:ensure-function)
(:export
#:bvh
#:make-bvh
#:bvh-insert
#:bvh-remove
#:bvh-update
#:bvh-lines))
(defpackage* #:org.shirakumo.fraf.trial.space.grid3
(:use #:cl #:org.shirakumo.fraf.math #:org.shirakumo.fraf.trial.space)
(:import-from #:org.shirakumo.fraf.trial.space
#:clamp
#:ensure-function)
(:export
#:grid
#:make-grid
#:grid-resize
#:grid-move
#:grid-insert
#:grid-remove
#:grid-update))
(defpackage* #:org.shirakumo.fraf.trial.space.bsp
(:use #:cl #:org.shirakumo.fraf.math #:org.shirakumo.fraf.trial.space)
(:import-from #:org.shirakumo.fraf.trial.space
#:ensure-function)
(:export #:make-bsp #:make-mesh-input-data
#:bsp-user-data-array
#:ray-result-x
#:ray-result-y
#:ray-result-z
#:ray-result-leaf-mesh
#:ray-result-leaf-user-data
#:aabb-result-leaf-mesh
#:aabb-result-leaf-user-data))
(defpackage* #:org.shirakumo.fraf.trial.space.quadtree
(:use #:cl #:org.shirakumo.fraf.math #:org.shirakumo.fraf.trial.space)
(:import-from #:org.shirakumo.fraf.trial.space
#:ensure-function)
(:export
#:quadtree
#:make-quadtree
#:make-quadtree-at
#:quadtree-insert
#:quadtree-remove
#:quadtree-update
#:quadtree-find-all
#:quadtree-find-overlaps
#:quadtree-find-overlaps-in
#:quadtree-find-contained
#:quadtree-find-contained-in
#:quadtree-find-for
#:quadtree-lines))
(defpackage* #:org.shirakumo.fraf.trial.space.kd-tree
(:use #:cl #:org.shirakumo.fraf.math #:org.shirakumo.fraf.trial.space)
(:import-from #:org.shirakumo.fraf.trial.space
#:ensure-function
#:box-intersects-box-p
#:box-contains-box-p
#:sphere-intersects-box-p
#:ray-intersects-box-p)
(:export
#:kd-tree
#:make-kd-tree
#:kd-tree-insert
#:kd-tree-remove
#:kd-tree-nearest
#:kd-tree-k-nearest
#:kd-tree-call-with-nearest)))