Jitter.Collision.GJKCollide.VoronoiSimplexSolver.PointOutsideOfPlane C# (CSharp) Method

PointOutsideOfPlane() public method

public PointOutsideOfPlane ( JVector p, JVector a, JVector b, JVector c, JVector d ) : int
p JVector
a JVector
b JVector
c JVector
d JVector
return int
            public int PointOutsideOfPlane(JVector p, JVector a, JVector b, JVector c, JVector d)
            {
                JVector normal = JVector.Cross(b - a, c - a);

                float signp = JVector.Dot(p - a, normal); // [AP AB AC]
                float signd = JVector.Dot(d - a, normal); // [AD AB AC]

                //if (CatchDegenerateTetrahedron)
                    if (signd * signd < (1e-4f * 1e-4f)) return -1;

                // Points on opposite sides if expression signs are opposite
                return signp * signd < 0f ? 1 : 0;
            }