mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-28 16:54:04 +00:00
Reach slope-tilted objects as far as a vertical rotation
A placement that turns towards the slope can tilt a tall object even when its configured rotation is disabled, so its reach counted only the horizontal footprint and the write and read windows cut it off at chunk seams. Count it like a vertical rotation: the tallest dimension as footprint and the full translation vector. Upstream:7aaf346ceb34e5e767
This commit is contained in:
1 parent
971cad0463
commit
867851366d
2 files changed
+19
-6
No files matched your search
@@ -60,6 +60,18 @@ public class PlacementReachTest {
|
||||
assertEquals(53, PlacementReach.of(new ObjectSize(5, 48, 7), placement));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void slopeTiltReachesAsFarAsAVerticalRotationEvenWhenTheRotationIsDisabled() {
|
||||
String disabledRotation = "\"rotation\":{\"enabled\":false}";
|
||||
ObjectPlacement flat = TestSettings.of(ObjectPlacement.class, "{" + disabledRotation + ",\"translate\":{\"x\":3,\"y\":4}}");
|
||||
ObjectPlacement tilted = TestSettings.of(ObjectPlacement.class,
|
||||
"{" + disabledRotation + ",\"rotateTowardsSlope\":true,\"translate\":{\"x\":3,\"y\":4}}");
|
||||
ObjectSize tallObject = new ObjectSize(5, 48, 7);
|
||||
|
||||
assertEquals(10, PlacementReach.of(tallObject, flat));
|
||||
assertEquals(53, PlacementReach.of(tallObject, tilted));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void scaleWarpAndVacuumExpandPlacementReach() {
|
||||
ObjectPlacement placement = TestSettings.of(ObjectPlacement.class,
|
||||
|
||||
Reference in new issue
Block a user