Material Class |
public sealed class Material : IMarshalable<Material, AiMaterial>
The Material type exposes the following members.
| Name | Description | |
|---|---|---|
| BlendMode | Gets the blending mode. Default value is Default. | |
| BumpScaling | Gets the bump scaling. Default value is 0.0f; | |
| ColorAmbient | Gets the color ambient. Default value is (.2f, .2f, .2f, 1.0f). | |
| ColorDiffuse | Gets the color diffuse. Default value is white. | |
| ColorEmissive | Gets the color emissive. Default value is black. | |
| ColorReflective | Gets the color reflective. Default value is black. | |
| ColorSpecular | Gets the color specular. Default value is black. | |
| ColorTransparent | Gets the color transparent. Default value is black. | |
| HasBlendMode | Checks if the material has a blend mode property. | |
| HasBumpScaling | Checks if the material has a bump scaling property. | |
| HasColorAmbient | Checks if the material has a color ambient property. | |
| HasColorDiffuse | Checks if the material has a color diffuse property. | |
| HasColorEmissive | Checks if the material has a color emissive property. | |
| HasColorReflective | Checks if the material has a color reflective property. | |
| HasColorSpecular | Checks if the material has a color specular property. | |
| HasColorTransparent | Checks if the material has a color transparent property. | |
| HasName | Checks if the material has a name property. | |
| HasOpacity | Checks if the material has an opacity property. | |
| HasReflectivity | Checks if the material has a reflectivty property. | |
| HasShaders | Gets if the material has embedded shader source code. | |
| HasShadingMode | Checks if the material has a shading-mode property. | |
| HasShininess | Checks if the material has a shininess property. | |
| HasShininessStrength | Checks if the material has a shininess strength property. | |
| HasTextureAmbient | Gets if the material has a ambient texture in the first texture index. | |
| HasTextureAmbientOcclusion | Gets if the material has an ambient occlusion map in in the first texture index. | |
| HasTextureDiffuse | Gets if the material has a diffuse texture in the first texture index. | |
| HasTextureDisplacement | Gets if the material has a displacement texture in the first texture index. | |
| HasTextureEmissive | Gets if the material has a emissive texture in the first texture index. | |
| HasTextureHeight | Gets if the material has a height texture in the first texture index. | |
| HasTextureLightMap | Gets if the material has a light map texture in the first texture index. | |
| HasTextureNormal | Gets if the material has a normal texture in the first texture index. | |
| HasTextureOpacity | Gets if the material has an opacity texture in the first texture index. | |
| HasTextureReflection | Gets if the material has a reflection texture in the first texture index. | |
| HasTextureSpecular | Gets if the material has a specular texture in the first texture index. | |
| HasTransparencyFactor | Checks if the material has a transparency factor property. | |
| HasTwoSided | Checks if the material has a two-sided property. | |
| HasWireFrame | Checks if the material has a wireframe property. | |
| IsPBRMaterial | Determines if the material is part of a PBR workflow or not. | |
| IsTwoSided | Gets if the material should be rendered as two-sided. Default value is false. | |
| IsWireFrameEnabled | Gets if wireframe should be enabled. Default value is false. | |
| Name | Gets the material name value, if any. Default value is an empty string. | |
| Opacity | Gets the opacity. Default value is 1.0f. | |
| PBR | Gets a group accessor for any PBR properties in the material. | |
| PropertyCount | Gets the number of properties contained in the material. | |
| Reflectivity | Gets the reflectivity. Default value is 0.0f; | |
| Shaders | Gets a group accessor for any embedded shader source code in the material. | |
| ShadingMode | Gets the shading mode. Default value is None, meaning it is not defined. | |
| Shininess | Gets the shininess. Default value is 0.0f; | |
| ShininessStrength | Gets the shininess strength. Default vaulue is 1.0f. | |
| TextureAmbient | Gets or sets ambient texture properties in the first texture index. | |
| TextureAmbientOcclusion | Gets or sets ambient occlusion texture properties in the first texture index. | |
| TextureDiffuse | Gets or sets diffuse texture properties in the first texture index. | |
| TextureDisplacement | Gets or sets displacement texture properties in the first texture index. | |
| TextureEmissive | Gets or sets emissive texture properties in the first texture index. | |
| TextureHeight | Gets or sets height texture properties in the first texture index. | |
| TextureLightMap | Gets or sets light map texture properties in the first texture index. | |
| TextureNormal | Gets or sets normal texture properties in the first texture index. | |
| TextureOpacity | Gets or sets opacity texture properties in the first texture index. | |
| TextureReflection | Gets or sets reflection texture properties in the first texture index. | |
| TextureSpecular | Gets or sets specular texture properties in the first texture index. | |
| TransparencyFactor | Gets the transparency factor. This is used to make a surface more or less opaque (0 = opaque, 1 = transparent). Default value is 0.0f. |
| 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) |