Skip to main content

orient3d_fast

orient3d_fast(points, a, b, c, d) ⇒ number

Non-robust

Return a positive value if the point pd lies below the plane passing through pa, pb, and pc; "below" is defined so that pa, pb, and pc appear in counterclockwise order when viewed from above the plane. Returns a negative value if pd lies above the plane. Returns zero if the points are coplanar. The result is also a rough approximation of six times the signed volume of the tetrahedron defined by the four points.

NOTE: ported from http://www.cs.cmu.edu/afs/cs/project/quake/public/code/predicates.c

Kind: global function

ParamTypeDescription
pointsArray.<number>
anumberindex of point a
bnumberindex of point b
cnumberindex of point c
dnumberindex of point d