TriLib 2.2.8
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
TriLibCore.Interfaces.IMaterial Interface Reference

Represents a TriLib Material. More...

Inheritance diagram for TriLibCore.Interfaces.IMaterial:
TriLibCore.Interfaces.IObject

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.
 

Detailed Description

Represents a TriLib Material.

Member Function Documentation

◆ AddProperty()

void TriLibCore.Interfaces.IMaterial.AddProperty ( string  propertyName,
object  propertyValue,
bool  isTexture 
)

Adds a Property to this Material.

Parameters
propertyNameThe name of the Property to add.
propertyValueThe value of the Property to add.
isTextureIndicates whether the Property is a texture.

◆ ApplyOffsetAndScale()

bool TriLibCore.Interfaces.IMaterial.ApplyOffsetAndScale ( TextureLoadingContext  textureLoadingContext)

Applies per-Material offset and scale to the Context Texture.

Parameters
textureLoadingContextThe Texture Context containing Data from the original and the Unity Texture.
Returns
true if the Offset or Scale has been applied. Otherwise, false.

◆ GetColorValue()

Color TriLibCore.Interfaces.IMaterial.GetColorValue ( string  propertyName)

Tries to get a Property value as a Color.

Parameters
propertyNameThe Property to look for.
Returns
The property value as Color, if found, otherwise, returns white.

◆ GetFloatValue()

float TriLibCore.Interfaces.IMaterial.GetFloatValue ( string  propertyName)

Tries to get a Property value as a Single (float).

Parameters
propertyNameThe Property to look for.
Returns
The property value as float, if found, otherwise, returns 0.

◆ GetGenericColorValue()

Color TriLibCore.Interfaces.IMaterial.GetGenericColorValue ( GenericMaterialProperty  materialProperty)

Tries to get a Property value as a Color.

Parameters
materialPropertyThe Property to look for.
Returns
The property value as Color, if found, otherwise, returns white.

◆ GetGenericColorValueMultiplied()

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.

Parameters
genericMaterialPropertyThe Generic Material Property to get the multiplier from.
materialMapperContextThe Material Mapper Context being filled.
Returns
The material property multiplier for the reader used to parse the model.

◆ GetGenericFloatValue()

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.

Parameters
materialPropertyThe Property to look for.
Returns
The property value as float, if found, otherwise, returns 0.

◆ GetGenericFloatValueMultiplied()

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.

Parameters
genericMaterialPropertyThe Generic Material Property to get the multiplier from.
Returns
The material property multiplier for the reader used to parse the model.

◆ GetGenericIntValue()

int TriLibCore.Interfaces.IMaterial.GetGenericIntValue ( GenericMaterialProperty  materialProperty)

Tries to get a Property value as an Integer.

Parameters
materialPropertyThe Property to look for.
Returns
The property value as int, if found, otherwise, returns 0.

◆ GetGenericPropertyName()

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.

Parameters
genericMaterialPropertyThe Generic Material Property to get the name from.MaterialProperty to get the name from.
Returns
The material property name for the reader used to parse the model.

◆ GetGenericStringValue()

string TriLibCore.Interfaces.IMaterial.GetGenericStringValue ( GenericMaterialProperty  materialProperty)

Tries to get a Property value as a String.

Parameters
materialPropertyThe Property to look for.
Returns
The property value as string, if found, otherwise, returns null.

◆ GetGenericTextureValue()

ITexture TriLibCore.Interfaces.IMaterial.GetGenericTextureValue ( GenericMaterialProperty  materialProperty)

Tries to get a Property value as a Texture.

Parameters
materialPropertyThe Property to look for.
Returns
The property value as Texture, if found, otherwise, returns null.

◆ GetGenericVector3Value()

Vector3 TriLibCore.Interfaces.IMaterial.GetGenericVector3Value ( GenericMaterialProperty  materialProperty)

Tries to get a Property value as a Vector3.

Parameters
materialPropertyThe Property to look for.
Returns
The property value as Vector3, if found, otherwise, returns an empty vector.

◆ GetGenericVector4Value()

Vector4 TriLibCore.Interfaces.IMaterial.GetGenericVector4Value ( GenericMaterialProperty  materialProperty)

Tries to get a Property value as Vector4.

Parameters
materialPropertyThe Property to look for.
Returns
The property value as Vector4, if found, otherwise, returns an empty vector.

◆ GetIntValue()

int TriLibCore.Interfaces.IMaterial.GetIntValue ( string  propertyName)

Tries to get a Property value as an Integer.

Parameters
propertyNameThe Property to look for.
Returns
The property value as int, if found, otherwise, returns 0.

◆ GetStringValue()

string TriLibCore.Interfaces.IMaterial.GetStringValue ( string  propertyName)

Tries to get a Property value as a String.

Parameters
propertyNameThe Property to look for.
Returns
The property value as string, if found, otherwise, returns null.

◆ GetTextureValue()

ITexture TriLibCore.Interfaces.IMaterial.GetTextureValue ( string  propertyName)

Tries to get a Property value as a Texture.

Parameters
propertyNameThe Property to look for.
Returns
The property value as Texture, if found, otherwise, returns null.

◆ GetVector3Value()

Vector3 TriLibCore.Interfaces.IMaterial.GetVector3Value ( string  propertyName)

Tries to get a Property value as a Vector3.

Parameters
propertyNameThe Property to look for.
Returns
The property value as Vector3, if found, otherwise, returns an empty vector.

◆ GetVector4Value()

Vector4 TriLibCore.Interfaces.IMaterial.GetVector4Value ( string  propertyName)

Tries to get a Property value as Vector4.

Parameters
propertyNameThe Property to look for.
Returns
The property value as Vector4, if found, otherwise, returns an empty vector.

◆ HasProperty()

bool TriLibCore.Interfaces.IMaterial.HasProperty ( string  propertyName)

Returns true if the Material has the given Property.

Parameters
propertyNameThe name of the Property to check.
Returns
true if the property has been found, otherwise false.

◆ PostProcessTexture()

bool TriLibCore.Interfaces.IMaterial.PostProcessTexture ( TextureLoadingContext  textureLoadingContext)

Optional method used to post-process a Texture.

Parameters
textureLoadingContextThe Texture Context containing Data from the original and the Unity Texture.
Returns
true if the texture has been processed, otherwise false.

Property Documentation

◆ Index

int TriLibCore.Interfaces.IMaterial.Index
getset

Gets/Sets the index of the material.

The index of the material.

◆ IsAutodeskInteractive

bool TriLibCore.Interfaces.IMaterial.IsAutodeskInteractive
get
Deprecated:
Gets a flag indicating whether this Material should use the Autodesk Interactive Shader.