コード例 #1
0
ファイル: LCC3Material.cs プロジェクト: rtabbara/Cocos3D-XNA
 public LCC3Material(int tag, string name)
     : base(tag, name)
 {
     _textureOverlays = new List<LCC3Texture>();
     _ambientColor = LCC3Material.CC3DefaultMaterialColorAmbient;
     _diffuseColor = LCC3Material.CC3DefaultMaterialColorDiffuse;
     _specularColor = LCC3Material.CC3DefaultMaterialColorSpecular;
     _emissionColor = LCC3Material.CC3DefaultMaterialColorEmission;
     _shininess = LCC3Material.CC3DefaultMaterialShininess;
     _reflectivity = LCC3Material.CC3DefaultMaterialReflectivity;
     _srcBlendType = LCC3BlendType.One;
     _dstBlendType = LCC3BlendType.Zero;
     _alphaTestFunc = LCC3AlphaTestFuncMode.Always;
     _shouldUseLighting = true;
 }
コード例 #2
0
ファイル: LCC3Material.cs プロジェクト: rtabbara/Cocos3D-XNA
        public void PopulateFrom(LCC3Material anotherMaterial)
        {
            base.PopulateFrom(anotherMaterial);

            _ambientColor = anotherMaterial.AmbientColor;
            _diffuseColor = anotherMaterial.DiffuseColor;
            _specularColor = anotherMaterial.SpecularColor;
            _emissionColor = anotherMaterial.EmissionColor;
            _shininess = anotherMaterial.Shininess;
            _reflectivity = anotherMaterial.Reflectivity;
            _srcBlendType = anotherMaterial._srcBlendType;
            _dstBlendType = anotherMaterial._dstBlendType;
            _alphaTestFunc = anotherMaterial._alphaTestFunc;
            _shouldUseLighting = anotherMaterial._shouldUseLighting;

            _shaderContext = anotherMaterial.ShaderContext;
            _texture = anotherMaterial.Texture;

            _textureOverlays.Clear();

            _textureOverlays.AddRange(anotherMaterial.TextureOverlays);
        }