Esempio n. 1
0
 /// <summary>
 /// AddConstraint
 /// </summary>
 /// <param name="constraint"></param>
 public void AddConstraint(Constraint constraint)
 {
     if (!this.constraints.Contains(constraint))
         this.constraints.Add(constraint);
 }
Esempio n. 2
0
 /// <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;
 }
Esempio n. 3
0
 /// <summary>
 /// RemoveConstraint
 /// </summary>
 /// <param name="constraint"></param>
 public void RemoveConstraint(Constraint constraint)
 {
     if (this.constraints.Contains(constraint))
         this.constraints.Remove(constraint);
 }
Esempio n. 4
0
 /// <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");
 }