Пример #1
0
        public virtual bool needsCollision(CollisionObject body0, CollisionObject body1)
        {
            Debug.Assert(body0 != null);
            Debug.Assert(body1 != null);

            bool needsCollision = true;

#if DEBUG
            if ((m_dispatcherFlags & DispatcherFlags.CD_STATIC_STATIC_REPORTED) != 0)
            {
                //broadphase filtering already deals with this
                if ((body0.isStaticObject || body0.isKinematicObject) &&
                    (body1.isStaticObject || body1.isKinematicObject))
                {
                    m_dispatcherFlags |= DispatcherFlags.CD_STATIC_STATIC_REPORTED;
                    Debug.WriteLine("warning btCollisionDispatcher::needsCollision: static-static collision!\n");
                }
            }
#endif //BT_DEBUG

            if ((!body0.isActive) && (!body1.isActive))
                needsCollision = false;
            else if (!body0.checkCollideWith(body1))
                needsCollision = false;

            return needsCollision;

        }