Material Methods |
The Material type exposes the following members.
| Name | Description | |
|---|---|---|
| AddMaterialTexture(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. | |
| AddMaterialTexture(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. | |
| AddProperty | Adds a property to this material. | |
| Clear | Removes all properties from the material; | |
| CreateFullyQualifiedName | 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. | |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
| FreeNative | Frees unmanaged memory created by ToNative(IntPtr, Native). | |
| GetAllProperties | Gets -all- properties contained in the Material. | |
| GetHashCode | Serves as the default hash function. (Inherited from Object) | |
| GetMaterialTexture | Gets a texture that corresponds to the type/index. | |
| GetMaterialTextureCount | Gets all the number of textures that are of the specified texture type. | |
| GetMaterialTextures | Gets all textures that correspond to the type. | |
| GetNonTextureProperty | 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. | |
| GetProperty(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". | |
| GetProperty(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". | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| HasNonTextureProperty | 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. | |
| HasProperty(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". | |
| HasProperty(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". | |
| RemoveMaterialTexture | Removes a texture from the material - this bulk removes a property for each field. If the texture has no file path, nothing is removed | |
| RemoveNonTextureProperty | Removes a non-texture property from the material. | |
| RemoveProperty(String) | Removes a property from the material. | |
| RemoveProperty(String, TextureType, Int32) | Removes a property from the material. | |
| ToString | Returns a string that represents the current object. (Inherited from Object) |
| Name | Description | |
|---|---|---|
| MethodInvoke |
Calls the object method by name.
(Defined by ObjectEx) | |
| PropertyGet |
Gets the value of the object property by name.
(Defined by ObjectEx) | |
| PropertyGetT |
Gets the value of the object property by name.
(Defined by ObjectEx) | |
| PropertySet |
Sets the value of the object property by name.
(Defined by ObjectEx) |