fixing fit tests

This commit is contained in:
LarsBrubaker 2021-10-27 20:53:27 -07:00
parent 1dca5188d3
commit c84aeb2675
3 changed files with 5 additions and 2 deletions

View file

@ -330,6 +330,7 @@ namespace MatterControl.Tests.MatterControl
fit.Width = 50;
fit.Depth = 20;
fit.Height = 20;
fit.Invalidate(InvalidateType.Properties);
root.Children.Add(fit);
var rootAabb = root.GetAxisAlignedBoundingBox();
Assert.IsTrue(rootAabb.Equals(new AxisAlignedBoundingBox(new Vector3(-25, -10, -10), new Vector3(25, 10, 10)), .001));
@ -530,6 +531,7 @@ namespace MatterControl.Tests.MatterControl
fit.Width = 10;
fit.Depth = 10;
fit.Height = 6;
fit.Invalidate(InvalidateType.Properties);
Assert.IsTrue(fit.GetAxisAlignedBoundingBox().Equals(new AxisAlignedBoundingBox(new Vector3(-5, -5, -10), new Vector3(5, 5, -4)), .01));
@ -640,6 +642,7 @@ namespace MatterControl.Tests.MatterControl
fit.Width = 50;
fit.Depth = 20;
fit.Height = 20;
fit.Invalidate(InvalidateType.Properties);
Assert.IsTrue(fit.GetAxisAlignedBoundingBox().Equals(new AxisAlignedBoundingBox(new Vector3(-25, -10, -10), new Vector3(25, 10, 10)), 1.0));