public override void Remove(IPositionUpdateable updateable)
{
if (updateable.PositionUpdater == this)
{
updateable.PositionUpdater = null;
var ccdUpdateable = updateable as ICCDPositionUpdateable;
if (ccdUpdateable != null)
{
switch (ccdUpdateable.PositionUpdateMode)
{
case PositionUpdateMode.Discrete:
discreteUpdateables.Remove(updateable);
break;
case PositionUpdateMode.Passive:
passiveUpdateables.Remove(ccdUpdateable);
break;
case PositionUpdateMode.Continuous:
continuousUpdateables.Remove(ccdUpdateable);
break;
}
}
else
discreteUpdateables.Remove(updateable);
}
else
throw new Exception("Cannot remove object from this Integrator. The object doesn't belong to it.");
}
}