public override bool LoadFromDesc(MyElementDesc desc)
        {
            if (!desc.IsValid())
            {
                return(false);
            }

            if (!base.LoadFromDesc(desc))
            {
                return(false);
            }

            MyRBTriangleMeshElementDesc tmDesc = (MyRBTriangleMeshElementDesc)desc;

            SetModel(tmDesc.Model);
            if (tmDesc.ModelLOD0 == null)
            {
                SetModelLOD0(tmDesc.Model);
            }
            else
            {
                SetModelLOD0(tmDesc.ModelLOD0);
            }
            return(true);
        }
예제 #2
0
        public MyPhysicsObjects()
        {
            m_RigidBodyDesc        = new MyRigidBodyDesc();
            m_SensorDesc           = new MySensorDesc();
            m_RBSphereElementDesc  = new MyRBSphereElementDesc();
            m_RBBoxElementDesc     = new MyRBBoxElementDesc();
            m_RBCapsuleElementDesc = new MyRBCapsuleElementDesc();
            m_RBTriangleMeshDesc   = new MyRBTriangleMeshElementDesc();
            m_RBVoxelElementDesc   = new MyRBVoxelElementDesc();

            m_SensorsPool             = new MyObjectsPool <MySensor>(128);
            m_SphereSensorElementPool = new MyObjectsPool <MySphereSensorElement>(128);

            m_RigidsPool                = new MyObjectsPool <MyRigidBody>(24576);
            m_RBSphereElementPool       = new MyObjectsPool <MyRBSphereElement>(16384);
            m_RBBoxElementPool          = new MyObjectsPool <MyRBBoxElement>(16384);
            m_RBCapsuleElementPool      = new MyObjectsPool <MyRBCapsuleElement>(16);
            m_RBTriangleMeshElementPool = new MyObjectsPool <MyRBTriangleMeshElement>(16384);//value from Ales - 64
            m_RBVoxelElementPool        = new MyObjectsPool <MyRBVoxelElement>(512);
        }
예제 #3
0
        public MyPhysicsObjects()
        {
            m_RigidBodyDesc = new MyRigidBodyDesc();
            m_SensorDesc = new MySensorDesc();
            m_RBSphereElementDesc = new MyRBSphereElementDesc();
            m_RBBoxElementDesc = new MyRBBoxElementDesc();
            m_RBCapsuleElementDesc = new MyRBCapsuleElementDesc();
            m_RBTriangleMeshDesc = new MyRBTriangleMeshElementDesc();
            m_RBVoxelElementDesc = new MyRBVoxelElementDesc();

            m_SensorsPool = new MyObjectsPool<MySensor>(128);
            m_SphereSensorElementPool = new MyObjectsPool<MySphereSensorElement>(128);

            m_RigidsPool = new MyObjectsPool<MyRigidBody>(24576);
            m_RBSphereElementPool = new MyObjectsPool<MyRBSphereElement>(16384);
            m_RBBoxElementPool = new MyObjectsPool<MyRBBoxElement>(16384);
            m_RBCapsuleElementPool = new MyObjectsPool<MyRBCapsuleElement>(16);
            m_RBTriangleMeshElementPool = new MyObjectsPool<MyRBTriangleMeshElement>(16384);//value from Ales - 64
            m_RBVoxelElementPool = new MyObjectsPool<MyRBVoxelElement>(512);
        }