/// <summary> /// AddConstraint /// </summary> /// <param name="constraint"></param> public void AddConstraint(Constraint constraint) { if (!this.constraints.Contains(constraint)) this.constraints.Add(constraint); }
/// <summary> /// Removes a constraint form the simulation. /// </summary> /// <param name="constraint">The constraint which should be removed.</param> /// <returns>True if the constraint was successfully removed.</returns> public bool RemoveConstraint(Constraint constraint) { if (!constraints.Contains(constraint)) return false; constraints.Remove(constraint); return true; }
/// <summary> /// RemoveConstraint /// </summary> /// <param name="constraint"></param> public void RemoveConstraint(Constraint constraint) { if (this.constraints.Contains(constraint)) this.constraints.Remove(constraint); }
/// <summary> /// Adds a constraint to the simulation. /// </summary> /// <param name="constraint">Constraint which should be added.</param> public void AddConstraint(Constraint constraint) { if (!constraints.Contains(constraint)) constraints.Add(constraint); else System.Diagnostics.Debug.WriteLine("Warning: tried to add constraint to physics but it's already registered"); }