Handbook
Glossary
intersects-edge-node? ( source direction edge -- ? )
Vocabulary
gml
.
viewer
Inputs
source
an
object
direction
an
object
edge
an
object
Outputs
?
an
object
Definition
USING:
accessors
kernel
math
math.order
math.vectors
;
IN:
gml.viewer
::
intersects-edge-node?
( source direction edge -- ? )
edge
vertex>>
position>>
double-4>float-4
:>
edge-source
edge
opposite-edge>>
vertex>>
position>>
double-4>float-4
edge-source
v-
:>
edge-direction source direction edge-source
edge-direction
line-nearest-t
:>
( ray-t edge-t ) ray-t 0.0
>=
edge-t 0.0 0.5
between?
and
[
source direction ray-t
v*n
v+
edge-source edge-direction edge-t
v*n
v+
v-
norm
edge-hitbox-radius
<
]
[
f
]
if
;