public void RemoveDeformationOp(IVectorDisplacementSourceOp op) { SceneObject so = SO_Op.Find(op); Combiner.Remove(op); SO_Op.Remove(op); OnDeformationRemoved?.Invoke(so, op); }
public SpatialEditDeformOpSOBehavior(FContext context, BaseSO sourceSO, DMeshSO legSO, IVectorDisplacementSourceOp op) : base(context) { this.sourceSO = sourceSO; this.legSO = legSO; this.op = op; this.WantsCaptureF = wants_capture; base.BeginCaptureF = begin_capture; base.UpdateCaptureF = update_capture; }
static void add_input_behaviors_for_mouse(BaseSO so, IVectorDisplacementSourceOp op) { if (op is EnclosedRegionOffsetOp) { EnclosedRegionOffsetOp deformOp = op as EnclosedRegionOffsetOp; so.InputBehaviors.Add( new RightMouseClickDragBehavior() { WantsCaptureF = (input) => { return(input.bCtrlKeyDown); }, UpdateCaptureF = (input, lastInput) => { deformOp.PushPullDistance += input.vMouseDelta2D.x * 0.1; } }); } else if (op is EnclosedRegionSmoothOp) { EnclosedRegionSmoothOp deformOp = op as EnclosedRegionSmoothOp; so.InputBehaviors.Add( new RightMouseClickDragBehavior() { WantsCaptureF = (input) => { return(input.bCtrlKeyDown); }, UpdateCaptureF = (input, lastInput) => { deformOp.OffsetDistance += input.vMouseDelta2D.x * 0.1; deformOp.SmoothAlpha += input.vMouseDelta2D.y * 0.1; } }); } else if (op is PlaneBandExpansionOp) { PlaneBandExpansionOp deformOp = op as PlaneBandExpansionOp; so.InputBehaviors.Add( new RightMouseClickDragBehavior() { WantsCaptureF = (input) => { return(input.bCtrlKeyDown); }, UpdateCaptureF = (input, lastInput) => { deformOp.PushPullDistance += input.vMouseDelta2D.x * 0.1; deformOp.BandDistance += input.vMouseDelta2D.y * 0.1; } }); } }
public static Action MakeSelectLegDeformationAction(IVectorDisplacementSourceOp op) { return(() => { OG.Model.SetActiveModelingOperator(op); }); }
public static Action MakeDeleteLegDeformationAction(IVectorDisplacementSourceOp op) { return(() => { OG.Leg.RemoveDeformationOp(op); }); }
internal static void notifyModelingOpRemoved(SceneObject so, IVectorDisplacementSourceOp op) { OnModelingOpRemoved?.Invoke(so, op); }
public void Remove(IVectorDisplacementSourceOp op) { Displacements.Remove(op); }
public void Append(IVectorDisplacementSourceOp op) { Displacements.Append(op); }