Torque 3D 3.8
ContentsIndexHome
PreviousUpNext
MathUtils::segmentSegmentNearest Function
Syntax
C++
F32 segmentSegmentNearest(const Point3F & p1, const Point3F & q1, const Point3F & p2, const Point3F & q2, F32 & s, F32 & t, Point3F & c1, Point3F & c2);

Intersect two line segments (p1,q1) and (p2,q2), returning points on lines (c1 & c2) and line parameters (s,t). Based on routine from "Real Time Collision Detection" by Christer Ericson pp 149. 

 

Copyright (c) 2015. All rights reserved.
What do you think about this topic? Send feedback!