Click or drag to resize

Material Methods

The Material type exposes the following members.

Methods
 NameDescription
Public methodAddMaterialTexture(TextureSlot) Adds a texture to the material - this bulk creates a property for each field. This will either create properties or overwrite existing properties. If the texture has no file path, nothing is added.
Public methodAddMaterialTexture(TextureSlot, Boolean) Adds a texture to the material - this bulk creates a property for each field. This will either create properties or overwrite existing properties. If the texture has no file path, nothing is added.
Public methodAddProperty Adds a property to this material.
Public methodClear Removes all properties from the material;
Public methodStatic memberCreateFullyQualifiedName Helper method to construct a fully qualified name from the input parameters. All the input parameters are combined into the fully qualified name: {baseName},{texType},{texIndex}. E.g. "$clr.diffuse,0,0" or "$tex.file,1,0". This is the name that is used as the material dictionary key.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodStatic memberFreeNative Frees unmanaged memory created by ToNative(IntPtr, Native).
Public methodGetAllProperties Gets -all- properties contained in the Material.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetMaterialTexture Gets a texture that corresponds to the type/index.
Public methodGetMaterialTextureCount Gets all the number of textures that are of the specified texture type.
Public methodGetMaterialTextures Gets all textures that correspond to the type.
Public methodGetNonTextureProperty Gets the non-texture properties contained in this Material. The name should be the "base name", as in it should not contain texture type/texture index information. E.g. "$clr.diffuse" rather than "$clr.diffuse,0,0". The extra data will be filled in automatically.
Public methodGetProperty(String) Gets the material property by its fully qualified name. The format is: {baseName},{texType},{texIndex}. E.g. "$clr.diffuse,0,0" or "$tex.file,1,0".
Public methodGetProperty(String, TextureType, Int32) Gets the material property. All the input parameters are combined into the fully qualified name: {baseName},{texType},{texIndex}. E.g. "$clr.diffuse,0,0" or "$tex.file,1,0".
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodHasNonTextureProperty Checks if the material has the specified non-texture property. The name should be the "base name", as in it should not contain texture type/texture index information. E.g. "$clr.diffuse" rather than "$clr.diffuse,0,0". The extra data will be filled in automatically.
Public methodHasProperty(String) Checks if the material has the specified property by looking up its fully qualified name. The format is: {baseName},{texType},{texIndex}. E.g. "$clr.diffuse,0,0" or "$tex.file,1,0".
Public methodHasProperty(String, TextureType, Int32) Checks if the material has the specified property. All the input parameters are combined into the fully qualified name: {baseName},{texType},{texIndex}. E.g. "$clr.diffuse,0,0" or "$tex.file,1,0".
Public methodRemoveMaterialTexture Removes a texture from the material - this bulk removes a property for each field. If the texture has no file path, nothing is removed
Public methodRemoveNonTextureProperty Removes a non-texture property from the material.
Public methodRemoveProperty(String) Removes a property from the material.
Public methodRemoveProperty(String, TextureType, Int32) Removes a property from the material.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Extension Methods
 NameDescription
Public Extension MethodMethodInvoke Calls the object method by name.
(Defined by ObjectEx)
Public Extension MethodPropertyGet Gets the value of the object property by name.
(Defined by ObjectEx)
Public Extension MethodPropertyGetT Gets the value of the object property by name.
(Defined by ObjectEx)
Public Extension MethodPropertySet Sets the value of the object property by name.
(Defined by ObjectEx)
Top
See Also