*p | Data array describing three points in the plane |
*v | Normal vector to the plane |
The following finds the vector that is normal to the plane passing through points (1, 2, 3), (1, -1, 2), and (2, 3, 1). NJS_POINT3 p[3]; NJS_VECTOR v; p[0].x = 1.f; p[0].y = 2.f; p[0].z = 3.f; p[1].x = 1.f; p[1].y = -1,f; p[1].z = 2.f; p[2].x = 2.f; p[2].y = 3.f; p[2].z = 1.f; njGetPlaneNormal(p, &v); % Result % v (7, -1, 3)