Material describes how an object interacts with light.
More...
|
System::String^ | Name [get] |
| The unique name of the material. More...
|
|
System::String^ | Label [get, set] |
| Optional label. More...
|
|
MaterialType | Type [get, set] |
| The material type. More...
|
|
Color | BaseColor [get, set] |
| Base color. More...
|
|
bool | UseBaseColorFromEntity [get] |
| If this flag is set, DbEntity::Color is used instead of BaseColor. More...
|
|
System::Nullable< float > | Albedo [get, set] |
| Albedo equals the luminance of the base color or the average luminance of the base color texture in linear color space. More...
|
|
float | Metallic [get, set] |
| Metallness of the surface. More...
|
|
float | Roughness [get, set] |
| The roughness of the surface. More...
|
|
float | Transparency [get, set] |
| Transparency. More...
|
|
float | RefractiveIndex [get, set] |
| Index of refraction. More...
|
|
Color | EmissiveColor [get, set] |
| Emissive color. More...
|
|
float | Luminance [get, set] |
| Luminance. More...
|
|
GeMatrix^ | BaseTextureMatrix [get, set] |
| Transformation of all textures except normal texture. More...
|
|
GeMatrix^ | NormalTextureMatrix [get, set] |
| Transformation of normal texture. More...
|
|
bool | ReadOnly [get] |
| Returns if material is read-only. More...
|
|
Material describes how an object interacts with light.
X3g::Plugin::Material::Material |
( |
System::String^ |
pName, |
|
|
MaterialType |
pType |
|
) |
| |
Creates a new material within the current document.
- Exceptions
-
System::NotSupportedException | Thrown if a material with this name already exists. |
void X3g::Plugin::Material::BeginEdit |
( |
) | |
|
Enables editing of material.
This method has to be called before any setters.
void X3g::Plugin::Material::EndEdit |
( |
) | |
|
Finishes editing of material.
Material is written to database when this function is called.
bool X3g::Plugin::Material::Equals |
( |
System::Object^ |
pOther) | |
|
|
overridevirtual |
Compares two Materials.
- Returns
- true if both are equal.
false otherwise.
int X3g::Plugin::Material::GetHashCode |
( |
) | |
|
|
overridevirtual |
Hash the Material and get the hash value.
Returns an optional list of sound absorption values.
Returns texture image of given type.
The base color texture is gamma-corrected (SRGB). Metallic, normal and roughness textures are linear.
Material X3g::Plugin::Material::LoadMatz |
( |
array< unsigned char >^ |
pData) | |
|
|
static |
Load a Material by byte array.
The byte array should have the content of a matz file.
static Material ^ X3g::Plugin::Material::LoadMatz |
( |
System::String^ |
pFileName) | |
|
|
static |
void X3g::Plugin::Material::SetSoundAbsorption |
( |
IEnumerable< SoundAbsorption >^ |
pValues) | |
|
Sets an optional collection of sound absorption values.
void X3g::Plugin::Material::SetTextureImage |
( |
TextureType |
pType, |
|
|
Image^ |
pImage |
|
) |
| |
Sets texture image of given type.
The base color texture is expected to be in SRGB. Metallic, normal and roughness textures should be linear.
Setting base color texture resets Albedo and changes BaseColor to average texture color.
System:: Nullable< float> X3g::Plugin::Material::Albedo |
|
getset |
Albedo equals the luminance of the base color or the average luminance of the base color texture in linear color space.
If albedo is null, the base color or base color texture is used for rendering as it is. If albedo is set, the base color or texture is blended with black or white accordingly for rendering. MaterialUtility provides helper functions to apply albedo to base color.
Color X3g::Plugin::Material::BaseColor |
|
getset |
Base color.
Base color is gamma-corrected (SRGB).
Setting base color resets Albedo.
GeMatrix^ X3g::Plugin::Material::BaseTextureMatrix |
|
getset |
Transformation of all textures except normal texture.
Color X3g::Plugin::Material::EmissiveColor |
|
getset |
Emissive color.
Color of light originating from an object. Emissive color is gamma-corrected (SRGB).
System:: String^ X3g::Plugin::Material::Label |
|
getset |
float X3g::Plugin::Material::Luminance |
|
getset |
Luminance.
The luminance indicates how much luminous power will be detected by an eye looking at the surface from a particular angle of view.
float X3g::Plugin::Material::Metallic |
|
getset |
Metallness of the surface.
System:: String^ X3g::Plugin::Material::Name |
|
get |
The unique name of the material.
GeMatrix^ X3g::Plugin::Material::NormalTextureMatrix |
|
getset |
Transformation of normal texture.
bool X3g::Plugin::Material::ReadOnly |
|
get |
Returns if material is read-only.
It's not allowed to change properties of read-only materials.
float X3g::Plugin::Material::RefractiveIndex |
|
getset |
Index of refraction.
Can be changed for MaterialType::Glass only.
float X3g::Plugin::Material::Roughness |
|
getset |
The roughness of the surface.
float X3g::Plugin::Material::Transparency |
|
getset |
Transparency.
Transparency is the percentage of light which passes through the material without being scattered.
bool X3g::Plugin::Material::UseBaseColorFromEntity |
|
get |