*p | Point data |
*pl | Line data |
*cp | Coordinates of the base of the perpendicular from the point p to the line l |
NJS_POINT3 p, cp; NJS_PLANE pl; p.x = 100.f; p.y = 100.f; p.z = 100.f; pl.px = 0.f; pl.py = 0.f; pl.pz = 0.f; pl.vx = 0.f; pl.vy = 0.f; pl.vz = 1.f; njDistanceP2PL(&p, &pl, &cp); % Result % Return : 100.000000 cp (100, 100, 0)