BEPUphysics.Constraints.SolverGroups.SolverGroup.Remove C# (CSharp) Method

Remove() protected method

Removes a solver updateable from the group.
Thrown when the SolverUpdateable to remove from the SolverGroup doesn't actually belong to this SolverGroup.
protected Remove ( EntitySolverUpdateable solverUpdateable ) : void
solverUpdateable EntitySolverUpdateable Solver updateable to remove.
return void
        protected void Remove(EntitySolverUpdateable solverUpdateable)
        {
            if (solverUpdateable.SolverGroup == this)
            {
                solverUpdateables.Remove(solverUpdateable);
                solverUpdateable.SolverGroup = null;
                solverUpdateable.Solver = null;
                OnInvolvedEntitiesChanged();
            }
            else
            {
                throw new InvalidOperationException("Cannot remove SolverUpdateable from SolverGroup; it doesn't belong to this SolverGroup.");
            }
        }