예제 #1
0
        /// <summary>
        /// rigid body module stores all simulated rigids. If you want to simulate a rigid you have to insert it in this module.
        /// </summary>
        public MyRigidBodyModule()
        {
            m_ActiveRigids.Clear();
            //m_Rigids.Clear();

            m_BroadPhase = new MyDynamicAABBTreeBroadphase();

            m_PruningStructure = ((MyDynamicAABBTreeBroadphase)m_BroadPhase).GetDAABBTree();

            // m_DAABBTreeUpdater = new MyDAABBTreeUpdater(((MyDynamicAABBTreeBroadphase)m_BroadPhase).GetDAABBTree());

            m_RboIslandGeneration = new MyRigidBodyIslandGeneration();

            m_CollisionEpsilon = MyPhysicsConfig.CollisionEpsilon;
            m_CurrentTimeStep  = 0.02f;

            m_GroupMaskManager = new MyGroupMaskManager();

            m_SolverPool.DeallocateAll();
            m_SolverList.Clear();

            m_DeactivationSolver = new MyRigidBodyIslandSleepState();

            m_DeactivationSolver.m_Broadphase = m_BroadPhase;


            m_SolverAction = SolverAction;           // idx => m_SolverList[idx].DoWork();

            m_InteractionAction = InteractionAction; // idx => m_InteractionsList[idx].DoWork();
        }
예제 #2
0
        /// <summary>
        /// rigid body module stores all simulated rigids. If you want to simulate a rigid you have to insert it in this module.
        /// </summary>
        public MyRigidBodyModule()
        {
            m_ActiveRigids.Clear();
            //m_Rigids.Clear();

            m_BroadPhase = new MyDynamicAABBTreeBroadphase();

            m_PruningStructure = ((MyDynamicAABBTreeBroadphase) m_BroadPhase).GetDAABBTree();

           // m_DAABBTreeUpdater = new MyDAABBTreeUpdater(((MyDynamicAABBTreeBroadphase)m_BroadPhase).GetDAABBTree());

            m_RboIslandGeneration = new MyRigidBodyIslandGeneration();

            m_CollisionEpsilon = MyPhysicsConfig.CollisionEpsilon;
            m_CurrentTimeStep = 0.02f;

            m_GroupMaskManager = new MyGroupMaskManager();

            m_SolverPool.DeallocateAll();
            m_SolverList.Clear();

            m_DeactivationSolver = new MyRigidBodyIslandSleepState();

            m_DeactivationSolver.m_Broadphase = m_BroadPhase;


            m_SolverAction = SolverAction;// idx => m_SolverList[idx].DoWork();

            m_InteractionAction = InteractionAction; // idx => m_InteractionsList[idx].DoWork();
        }