intersects-edge-node? ( source direction edge -- ? )


Vocabulary
gml.viewer

Inputs
sourcean object
directionan object
edgean object


Outputs
?an object


Definition


:: 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 ;