/// <summary>
        /// Adds a controller to the physics manager.
        /// </summary>
        /// <param name="controller">The controller which is to be added.</param>
        public override void AddController(IPhysicsController controller)
        {
            if (controller == null)
            {
                throw new Exception("PhysicsManager.AddController: null controller.");
            }

            JigLibXController wrapper = new JigLibXController(controller);

            mControllers.Add(wrapper);
            mPhysicsSystem.AddController(wrapper);
        }
        /// <summary>
        /// Removes a controller from the physics manager.
        /// </summary>
        /// <param name="controller">The controller which is to be removed.</param>
        public override void RemoveController(IPhysicsController controller)
        {
            if (controller == null)
            {
                throw new Exception("PhysicsManager.RemoveController: null controller.");
            }

            JigLibXController wrapper = mControllers.Find(c => c.Controller == controller);

            if (wrapper == null)
            {
                throw new Exception("PhysicsManager.RemoveController: controller not found.");
            }

            mControllers.Remove(wrapper);
            mPhysicsSystem.RemoveController(wrapper);
        }