@Test public void testSet() throws Exception { Vec3 n = new Vec3(3, 4, 5).normalize(); double distance = 6; Plane plane = new Plane(0, 0, 1, 10); plane.set(n.x, n.y, n.z, distance); assertEquals("normal", n, plane.normal); assertEquals("distance", distance, plane.distance, 0); }
public Plane set(double x, double y, double z, double distance) { this.normal.x = x; this.normal.y = y; this.normal.z = z; this.distance = distance; this.normalizeIfNeeded(); return this; }
Plane { public Plane set(double x, double y, double z, double distance) { this.normal.x = x; this.normal.y = y; this.normal.z = z; this.distance = distance; this.normalizeIfNeeded(); return this; } }
Plane { public Plane set(double x, double y, double z, double distance) { this.normal.x = x; this.normal.y = y; this.normal.z = z; this.distance = distance; this.normalizeIfNeeded(); return this; } Plane();  Plane(double x, double y, double z, double distance);  Plane(Plane plane); }
Plane { public Plane set(double x, double y, double z, double distance) { this.normal.x = x; this.normal.y = y; this.normal.z = z; this.distance = distance; this.normalizeIfNeeded(); return this; } Plane();  Plane(double x, double y, double z, double distance);  Plane(Plane plane); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); double distanceToPoint(Vec3 point); Plane set(double x, double y, double z, double distance); Plane set(Plane plane); Plane transformByMatrix(Matrix4 matrix); double dot(Vec3 vector); boolean intersectsSegment(Vec3 endPoint1, Vec3 endPoint2); int onSameSide(Vec3 pointA, Vec3 pointB); Vec3[] clip(Vec3 pointA, Vec3 pointB); }
Plane { public Plane set(double x, double y, double z, double distance) { this.normal.x = x; this.normal.y = y; this.normal.z = z; this.distance = distance; this.normalizeIfNeeded(); return this; } Plane();  Plane(double x, double y, double z, double distance);  Plane(Plane plane); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); double distanceToPoint(Vec3 point); Plane set(double x, double y, double z, double distance); Plane set(Plane plane); Plane transformByMatrix(Matrix4 matrix); double dot(Vec3 vector); boolean intersectsSegment(Vec3 endPoint1, Vec3 endPoint2); int onSameSide(Vec3 pointA, Vec3 pointB); Vec3[] clip(Vec3 pointA, Vec3 pointB);  }