@Test public void testCreatePlaneFromOffAxisLines() { Line line1 = Line.fromSegment(new Vec4(0, 0, 10), new Vec4(1, 0, 10)); Line line2 = Line.fromSegment(new Vec4(0, 0, 10), new Vec4(0, 1, 10)); Plane result = GeometryUtil.createPlaneContainingLines(line1, line2); assertNotNull(result); testIntersection(result, new Vec4(0, 0, -1), new Vec4(0, 0, 1), new Vec4(0, 0, 10)); testIntersection(result, new Vec4(0, 10, -1), new Vec4(0, 10, 1), new Vec4(0, 10, 10)); }
public static Plane createPlaneContainingLines(Line line1, Line line2) { Validate.isTrue(line1 != null && line2 != null, "Two lines are required to create a plane in 3D space"); Vec4 point1 = line1.getPointAt(0); Vec4 point2 = line1.getPointAt(1000); Vec4 point3 = line2.getPointAt(500); return createPlaneFromThreePoints(point1, point2, point3); }
GeometryUtil { public static Plane createPlaneContainingLines(Line line1, Line line2) { Validate.isTrue(line1 != null && line2 != null, "Two lines are required to create a plane in 3D space"); Vec4 point1 = line1.getPointAt(0); Vec4 point2 = line1.getPointAt(1000); Vec4 point3 = line2.getPointAt(500); return createPlaneFromThreePoints(point1, point2, point3); } }
GeometryUtil { public static Plane createPlaneContainingLines(Line line1, Line line2) { Validate.isTrue(line1 != null && line2 != null, "Two lines are required to create a plane in 3D space"); Vec4 point1 = line1.getPointAt(0); Vec4 point2 = line1.getPointAt(1000); Vec4 point3 = line2.getPointAt(500); return createPlaneFromThreePoints(point1, point2, point3); }  }
GeometryUtil { public static Plane createPlaneContainingLines(Line line1, Line line2) { Validate.isTrue(line1 != null && line2 != null, "Two lines are required to create a plane in 3D space"); Vec4 point1 = line1.getPointAt(0); Vec4 point2 = line1.getPointAt(1000); Vec4 point3 = line2.getPointAt(500); return createPlaneFromThreePoints(point1, point2, point3); }  static Plane createPlaneContainingLines(Line line1, Line line2); static Plane createPlaneFromThreePoints(Vec4 point1, Vec4 point2, Vec4 point3); }
GeometryUtil { public static Plane createPlaneContainingLines(Line line1, Line line2) { Validate.isTrue(line1 != null && line2 != null, "Two lines are required to create a plane in 3D space"); Vec4 point1 = line1.getPointAt(0); Vec4 point2 = line1.getPointAt(1000); Vec4 point3 = line2.getPointAt(500); return createPlaneFromThreePoints(point1, point2, point3); }  static Plane createPlaneContainingLines(Line line1, Line line2); static Plane createPlaneFromThreePoints(Vec4 point1, Vec4 point2, Vec4 point3);  }