Handbook
Glossary
intersect-scene ( hit ray scene -- hit )
Vocabulary
benchmark
.
raytracer
Inputs
hit
an
object
ray
an
object
scene
an
object
Outputs
hit
an
object
Definition
IN:
benchmark.raytracer
GENERIC:
intersect-scene
( hit ray scene -- hit )
Methods
USING:
accessors
benchmark.raytracer
kernel
sequences
;
M:
group
intersect-scene
[
drop
objs>>
[
intersect-scene
]
with
each
]
if-ray-sphere
;
USING:
benchmark.raytracer
kernel
math.vectors
;
M:
sphere
intersect-scene
[
[
sphere-n
normalize
]
keep
<hit>
nip
]
if-ray-sphere
;