Пример #1
0
		internal override bool needsCollision( btCollisionObject body0, btCollisionObject 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.isStaticOrKinematicObject() && body1.isStaticOrKinematicObject() )
				{
					m_dispatcherFlags |= DispatcherFlags.CD_STATIC_STATIC_REPORTED;
					Console.WriteLine( "warning needsCollision: static-static collision!\n" );
				}
			}
#endif //BT_DEBUG

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

			return needsCollision;

		}