private void ApplyScaleFromEditField() { if (view3DWidget.HaveSelection) { Matrix4X4 startingTransform = view3DWidget.SelectedMeshGroupTransform; double scale = scaleRatioControl.ActuallNumberEdit.Value; if (scale > 0) { ScaleAxis(scale, 0); ScaleAxis(scale, 1); ScaleAxis(scale, 2); } view3DWidget.AddUndoForSelectedMeshGroupTransform(startingTransform); } }
private void ApplyScaleFromEditField() { if (view3DWidget.HaveSelection) { Matrix4X4 startingTransform = view3DWidget.SelectedMeshGroupTransform; Vector3 currentScale = view3DWidget.MeshGroupExtraData[view3DWidget.SelectedMeshGroupIndex].currentScale; double scale = scaleRatioControl.ActuallNumberEdit.Value; if (scale > 0) { ScaleAxis(scale, 0); view3DWidget.MeshGroupExtraData[view3DWidget.SelectedMeshGroupIndex].currentScale.y = currentScale.y; view3DWidget.MeshGroupExtraData[view3DWidget.SelectedMeshGroupIndex].currentScale.z = currentScale.z; ScaleAxis(scale, 1); view3DWidget.MeshGroupExtraData[view3DWidget.SelectedMeshGroupIndex].currentScale.z = currentScale.z; ScaleAxis(scale, 2); } view3DWidget.AddUndoForSelectedMeshGroupTransform(startingTransform); } }
public override void OnMouseUp(MouseEvent3DArgs mouseEvent3D) { view3DWidget.AddUndoForSelectedMeshGroupTransform(transformOnMouseDown); base.OnMouseUp(mouseEvent3D); }