BEPUphysics.Constraints.SolverGroups.SolverGroup.Add C# (CSharp) Метод

Add() защищенный Метод

Adds a solver updateable to the group.
Thrown when the SolverUpdateable to add to the SolverGroup already belongs to another SolverGroup or to a Space.
protected Add ( EntitySolverUpdateable solverUpdateable ) : void
solverUpdateable EntitySolverUpdateable Solver updateable to add.
Результат void
        protected void Add(EntitySolverUpdateable solverUpdateable)
        {
            if (solverUpdateable.solver == null)
            {
                if (solverUpdateable.SolverGroup == null)
                {
                    solverUpdateables.Add(solverUpdateable);
                    solverUpdateable.SolverGroup = this;
                    solverUpdateable.Solver = solver;
                    OnInvolvedEntitiesChanged();
                }
                else
                {
                    throw new InvalidOperationException("Cannot add SolverUpdateable to SolverGroup; it already belongs to a SolverGroup.");
                }
            }
            else
            {
                throw new InvalidOperationException("Cannot add SolverUpdateable to SolverGroup; it already belongs to a solver.");
            }
        }