예제 #1
0
        public bool SetInstanceMaterial(string materialName, MyInstanceMaterial instanceMaterial)
        {
            int instanceMaterialOffset = StandardModel.GetInstanceMaterialOffset(materialName);

            if (instanceMaterialOffset == -1)
            {
                return(false);
            }

            m_instanceMaterials.Set(instanceMaterialOffset, instanceMaterial);
            return(true);
        }
예제 #2
0
        public bool SetInstanceMaterialEmissivity(string materialName, float emissivity)
        {
            int instanceMaterialOffset = StandardModel.GetInstanceMaterialOffset(materialName);

            if (instanceMaterialOffset == -1)
            {
                return(false);
            }

            MyInstanceMaterial instanceMaterial = m_instanceMaterials.Get(instanceMaterialOffset);

            instanceMaterial.Emissivity = emissivity;
            m_instanceMaterials.Set(instanceMaterialOffset, instanceMaterial);
            return(true);
        }
예제 #3
0
        public bool SetInstanceMaterialColorMult(string materialName, Vector3 colorMult)
        {
            int instanceMaterialOffset = StandardModel.GetInstanceMaterialOffset(materialName);

            if (instanceMaterialOffset == -1)
            {
                return(false);
            }

            MyInstanceMaterial instanceMaterial = m_instanceMaterials.Get(instanceMaterialOffset);

            instanceMaterial.ColorMult = colorMult;
            m_instanceMaterials.Set(instanceMaterialOffset, instanceMaterial);
            return(true);
        }