/// <summary> /// Adjust the goal's parameters while the solver is running. /// </summary> /// <param name="onPlaneGoal"></param> /// <param name="targetPlaneOrigin"></param> /// <param name="targetPlaneNormal"></param> /// <param name="weight"></param> /// <returns></returns> public static OnPlaneGoal OnPlaneGoal_Change( OnPlaneGoal onPlaneGoal, [DefaultArgument("null")] Point targetPlaneOrigin, [DefaultArgument("null")] Vector targetPlaneNormal, [DefaultArgument("-1.0")] double weight) { if (targetPlaneOrigin != null) onPlaneGoal.TargetPlaneOrigin = targetPlaneOrigin.ToTriple(); if (targetPlaneNormal != null) onPlaneGoal.TargetPlaneNormal = targetPlaneNormal.ToTriple(); if (weight >= 0.0) onPlaneGoal.Weight = (float)weight; return onPlaneGoal; }
/// <summary> /// Adjust the goal's parameters while the solver is running. /// </summary> /// <param name="onPlaneGoal"></param> /// <param name="targetPlane"></param> /// <param name="weight"></param> /// <returns></returns> public static OnPlaneGoal OnPlaneGoal_Change( OnPlaneGoal onPlaneGoal, [DefaultArgument("null")] Plane targetPlane, [DefaultArgument("-1.0")] double weight) { if (targetPlane != null) { onPlaneGoal.TargetPlaneOrigin = targetPlane.Origin.ToTriple(); onPlaneGoal.TargetPlaneNormal = targetPlane.Normal.ToTriple(); } if (weight >= 0.0) onPlaneGoal.Weight = (float)weight; return onPlaneGoal; }