Fix widget ordering to restore layer view controls

- Less coupling to MeshViewerWidget
- Interaction layer concept/surface added for IA volumes
  - Holds most IA volume logic and controls
This commit is contained in:
John Lewin 2017-07-11 08:10:57 -07:00
parent 903347e5bd
commit dda6f89c2b
12 changed files with 309 additions and 237 deletions

View file

@ -54,7 +54,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
private View3DWidget view3DWidget;
public SelectionShadow(View3DWidget view3DWidget)
: base(null, view3DWidget.meshViewerWidget)
: base(null, view3DWidget.InteractionLayer)
{
this.view3DWidget = view3DWidget;
}
@ -117,11 +117,11 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
public override void DrawGlContent(EventArgs e)
{
if (MeshViewerToDrawWith.Scene.HasSelection
&& MeshViewerToDrawWith.Scene.ShowSelectionShadow)
if (InteractionContext.Scene.HasSelection
&& InteractionContext.Scene.ShowSelectionShadow)
{
// draw the bounds on the bed
AxisAlignedBoundingBox selectedBounds = MeshViewerToDrawWith.Scene.SelectedItem.GetAxisAlignedBoundingBox(Matrix4X4.Identity);
AxisAlignedBoundingBox selectedBounds = InteractionContext.Scene.SelectedItem.GetAxisAlignedBoundingBox(Matrix4X4.Identity);
var withScale = Matrix4X4.CreateScale(selectedBounds.XSize, selectedBounds.YSize, 1) * TotalTransform;