Revert "Fixed boundingBox.withOffset() (#2488)"

This reverts commit 18d6e0c6d6, it was previously a breaking change that did not make a lot of sense, and broke other methods.
This commit is contained in:
mworzala 2025-01-04 11:37:21 -05:00
parent 07bd1c12b6
commit 10d6d2bb2e
No known key found for this signature in database
GPG Key ID: B148F922E64797C7

View File

@ -21,11 +21,11 @@ public record BoundingBox(Vec relativeStart, Vec relativeEnd) implements Shape {
final static BoundingBox ZERO = new BoundingBox(Vec.ZERO, Vec.ZERO);
public BoundingBox(double width, double height, double depth, Point offset) {
this(new Vec(-width / 2.0, 0.0, -depth / 2.0).add(offset), new Vec(width / 2.0, height, depth / 2.0).add(offset));
this(Vec.fromPoint(offset), new Vec(width, height, depth).add(offset));
}
public BoundingBox(double width, double height, double depth) {
this(width, height, depth, Vec.ZERO);
this(width, height, depth, new Vec(-width / 2, 0, -depth / 2));
}
@Override