public float GetDistanceToPoint(Vec3 point) { return(Vec3.Dot(normal, point) + distance); }
public static MyPlane Translate(MyPlane plane, Vec3 translation) { return(new MyPlane(plane.normal, plane.distance += Vec3.Dot(plane.normal, translation))); }
public void Translate(Vec3 translation) { distance += Vec3.Dot(normal, translation); }
public MyPlane(Vec3 inNormal, Vec3 inPoint) { normal = inNormal.normalized; distance = -Vec3.Dot(normal, inPoint); }
public void SetNormalAndPosition(Vec3 inNormal, Vec3 inPoint) { normal = inNormal.normalized; distance = -Vec3.Dot(inNormal, inPoint); }