TriLib 2.2.8
|
Represents a TriLib Material. More...
Public Member Functions | |
float | GetFloatValue (string propertyName) |
Tries to get a Property value as a Single (float). | |
float | GetGenericFloatValue (GenericMaterialProperty materialProperty) |
Tries to get a Property value as a Single Tries to get a Property value as a Single (float). GetFloatValue:summary False. | |
int | GetIntValue (string propertyName) |
Tries to get a Property value as an Integer. | |
int | GetGenericIntValue (GenericMaterialProperty materialProperty) |
Tries to get a Property value as an Integer. | |
string | GetStringValue (string propertyName) |
Tries to get a Property value as a String. | |
string | GetGenericStringValue (GenericMaterialProperty materialProperty) |
Tries to get a Property value as a String. | |
Vector3 | GetVector3Value (string propertyName) |
Tries to get a Property value as a Vector3. | |
Vector3 | GetGenericVector3Value (GenericMaterialProperty materialProperty) |
Tries to get a Property value as a Vector3. | |
Vector4 | GetVector4Value (string propertyName) |
Tries to get a Property value as Vector4. | |
Vector4 | GetGenericVector4Value (GenericMaterialProperty materialProperty) |
Tries to get a Property value as Vector4. | |
Color | GetColorValue (string propertyName) |
Tries to get a Property value as a Color. | |
Color | GetGenericColorValue (GenericMaterialProperty materialProperty) |
Tries to get a Property value as a Color. | |
ITexture | GetTextureValue (string propertyName) |
Tries to get a Property value as a Texture. | |
ITexture | GetGenericTextureValue (GenericMaterialProperty materialProperty) |
Tries to get a Property value as a Texture. | |
void | AddProperty (string propertyName, object propertyValue, bool isTexture) |
Adds a Property to this Material. | |
string | GetGenericPropertyName (GenericMaterialProperty genericMaterialProperty) |
Returns the generic Material Property name from the Parser used to parse the Model. Some Materials used by specific Readers may use different names on Properties. | |
Color | GetGenericColorValueMultiplied (GenericMaterialProperty genericMaterialProperty, MaterialMapperContext materialMapperContext=null) |
Returns the generic Material Color Property multiplier from the Parser used to parse the Model. Some Materials used by specific Readers may use different values on Properties. | |
float | GetGenericFloatValueMultiplied (GenericMaterialProperty genericMaterialProperty, MaterialMapperContext materialMapperContext=null) |
Returns the generic Material Float Property multiplier from the Parser used to parse the Model. Some Materials used by specific Readers may use different values on Properties. | |
bool | HasProperty (string propertyName) |
Returns true if the Material has the given Property. | |
bool | PostProcessTexture (TextureLoadingContext textureLoadingContext) |
Optional method used to post-process a Texture. | |
bool | ApplyOffsetAndScale (TextureLoadingContext textureLoadingContext) |
Applies per-Material offset and scale to the Context Texture. | |
Properties | |
bool | DoubleSided [get, set] |
Defines whether this material must be rendered from both sides. | |
bool | MixAlbedoColorWithTexture [get] |
Defines whether the albedo color from this material will be multiplied with the albedo texture. | |
MaterialShadingSetup | MaterialShadingSetup [get] |
Represents a material shading setup. | |
int | Index [get, set] |
Gets/Sets the index of the material. | |
bool | IsAutodeskInteractive [get] |
bool | Processing [get, set] |
bool | Processed [get, set] |
bool | UsesAlpha [get] |
Indicates if this Material uses any Alpha Texture or value. | |
Properties inherited from TriLibCore.Interfaces.IObject | |
string | Name [get, set] |
Gets/Sets the Object name. | |
bool | Used [get, set] |
Gets/Sets the flag indicating whether this object used somewhere. | |
Represents a TriLib Material.
void TriLibCore.Interfaces.IMaterial.AddProperty | ( | string | propertyName, |
object | propertyValue, | ||
bool | isTexture | ||
) |
Adds a Property to this Material.
propertyName | The name of the Property to add. |
propertyValue | The value of the Property to add. |
isTexture | Indicates whether the Property is a texture. |
bool TriLibCore.Interfaces.IMaterial.ApplyOffsetAndScale | ( | TextureLoadingContext | textureLoadingContext | ) |
Applies per-Material offset and scale to the Context Texture.
textureLoadingContext | The Texture Context containing Data from the original and the Unity Texture. |
true
if the Offset or Scale has been applied. Otherwise, false
.Color TriLibCore.Interfaces.IMaterial.GetColorValue | ( | string | propertyName | ) |
Tries to get a Property value as a Color.
propertyName | The Property to look for. |
float TriLibCore.Interfaces.IMaterial.GetFloatValue | ( | string | propertyName | ) |
Tries to get a Property value as a Single (float).
propertyName | The Property to look for. |
Color TriLibCore.Interfaces.IMaterial.GetGenericColorValue | ( | GenericMaterialProperty | materialProperty | ) |
Tries to get a Property value as a Color.
materialProperty | The Property to look for. |
Color TriLibCore.Interfaces.IMaterial.GetGenericColorValueMultiplied | ( | GenericMaterialProperty | genericMaterialProperty, |
MaterialMapperContext | materialMapperContext = null |
||
) |
Returns the generic Material Color Property multiplier from the Parser used to parse the Model. Some Materials used by specific Readers may use different values on Properties.
genericMaterialProperty | The Generic Material Property to get the multiplier from. |
materialMapperContext | The Material Mapper Context being filled. |
float TriLibCore.Interfaces.IMaterial.GetGenericFloatValue | ( | GenericMaterialProperty | materialProperty | ) |
Tries to get a Property value as a Single Tries to get a Property value as a Single (float). GetFloatValue:summary False.
materialProperty | The Property to look for. |
float TriLibCore.Interfaces.IMaterial.GetGenericFloatValueMultiplied | ( | GenericMaterialProperty | genericMaterialProperty, |
MaterialMapperContext | materialMapperContext = null |
||
) |
Returns the generic Material Float Property multiplier from the Parser used to parse the Model. Some Materials used by specific Readers may use different values on Properties.
genericMaterialProperty | The Generic Material Property to get the multiplier from. |
int TriLibCore.Interfaces.IMaterial.GetGenericIntValue | ( | GenericMaterialProperty | materialProperty | ) |
Tries to get a Property value as an Integer.
materialProperty | The Property to look for. |
string TriLibCore.Interfaces.IMaterial.GetGenericPropertyName | ( | GenericMaterialProperty | genericMaterialProperty | ) |
Returns the generic Material Property name from the Parser used to parse the Model. Some Materials used by specific Readers may use different names on Properties.
genericMaterialProperty | The Generic Material Property to get the name from.MaterialProperty to get the name from. |
string TriLibCore.Interfaces.IMaterial.GetGenericStringValue | ( | GenericMaterialProperty | materialProperty | ) |
Tries to get a Property value as a String.
materialProperty | The Property to look for. |
null
.ITexture TriLibCore.Interfaces.IMaterial.GetGenericTextureValue | ( | GenericMaterialProperty | materialProperty | ) |
Tries to get a Property value as a Texture.
materialProperty | The Property to look for. |
Vector3 TriLibCore.Interfaces.IMaterial.GetGenericVector3Value | ( | GenericMaterialProperty | materialProperty | ) |
Tries to get a Property value as a Vector3.
materialProperty | The Property to look for. |
Vector4 TriLibCore.Interfaces.IMaterial.GetGenericVector4Value | ( | GenericMaterialProperty | materialProperty | ) |
Tries to get a Property value as Vector4.
materialProperty | The Property to look for. |
int TriLibCore.Interfaces.IMaterial.GetIntValue | ( | string | propertyName | ) |
Tries to get a Property value as an Integer.
propertyName | The Property to look for. |
string TriLibCore.Interfaces.IMaterial.GetStringValue | ( | string | propertyName | ) |
Tries to get a Property value as a String.
propertyName | The Property to look for. |
null
.ITexture TriLibCore.Interfaces.IMaterial.GetTextureValue | ( | string | propertyName | ) |
Tries to get a Property value as a Texture.
propertyName | The Property to look for. |
Vector3 TriLibCore.Interfaces.IMaterial.GetVector3Value | ( | string | propertyName | ) |
Tries to get a Property value as a Vector3.
propertyName | The Property to look for. |
Vector4 TriLibCore.Interfaces.IMaterial.GetVector4Value | ( | string | propertyName | ) |
Tries to get a Property value as Vector4.
propertyName | The Property to look for. |
bool TriLibCore.Interfaces.IMaterial.HasProperty | ( | string | propertyName | ) |
Returns true
if the Material has the given Property.
propertyName | The name of the Property to check. |
true
if the property has been found, otherwise false
.bool TriLibCore.Interfaces.IMaterial.PostProcessTexture | ( | TextureLoadingContext | textureLoadingContext | ) |
Optional method used to post-process a Texture.
textureLoadingContext | The Texture Context containing Data from the original and the Unity Texture. |
true
if the texture has been processed, otherwise false
.
|
getset |
Gets/Sets the index of the material.
The index of the material.
|
get |