Handbook
Glossary
intersect-scene ( hit ray scene -- hit )
Vocabulary
benchmark
.
raytracer-simd
Inputs
hit
an
object
ray
an
object
scene
an
object
Outputs
hit
an
object
Definition
USING:
accessors
combinators
kernel
math.vectors
sequences
;
IN:
benchmark.raytracer-simd
:
intersect-scene
( hit ray scene -- hit )
{
{
[
dup
group?
]
[
[
drop
objs>>
[
intersect-scene
]
with
each
]
if-ray-sphere
]
}
{
[
dup
sphere?
]
[
[
[
sphere-n
normalize
]
keep
<hit>
nip
]
if-ray-sphere
]
}
}
cond
;
inline
recursive