コード例 #1
0
        /// <summary>
        /// Sets the material for the next triangles.
        /// </summary>
        /// <param name="material">Material for the next triangles.</param>
        /// <remarks>
        /// Sets the material for the triangles being defined next. This material
        /// and the opaque data dictionary, set with <see cref="SetOpaqueData"/>
        /// define the <see cref="GeometryContent"/>  object containing the next
        /// triangles. When you set a new material or opaque data dictionary the
        /// triangles you add afterwards will belong to a new
        /// <see cref="GeometryContent"/> object.
        /// </remarks>
        public void SetMaterial(MaterialContent material)
        {
            if (_currentMaterial == material)
            {
                return;
            }

            _currentMaterial = material;
            _geometryDirty   = true;
        }
コード例 #2
0
ファイル: MaterialBuilder.cs プロジェクト: roy-t/MiniRTS
        public M.MaterialContent Build(X.MaterialContent content, ContentProcessorContext context)
        {
            var albedo = this.LoadTexture(AlbedoTextureParameters, this.LookUp.GetAlbedo(content), context);

            var normal           = this.LoadTexture(SpecialTextureParameters, this.LookUp.GetNormal(content), context);
            var metalicness      = this.LoadTexture(SpecialTextureParameters, this.LookUp.GetMetalicness(content), context);
            var roughness        = this.LoadTexture(SpecialTextureParameters, this.LookUp.GetRoughness(content), context);
            var ambientOcclusion = this.LoadTexture(SpecialTextureParameters, this.LookUp.GetAmbientOcclusion(content), context);

            return(new M.MaterialContent(albedo, normal, metalicness, roughness, ambientOcclusion));
        }
コード例 #3
0
ファイル: MeshBuilder.cs プロジェクト: solsting/XNAUnleashed
 /// <summary>
 /// Specifies the material used by the current mesh.
 /// </summary>
 /// <remarks>Sets the material used by the triangle being defined next. This material, in conjunction with SetOpaqueData, determines the GeometryContent object containing the next triangle. MeshBuilder maintains the material value for all future triangles. Therefore, if multiple triangles share the same material, you need only one call to SetMaterial.</remarks>
 /// <param name="material">The material to be used by the mesh.</param>
 public void SetMaterial(MaterialContent material)
 {
 }
コード例 #4
0
ファイル: MeshBuilder.cs プロジェクト: leha-bot/Mono.XNA
 public void SetMaterial(MaterialContent material)
 {
     throw new NotImplementedException();
 }