protected void RotateObject(ctlTextBox var, float x, float y, float z) { try { if (UVDLPApp.Instance().SelectedObject == null) return; float val = var.FloatVal * 0.0174532925f; x *= val; y *= val; z *= val; UVDLPApp.Instance().SelectedObject.Rotate(x,y,z); UVDLPApp.Instance().m_undoer.SaveRotation(UVDLPApp.Instance().SelectedObject, x, y, z); UVDLPApp.Instance().SelectedObject.Update(); // make sure we update //ShowObjectInfo(); UVDLPApp.Instance().RaiseAppEvent(eAppEvent.eUpdateSelectedObject, "updateobject"); } catch (Exception ex) { DebugLogger.Instance().LogError(ex.Message); } }
protected void MoveObject(ctlTextBox var, float x, float y, float z) { try { if (UVDLPApp.Instance().SelectedObject == null) return; float val = var.FloatVal; x *= val; y *= val; z *= val; UVDLPApp.Instance().SelectedObject.Translate(x, y, z); UVDLPApp.Instance().m_undoer.SaveTranslation(UVDLPApp.Instance().SelectedObject, x, y, z); UVDLPApp.Instance().SelectedObject.Update(); // make sure we update //ShowObjectInfo(); UVDLPApp.Instance().RaiseAppEvent(eAppEvent.eReDraw, "redraw"); } catch (Exception ex) { DebugLogger.Instance().LogError(ex.Message); } }
protected void ScaleObject(ctlTextBox var, float x, float y, float z) { try { if (UVDLPApp.Instance().SelectedObject == null) return; float val = var.FloatVal / 100f; x = (x == 0) ? 1 : x * val; y = (y == 0) ? 1 : y * val; z = (z == 0) ? 1 : z * val; UVDLPApp.Instance().SelectedObject.Scale(x, y, z); UVDLPApp.Instance().m_undoer.SaveScale(UVDLPApp.Instance().SelectedObject, x, y, z); UVDLPApp.Instance().SelectedObject.Update(); // make sure we update //ShowObjectInfo(); UVDLPApp.Instance().RaiseAppEvent(eAppEvent.eReDraw, "redraw"); } catch (Exception) { } }
protected void MoveObject(ctlTextBox var, float x, float y, float z) { try { if (UVDLPApp.Instance().SelectedObject == null) { return; } float val = var.FloatVal; x *= val; y *= val; z *= val; UVDLPApp.Instance().SelectedObject.Translate(x, y, z, true); //UVDLPApp.Instance().m_undoer.SaveTranslation(UVDLPApp.Instance().SelectedObject, x, y, z); // moved to translate function //UVDLPApp.Instance().SelectedObject.Update(); // make sure we update // moved to translate function //ShowObjectInfo(); UVDLPApp.Instance().RaiseAppEvent(eAppEvent.eUpdateSelectedObject, "updateobject"); } catch (Exception ex) { DebugLogger.Instance().LogError(ex.Message); } }
protected void RotateObject(ctlTextBox var, float x, float y, float z) { try { if (UVDLPApp.Instance().SelectedObject == null) { return; } float val = var.FloatVal * 0.0174532925f; x *= val; y *= val; z *= val; UVDLPApp.Instance().SelectedObject.Rotate(x, y, z); UVDLPApp.Instance().m_undoer.SaveRotation(UVDLPApp.Instance().SelectedObject, x, y, z); UVDLPApp.Instance().SelectedObject.Update(); // make sure we update //ShowObjectInfo(); UVDLPApp.Instance().RaiseAppEvent(eAppEvent.eReDraw, "redraw"); } catch (Exception ex) { DebugLogger.Instance().LogError(ex.Message); } }
protected void RotateObject(ctlTextBox var, float x, float y, float z) { try { if (UVDLPApp.Instance().SelectedObject == null) { return; } float val = var.FloatVal * 0.0174532925f; x *= val; y *= val; z *= val; UVDLPApp.Instance().SelectedObject.Rotate(x, y, z); UVDLPApp.Instance().m_undoer.SaveRotation(UVDLPApp.Instance().SelectedObject, x, y, z); UVDLPApp.Instance().SelectedObject.Update(); // make sure we update //ShowObjectInfo(); UVDLPApp.Instance().RaiseAppEvent(eAppEvent.eUpdateSelectedObject, ((DesignMode) ? "Updateobject" : UVDLPApp.Instance().resman.GetString("Updateobject", UVDLPApp.Instance().cul))); } catch (Exception ex) { DebugLogger.Instance().LogError(ex.Message); } }