/// <summary>Creates a plane from 3 points that are directly on that plane.</summary> /// <param name="pointOnPlane1">First point on the plane.</param> /// <param name="pointOnPlane2">Second point on the plane.</param> /// <param name="pointOnPlane3">Third point on the plane.</param> public Plane(Vec3 pointOnPlane1, Vec3 pointOnPlane2, Vec3 pointOnPlane3) { Vec3 dir1 = pointOnPlane2 - pointOnPlane1; Vec3 dir2 = pointOnPlane2 - pointOnPlane3; normal = Vec3.Cross(dir1, dir2); d = -Vec3.Dot(pointOnPlane2, normal); }