Ejemplo n.º 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 );
		}
Ejemplo n.º 2
0
		internal void Initialize( btDispatcher dispatcher
						, btBroadphaseInterface pairCache
						, btCollisionConfiguration collisionConfiguration )
		{
			m_dispatcher1 = dispatcher;
			m_broadphasePairCache = pairCache;
			m_debugDrawer = null;
			m_forceUpdateAllAabbs = true;
		}
Ejemplo n.º 3
0
		///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 );

		}
		public void Initialize( btDispatcher dispatcher, btCollisionObjectWrapper body0Wrap, btCollisionObjectWrapper body1Wrap, bool isSwapped )
		{
			m_dispatcher = ( dispatcher );
			m_dispatchInfoPtr = ( null );
			m_convexBodyWrap = isSwapped ? body1Wrap : body0Wrap;
			m_triBodyWrap = isSwapped ? body0Wrap : body1Wrap;

			//
			// create the manifold from the dispatcher 'manifold pool'
			//
			m_manifoldPtr = m_dispatcher.getNewManifold( m_convexBodyWrap.m_collisionObject, m_triBodyWrap.m_collisionObject );

			clearCache();
		}
Ejemplo n.º 5
0
			public void Initialize( btCollisionObject me, ref btVector3 fromA, ref btVector3 toA, btOverlappingPairCache pairCache, btDispatcher dispatcher )
			{
				base.Initialize( ref fromA, ref toA );
				m_me = ( me );
				m_allowedPenetration = ( 0.0f );
				m_pairCache = ( pairCache );
				m_dispatcher = ( dispatcher );
			}
Ejemplo n.º 6
0
		internal btDynamicsWorld( btDispatcher dispatcher, btBroadphaseInterface broadphase
						, btCollisionConfiguration collisionConfiguration )
		//: base( dispatcher, broadphase, collisionConfiguration )
		{
			Initialize( dispatcher, broadphase, collisionConfiguration );
		}
Ejemplo n.º 7
0
		internal override void dispatchAllCollisionPairs( btOverlappingPairCache pairCache, btDispatcherInfo dispatchInfo, btDispatcher dispatcher )
		{
			//m_blockedForChanges = true;
			btCollisionPairCallback collisionCallback = new btCollisionPairCallback( dispatchInfo, this );
			pairCache.processAllOverlappingPairs( collisionCallback, dispatcher );
			//m_blockedForChanges = false;
		}
Ejemplo n.º 8
0
		internal abstract void dispatchAllCollisionPairs( btOverlappingPairCache pairCache, btDispatcherInfo dispatchInfo, btDispatcher dispatcher );
Ejemplo n.º 9
0
		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 );
		}
Ejemplo n.º 10
0
		public abstract btBroadphaseProxy createProxy( ref btVector3 aabbMin, ref btVector3 aabbMax, BroadphaseNativeTypes shapeType, btCollisionObject userPtr, btBroadphaseProxy.CollisionFilterGroups collisionFilterGroup, btBroadphaseProxy.CollisionFilterGroups collisionFilterMask, btDispatcher dispatcher, object multiSapProxy );
