How does Ray intersectionSegment threshold works?

I don’t really understand how the threshold works in the intersectionSegment function of an Ray instance.

In the second case (right part) of this PG i think that i should retrieve -1 with a 0.99 threshold but it’s not.

Could someone explain me ?

1 Like

The threshold represents the distance between the two closest points of the segments IIRC.

1 Like

I don’t understand what’s the IIRC segment :thinking:

The 2 closest points you mean should be the 2 points of the yellow line in this PG, shouldn’t it ?

IIRC → If I Recall Correctly :slight_smile:

Basically the algorithm is an implementation of Point, Line, Plane (The shortest line between two lines in 3D)

In your case the yellow line is not correct as it is not perpendicular to both lines.

mmhh, i think i understand more, thanks