Esempio n. 1
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 );

		}
Esempio n. 2
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 );
		}
Esempio n. 3
0
		public btDiscreteDynamicsWorld( btDispatcher dispatcher, btBroadphaseInterface pairCache, btConstraintSolver constraintSolver, btCollisionConfiguration collisionConfiguration )
					: base( dispatcher, pairCache, collisionConfiguration )
		{
			Initialize( dispatcher, pairCache, constraintSolver, collisionConfiguration );
		}
Esempio n. 4
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 );

			}
Esempio n. 5
0
		internal void setConstraintSolver( btConstraintSolver solver )
		{
			if( m_ownsConstraintSolver )
			{
				m_constraintSolver = null;
			}
			m_ownsConstraintSolver = false;
			m_constraintSolver = solver;
			m_solverIslandCallback.m_solver = solver;
		}
Esempio n. 6
0
		public virtual void setConstraintSolver( btConstraintSolver* solver )
		{
			if( m_ownsConstraintSolver )
			{
				btAlignedFree( m_constraintSolver );
			}
			m_ownsConstraintSolver = false;
			m_constraintSolver = solver;
		}