///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 ); }
internal InplaceSolverIslandCallback( btConstraintSolver solver, btDispatcher dispatcher ) { m_solverInfo = null; m_solver = ( solver ); m_sortedConstraints = null; m_numConstraints = ( 0 ); m_debugDrawer = null; m_dispatcher = ( dispatcher ); }
internal void setConstraintSolver( btConstraintSolver solver ) { if( m_ownsConstraintSolver ) { m_constraintSolver = null; } m_ownsConstraintSolver = false; m_constraintSolver = solver; m_solverIslandCallback.m_solver = solver; }
public virtual void setConstraintSolver( btConstraintSolver* solver ) { if( m_ownsConstraintSolver ) { btAlignedFree( m_constraintSolver ); } m_ownsConstraintSolver = false; m_constraintSolver = solver; }