Class VirtualMaterial
Represents a container to hold Material properties temporarily.
Inherited Members
Namespace: TriLibCore.General
Assembly: TriLibCore.dll
Syntax
public class VirtualMaterial
Constructors
VirtualMaterial()
Declaration
public VirtualMaterial()
Fields
GlobalIlluminationFlags
Material global illumination flags.
Declaration
public MaterialGlobalIlluminationFlags GlobalIlluminationFlags
Field Value
Type | Description |
---|---|
MaterialGlobalIlluminationFlags |
HasAlpha
Does the material contains alpha diffuse textures or color?
Declaration
public bool HasAlpha
Field Value
Type | Description |
---|---|
bool |
Offset
The Material offset.
Declaration
public Vector2 Offset
Field Value
Type | Description |
---|---|
Vector2 |
Tiling
The Material tiling.
Declaration
public Vector2 Tiling
Field Value
Type | Description |
---|---|
Vector2 |
Properties
ColorProperties
Gets the Material Color Properties.
Declaration
public Dictionary<string, Color> ColorProperties { get; }
Property Value
Type | Description |
---|---|
Dictionary<string, Color> |
FloatProperties
Gets the Material float Properties.
Declaration
public Dictionary<string, float> FloatProperties { get; }
Property Value
Type | Description |
---|---|
Dictionary<string, float> |
HasEmissionColor
Indicates whether the source material has an emission color.
Declaration
public bool HasEmissionColor { get; set; }
Property Value
Type | Description |
---|---|
bool |
Keywords
Gets the Material Keywords.
Declaration
public Dictionary<string, bool> Keywords { get; }
Property Value
Type | Description |
---|---|
Dictionary<string, bool> |
TextureProperties
Gets the Material Color Properties.
Declaration
public Dictionary<string, Texture> TextureProperties { get; }
Property Value
Type | Description |
---|---|
Dictionary<string, Texture> |
VectorProperties
Gets the Material Vector Properties.
Declaration
public Dictionary<string, Vector3> VectorProperties { get; }
Property Value
Type | Description |
---|---|
Dictionary<string, Vector3> |
Methods
DisableKeyword(string)
Disables a Material Keyword.
Declaration
public void DisableKeyword(string keyword)
Parameters
Type | Name | Description |
---|---|---|
string | keyword | The Keyword to disable. |
EnableKeyword(string)
Enables the given Material Keyword.
Declaration
public void EnableKeyword(string keyword)
Parameters
Type | Name | Description |
---|---|---|
string | keyword | The Keyword to enable. |
GenericPropertyIsSetAndValid(GenericMaterialProperty)
Returns whether the given Generic Material Property is set and valid. If the Property is a Color, the matching Texture slot will be checked as well.
Declaration
public bool GenericPropertyIsSetAndValid(GenericMaterialProperty genericMaterialProperty)
Parameters
Type | Name | Description |
---|---|---|
GenericMaterialProperty | genericMaterialProperty | The Generic Material Property to search for. |
Returns
Type | Description |
---|---|
bool |
|
SetProperty(string, float, GenericMaterialProperty)
Sets a Material Single (float) Property.
Declaration
public void SetProperty(string property, float value, GenericMaterialProperty genericMaterialProperty = GenericMaterialProperty.Unknown)
Parameters
Type | Name | Description |
---|---|---|
string | property | The Property to set. |
float | value | The Property value. |
GenericMaterialProperty | genericMaterialProperty | The GenericMaterialProperty that was used to load the given value. |
SetProperty(string, Color, GenericMaterialProperty)
Sets a Material Single (float) Property.
Declaration
public void SetProperty(string property, Color value, GenericMaterialProperty genericMaterialProperty = GenericMaterialProperty.Unknown)
Parameters
Type | Name | Description |
---|---|---|
string | property | The Property to set. |
Color | value | The Property value. |
GenericMaterialProperty | genericMaterialProperty | The GenericMaterialProperty that was used to load the given value. |
SetProperty(string, Texture, GenericMaterialProperty)
Sets a Material Single (float) Property.
Declaration
public void SetProperty(string property, Texture value, GenericMaterialProperty genericMaterialProperty = GenericMaterialProperty.Unknown)
Parameters
Type | Name | Description |
---|---|---|
string | property | The Property to set. |
Texture | value | The Property value. |
GenericMaterialProperty | genericMaterialProperty | The GenericMaterialProperty that was used to load the given value. |
SetProperty(string, Vector3, GenericMaterialProperty)
Sets a Material Single (float) Property.
Declaration
public void SetProperty(string property, Vector3 value, GenericMaterialProperty genericMaterialProperty = GenericMaterialProperty.Unknown)
Parameters
Type | Name | Description |
---|---|---|
string | property | The Property to set. |
Vector3 | value | The Property value. |
GenericMaterialProperty | genericMaterialProperty | The GenericMaterialProperty that was used to load the given value. |