public static bool isForeFace(Point3d pt1, Point3d pt2, Point3d pt3) // pts on a plane { Vector3d v1 = new Vector3d(pt2, pt1); Vector3d v2 = new Vector3d(pt2, pt3); Vector3d v = v1.CrossProduct(v2); return(v.DotProduct(new Vector3d(0, 0, 1)) < 0); }
public static bool isBackFace(Point3d pt1, Point3d pt2, Point3d pt3) { Vector3d v1 = new Vector3d(pt2, pt1); Vector3d v2 = new Vector3d(pt2, pt3); Vector3d v = v1.CrossProduct(v2); return(v.DotProduct(new Vector3d(0, 0, 1)) > 0); }