Handbook
Glossary
get-ray-collision-model ( ray model -- ray-collision )
Vocabulary
raylib
Inputs
ray
a
Ray
model
a
Model
Outputs
ray-collision
a
RayCollision
Definition
USING:
accessors
alien
classes.struct
kernel
math
;
IN:
raylib
:
get-ray-collision-model
( ray model -- ray-collision )
[
RayCollision
<struct>
]
2dip
dup
meshCount>>
[
swap
dup
[
_meshes>>
<displaced-alien>
]
[
transform>>
]
bi*
get-ray-collision-mesh
dup
hit>>
[
over
hit>>
[
2dup
[
distance>>
]
bi@
<
]
[
t
]
if
[
nip
]
[
drop
]
if
]
[
drop
]
if
]
2with
each-integer
;