mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-26 22:10:18 +00:00
Bound slope placement rotation
- Use the radial three-dimensional bound whenever rotateTowardsSlope is set, including placements whose configured rotation is disabled - Group the support read margin helper with the other static factories
This commit is contained in:
1 parent
7aaf346ce3
commit
b34e5e7676
2 files changed
+20
-9
No files matched your search
@@ -107,6 +107,15 @@ public class PlacementReachTest {
|
||||
assertEquals(14, PlacementReach.of(object, placement, 1D).horizontal());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void slopeRotationIsBoundedEvenWhenTheConfiguredRotationIsDisabled() {
|
||||
IrisObject object = singleBlockObject(21, 9, 21);
|
||||
IrisObjectPlacement placement = new IrisObjectPlacement().setRotation(IrisObjectRotation.of(0D, 0D, 0D));
|
||||
|
||||
assertEquals(10, PlacementReach.of(object, placement, 1D).horizontal());
|
||||
assertEquals(15, PlacementReach.of(object, placement.setRotateTowardsSlope(true), 1D).horizontal());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void unionKeepsTheLargestReachAndTheLargestInput() {
|
||||
PlacementReach union = new PlacementReach(10, 2).union(new PlacementReach(4, 12));
|
||||
|
||||
Reference in new issue
Block a user