Пример #1
0
        public MyRigidBody()
        {
            m_RBElementList = new List <MyRBElement>(2);

            m_Matrix = new Matrix();

            m_InertiaTensor = Matrix.Identity;

            m_IsSleeping = false;

            m_ContactModify = null;
            m_ContactEvent  = null;
            m_MotionEvent   = null;
            //m_RigidBodyEvent = null;

            m_IterationCount = MyPhysicsConfig.DefaultIterationCount;

            m_LinearDamping  = MyPhysicsConfig.DefaultLinearDamping;
            m_AngularDamping = MyPhysicsConfig.DefaultAngularDamping;

            m_SleepEnergyThreshold = MyPhysicsConfig.DefaultEnergySleepThreshold;

            m_MaxLinearVelocity  = -1.0f;
            m_MaxAngularVelocity = -1.0f;

            m_Guid = GUID_COUNTER;
            if (GUID_COUNTER > 65000)
            {
                GUID_COUNTER = 0;
            }
            GUID_COUNTER++;
        }
Пример #2
0
        public MyRigidBody()
        {
            m_RBElementList = new List<MyRBElement>(2);

            m_Matrix = new Matrix();

            m_InertiaTensor = Matrix.Identity;

            m_IsSleeping = false;

            m_ContactModify = null;
            m_ContactEvent = null;
            m_MotionEvent = null;
            //m_RigidBodyEvent = null;

            m_IterationCount = MyPhysicsConfig.DefaultIterationCount;

            m_LinearDamping = MyPhysicsConfig.DefaultLinearDamping;
            m_AngularDamping = MyPhysicsConfig.DefaultAngularDamping;

            m_SleepEnergyThreshold = MyPhysicsConfig.DefaultEnergySleepThreshold;

            m_MaxLinearVelocity = -1.0f;
            m_MaxAngularVelocity = -1.0f;

            m_Guid = GUID_COUNTER;
            if (GUID_COUNTER > 65000)
            {
                GUID_COUNTER = 0;
            }
            GUID_COUNTER++;
        }