Ejemplo n.º 11
0
		public abstract void calculateOverlappingPairs( btDispatcher dispatcher );
		/// btSequentialImpulseConstraintSolver Sequentially applies impulses
		internal override double solveGroup( btCollisionObject[] bodies, int numBodies
			, btPersistentManifold[] manifoldPtr, int start_manifold, int numManifolds
			, btTypedConstraint[] constraints, int startConstraint, int numConstraints
			, btContactSolverInfo infoGlobal
			, btIDebugDraw debugDrawer, btDispatcher dispatcher )
		{
			CProfileSample sample = new CProfileSample( "solveGroup" );
			//you need to provide at least some bodies

			solveGroupCacheFriendlySetup( bodies, numBodies, manifoldPtr, start_manifold, numManifolds, constraints, startConstraint, numConstraints, infoGlobal, debugDrawer );

			solveGroupCacheFriendlyIterations( bodies, numBodies, manifoldPtr, start_manifold, numManifolds, constraints, startConstraint, numConstraints, infoGlobal, debugDrawer );

			solveGroupCacheFriendlyFinish( bodies, numBodies, infoGlobal );

			return 0;
		}
			internal btCompoundCompoundLeafCallback( btCollisionObjectWrapper compound1ObjWrap,
											btCollisionObjectWrapper compound0ObjWrap,
											btDispatcher dispatcher,
											btDispatcherInfo dispatchInfo,
											btManifoldResult resultOut,
											btHashedSimplePairCache childAlgorithmsCache,
											btPersistentManifold sharedManifold )
			{
				m_numOverlapPairs = ( 0 );
				m_compound0ColObjWrap = ( compound1ObjWrap );
				m_compound1ColObjWrap = ( compound0ObjWrap );
				m_dispatcher = ( dispatcher );
				m_dispatchInfo = ( dispatchInfo );
				m_resultOut = ( resultOut );
				m_childCollisionAlgorithmCache = ( childAlgorithmsCache );
				m_sharedManifold = ( sharedManifold );

			}
Ejemplo n.º 14
0
		///solve a group of constraints
		internal abstract double solveGroup( btCollisionObject[] bodies, int numBodies
					, btPersistentManifold[] manifold, int first_manifold, int numManifolds
					, btTypedConstraint[] constraints, int startConstraint, int numConstraints
					, btContactSolverInfo info
					, btIDebugDraw debugDrawer
					, btDispatcher dispatcher );
Ejemplo n.º 15
0
		internal btCollisionWorld( btDispatcher dispatcher
						, btBroadphaseInterface pairCache
						, btCollisionConfiguration collisionConfiguration )
		{
			Initialize( dispatcher, pairCache, collisionConfiguration );
		}
Ejemplo n.º 16
0
			internal InplaceSolverIslandCallback(
				btConstraintSolver solver,
				btDispatcher dispatcher )
			{
				m_solverInfo = null;
				m_solver = ( solver );
				m_sortedConstraints = null;
				m_numConstraints = ( 0 );
				m_debugDrawer = null;
				m_dispatcher = ( dispatcher );

			}
Ejemplo n.º 17
0
		public btDiscreteDynamicsWorld( btDispatcher dispatcher, btBroadphaseInterface pairCache, btConstraintSolver constraintSolver, btCollisionConfiguration collisionConfiguration )
					: base( dispatcher, pairCache, collisionConfiguration )
		{
			Initialize( dispatcher, pairCache, constraintSolver, collisionConfiguration );
		}
Ejemplo n.º 18
0
		public abstract void destroyProxy( btBroadphaseProxy proxy, btDispatcher dispatcher );
Ejemplo n.º 19
0
						StaticOnlyCallback( btCollisionObject me, ref btVector3 fromA, ref btVector3 toA, btOverlappingPairCache* pairCache, btDispatcher* dispatcher ) :
Ejemplo n.º 20
0
		public abstract void resetPool( btDispatcher dispatcher );
			internal void Initialize( btCollisionObjectWrapper compoundObjWrap, btCollisionObjectWrapper otherObjWrap, btDispatcher dispatcher, btDispatcherInfo dispatchInfo, btManifoldResult resultOut, btCollisionAlgorithm[] childCollisionAlgorithms, btPersistentManifold sharedManifold )
			{
				m_compoundColObjWrap = ( compoundObjWrap );
				m_otherObjWrap = ( otherObjWrap );
				m_dispatcher = ( dispatcher );
				m_dispatchInfo = ( dispatchInfo );
				m_resultOut = ( resultOut );
				m_childCollisionAlgorithms = ( childCollisionAlgorithms );
				m_sharedManifold = ( sharedManifold );
			}
Ejemplo n.º 22
0
		public abstract void setAabb( btBroadphaseProxy proxy, ref btVector3 aabbMin, ref btVector3 aabbMax, btDispatcher dispatcher );