Simplify - use overload with default identity matrix

This commit is contained in:
John Lewin 2019-05-21 07:27:58 -07:00
parent 025fcb883a
commit 3717d284a7
17 changed files with 58 additions and 57 deletions

View file

@ -53,7 +53,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
public override void SetPosition(IObject3D selectedItem)
{
AxisAlignedBoundingBox selectedBounds = selectedItem.GetAxisAlignedBoundingBox(Matrix4X4.Identity);
AxisAlignedBoundingBox selectedBounds = selectedItem.GetAxisAlignedBoundingBox();
Vector3 boundsCenter = selectedBounds.Center;
TotalTransform = Matrix4X4.CreateTranslation(new Vector3(boundsCenter.X, boundsCenter.Y, 0.1));
@ -76,7 +76,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
&& InteractionContext.Scene.ShowSelectionShadow)
{
// draw the bounds on the bed
AxisAlignedBoundingBox selectedBounds = selectedItem.GetAxisAlignedBoundingBox(Matrix4X4.Identity);
AxisAlignedBoundingBox selectedBounds = selectedItem.GetAxisAlignedBoundingBox();
var withScale = Matrix4X4.CreateScale(selectedBounds.XSize, selectedBounds.YSize, 1) * TotalTransform;
GLHelper.Render(GetNormalShadowMesh(), shadowColor, withScale, RenderTypes.Shaded);