public override void AddRigidBody(RigidBody body)
		{
			if (!body.IsStaticOrKinematicObject() && 0 == (body.GetFlags() & RigidBodyFlags.BT_DISABLE_WORLD_GRAVITY))
				body.Gravity = m_gravity;

			if (body.GetCollisionShape() != null)
			{
				if (!body.IsStaticObject())
				{
					m_nonStaticRigidBodies.Add(body);
				}
				else
				{
					body.SetActivationState(ActivationState.ISLAND_SLEEPING);
				}

				bool isDynamic = !(body.IsStaticObject() || body.IsKinematicObject());
				CollisionFilterGroups collisionFilterGroup = isDynamic ? CollisionFilterGroups.DefaultFilter : CollisionFilterGroups.StaticFilter;
				CollisionFilterGroups collisionFilterMask = isDynamic ? CollisionFilterGroups.AllFilter : (CollisionFilterGroups.AllFilter ^ CollisionFilterGroups.StaticFilter);

				AddCollisionObject(body, collisionFilterGroup, collisionFilterMask);
			}
		}
		public virtual void AddRigidBody(RigidBody body, CollisionFilterGroups group, CollisionFilterGroups mask)
		{
			if (!body.IsStaticOrKinematicObject() && 0 == (body.GetFlags() & RigidBodyFlags.BT_DISABLE_WORLD_GRAVITY))
				body.Gravity = m_gravity;

			if (body.GetCollisionShape() != null)
			{
				if (!body.IsStaticObject())
				{
					m_nonStaticRigidBodies.Add(body);
				}
				else
				{
					body.SetActivationState(ActivationState.ISLAND_SLEEPING);
				}

				AddCollisionObject(body, group, mask);
			}
		}
		///this can be useful to synchronize a single rigid body . graphics object
		public void SynchronizeSingleMotionState(RigidBody body)
		{
			Debug.Assert(body != null);

			if (body.GetMotionState() != null && !body.IsStaticOrKinematicObject())
			{
				//we need to call the update at least once, even for sleeping objects
				//otherwise the 'graphics' transform never updates properly
				///@todo: add 'dirty' flag
				//if (body.getActivationState() != ISLAND_SLEEPING)
				{
					Matrix interpolatedTransform = Matrix.Identity;
					TransformUtil.IntegrateTransform(body.GetInterpolationWorldTransform(),
						body.SetInterpolationLinearVelocity(), body.GetInterpolationAngularVelocity(),
						m_localTime * body.GetHitFraction(), ref interpolatedTransform);
					body.GetMotionState().SetWorldTransform(ref interpolatedTransform);
				}
			}
		}