Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 2
0
 public override void OnGizmoAttemptHandleDragBegin(int handleId)
 {
     if (handleId == _midCap.HandleId)
     {
         var workData = new GizmoUniformScaleDrag3D.WorkData();
         workData.DragOrigin  = _midCap.Position;
         workData.CameraRight = Gizmo.FocusCamera.transform.right;
         workData.CameraUp    = Gizmo.FocusCamera.transform.up;
         workData.SnapStep    = Settings3D.UniformSnapStep;
         _unformScaleDrag.SetWorkData(workData);
     }
 }
Exemplo n.º 3
0
 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);
     }
 }