protected void UpdateActivationState(float timeStep)
        {
            for (int i = 0; i < CollisionObjects.Count; i++)
            {
                CollisionObject colObj = CollisionObjects[i];
                RigidBody       body   = RigidBody.Upcast(colObj);
                if (body != null)
                {
                    body.UpdateDeactivation(timeStep);

                    if (body.WantsSleeping())
                    {
                        if (body.IsStaticOrKinematicObject)
                        {
                            body.ActivationState = ActivationState.IslandSleeping;
                        }
                        else
                        {
                            if (body.ActivationState == ActivationState.Active)
                            {
                                body.ActivationState = ActivationState.WantsDeactivation;
                            }
                        }
                    }
                    else
                    {
                        if (body.ActivationState != ActivationState.DisableDeactivation)
                        {
                            body.ActivationState = ActivationState.Active;
                        }
                    }
                }
            }
        }