private void UpdateViews() { TopView.Perspective = HullControl.PerspectiveType.TOP; SideView.Perspective = HullControl.PerspectiveType.SIDE; FrontView.Perspective = HullControl.PerspectiveType.FRONT; // Need to invoke the setter to regenerate the hull. PerspectiveView.Perspective = PerspectiveView.Perspective; TopView.InvalidateVisual(); FrontView.InvalidateVisual(); SideView.InvalidateVisual(); PerspectiveView.InvalidateVisual(); }
private void UpdateViews() { EditableHull topView = new EditableHull(myHull); topView.Rotate(0, 90, 90); TopView.editableHull = topView; TopView.perspective = HullControl.PerspectiveType.TOP; EditableHull sideView = new EditableHull(myHull); sideView.Rotate(0, 90, 180); SideView.editableHull = sideView; SideView.perspective = HullControl.PerspectiveType.SIDE; EditableHull frontView = new EditableHull(myHull); frontView.Rotate(0, 0, 180); FrontView.editableHull = frontView; FrontView.perspective = HullControl.PerspectiveType.FRONT; EditableHull perspectiveView = new EditableHull(myHull); switch (PerspectiveView.perspective) { case HullControl.PerspectiveType.FRONT: perspectiveView.Rotate(0, 0, 180); break; case HullControl.PerspectiveType.TOP: perspectiveView.Rotate(0, 90, 90); break; case HullControl.PerspectiveType.SIDE: perspectiveView.Rotate(0, 90, 180); break; case HullControl.PerspectiveType.PERSPECTIVE: perspectiveView.Rotate(10, 30, 190); break; } PerspectiveView.editableHull = perspectiveView; TopView.InvalidateVisual(); FrontView.InvalidateVisual(); SideView.InvalidateVisual(); PerspectiveView.InvalidateVisual(); }