Exemple #1
0
		new internal void Initialize( btDispatcher dispatcher, btBroadphaseInterface broadphase
								, btCollisionConfiguration collisionConfiguration )

		{
			base.Initialize( dispatcher, broadphase, collisionConfiguration );
			m_internalTickCallback = null;
			m_internalPreTickCallback = null;
			m_worldUserInfo = ( 0 );
		}
Exemple #2
0
		internal void Initialize( btDispatcher dispatcher
						, btBroadphaseInterface pairCache
						, btCollisionConfiguration collisionConfiguration )
		{
			m_dispatcher1 = dispatcher;
			m_broadphasePairCache = pairCache;
			m_debugDrawer = null;
			m_forceUpdateAllAabbs = true;
		}
		///this btSimpleDynamicsWorld constructor creates dispatcher, broadphase pairCache and constraintSolver
		public btSimpleDynamicsWorld(btDispatcher dispatcher
				, btBroadphaseInterface pairCache
				,btConstraintSolver constraintSolver
				, btCollisionConfiguration collisionConfiguration)
			: base( dispatcher, pairCache, collisionConfiguration )
		{
			m_constraintSolver = ( constraintSolver );
			m_ownsConstraintSolver = ( false );
			m_gravity = new btVector3( 0, 0, -9.8 );

		}
		internal void Initialize( btDispatcher dispatcher, btBroadphaseInterface pairCache, btConstraintSolver constraintSolver, btCollisionConfiguration collisionConfiguration )
		{
			base.Initialize( dispatcher, pairCache, collisionConfiguration );
			m_solverIslandCallback = null;
			m_constraintSolver = ( constraintSolver );
			m_gravity = new btVector3( 0, -10, 0 );
			m_localTime = ( 0 );
			m_fixedTimeStep = ( 0 );
			m_synchronizeAllMotionStates = ( false );
			m_applySpeculativeContactRestitution = ( false );
			m_latencyMotionStateInterpolation = ( true );

			if( m_constraintSolver == null )
			{
				m_constraintSolver = new btSequentialImpulseConstraintSolver();
				m_ownsConstraintSolver = true;
			}
			else
			{
				m_ownsConstraintSolver = false;
			}

			m_islandManager = new btSimulationIslandManager();

			m_ownsIslandManager = true;

			m_solverIslandCallback = new InplaceSolverIslandCallback( m_constraintSolver, dispatcher );
		}
		public btDiscreteDynamicsWorld( btDispatcher dispatcher, btBroadphaseInterface pairCache, btConstraintSolver constraintSolver, btCollisionConfiguration collisionConfiguration )
					: base( dispatcher, pairCache, collisionConfiguration )
		{
			Initialize( dispatcher, pairCache, constraintSolver, collisionConfiguration );
		}
Exemple #6
0
		internal btDynamicsWorld( btDispatcher dispatcher, btBroadphaseInterface broadphase
						, btCollisionConfiguration collisionConfiguration )
		//: base( dispatcher, broadphase, collisionConfiguration )
		{
			Initialize( dispatcher, broadphase, collisionConfiguration );
		}
Exemple #7
0
		internal btCollisionWorld( btDispatcher dispatcher
						, btBroadphaseInterface pairCache
						, btCollisionConfiguration collisionConfiguration )
		{
			Initialize( dispatcher, pairCache, collisionConfiguration );
		}
		internal btCollisionDispatcher( btCollisionConfiguration collisionConfiguration )
		{
			int i;
			m_dispatcherFlags = DispatcherFlags.CD_USE_RELATIVE_CONTACT_BREAKING_THRESHOLD;
			m_collisionConfiguration = collisionConfiguration;

			setNearCallback( defaultNearCallback );

			//m_collisionAlgorithmPoolAllocator = collisionConfiguration.getCollisionAlgorithmPool();

			//m_persistentManifoldPoolAllocator = collisionConfiguration.getPersistentManifoldPool();

			for( i = 0; i < (int)BroadphaseNativeTypes.MAX_BROADPHASE_COLLISION_TYPES; i++ )
			{
				for( int j = 0; j < (int)BroadphaseNativeTypes.MAX_BROADPHASE_COLLISION_TYPES; j++ )
				{
					m_doubleDispatch[i, j] = m_collisionConfiguration.getCollisionAlgorithmCreateFunc( (BroadphaseNativeTypes)i, (BroadphaseNativeTypes)j );
					Debug.Assert( m_doubleDispatch[i, j] != null );
				}
			}
		}
		void setCollisionConfiguration( btCollisionConfiguration config )
		{
			m_collisionConfiguration = config;
		}