public override void OnGizmoAttemptHandleDragBegin(int handleId) { if (handleId == _rtMidCap.HandleId) { var workData = new GizmoDblAxisRotationDrag3D.WorkData(); workData.Axis0 = Gizmo.FocusCamera.transform.up; workData.Axis1 = Gizmo.FocusCamera.transform.right; workData.ScreenAxis0 = -Vector3.right; workData.ScreenAxis1 = Vector3.up; workData.SnapMode = Settings3D.RtSnapMode; workData.SnapStep0 = Settings3D.RtCamUpSnapStep; workData.SnapStep1 = Settings3D.RtCamRightSnapStep; _rtCamXYRotationDrag.SetWorkData(workData); } else if (handleId == _scMidCap.HandleId) { var workData = new GizmoUniformScaleDrag3D.WorkData(); workData.BaseSize = _scMidCap.GetRealBoxSize(_scMidCap.GetZoomFactor(Gizmo.GetWorkCamera())).magnitude; workData.DragOrigin = _scMidCap.Position; workData.CameraRight = Gizmo.FocusCamera.transform.right; workData.CameraUp = Gizmo.FocusCamera.transform.up; workData.SnapStep = Settings3D.ScUniformSnapStep; _scUnformScaleDrag.SetWorkData(workData); } }
public override void OnGizmoAttemptHandleDragBegin(int handleId) { if (handleId == _midCap.HandleId) { var workData = new GizmoUniformScaleDrag3D.WorkData(); workData.BaseSize = _midCap.GetRealBoxSize(_midCap.GetZoomFactor(Gizmo.GetWorkCamera())).magnitude; workData.DragOrigin = _midCap.Position; workData.CameraRight = Gizmo.FocusCamera.transform.right; workData.CameraUp = Gizmo.FocusCamera.transform.up; workData.SnapStep = Settings3D.UniformSnapStep; _unformScaleDrag.SetWorkData(workData); } }
private void UpdateCamLookSlider(Camera camera) { float zoomFactor = _midCap.GetZoomFactor(camera); _camLookSlider.MakePolySphereBorder(Gizmo.Transform.Position3D, _midCap.GetRealSphereRadius(zoomFactor) + zoomFactor * LookAndFeel3D.CamLookSliderRadiusOffset, 100, camera); }