BEPUphysics.OtherSpaceStages.ForceUpdater.Remove C# (CSharp) Method

Remove() public method

Removes a force updateable from the force updater.
Thrown when the item does not belong to this force updater or its state is corrupted.
public Remove ( IForceUpdateable forceUpdateable ) : void
forceUpdateable IForceUpdateable Item to remove.
return void
        public void Remove(IForceUpdateable forceUpdateable)
        {
            if (forceUpdateable.ForceUpdater == this)
            {
                if (forceUpdateable.IsDynamic && !dynamicObjects.Remove(forceUpdateable))
                    throw new Exception("Dynamic object not present in dynamic objects list; ensure that the IForceUpdateable was never removed from the list improperly by using ForceUpdateableBecomingKinematic.");
                forceUpdateable.ForceUpdater = null;
            }
            else
                throw new Exception("Cannot remove updateable; it does not belong to this manager.");
        }