Class OBJMaterialData
Represents the material data for an OBJ file.
Namespace: Evergine.Runtimes.OBJ
Assembly: Evergine.Runtimes.OBJ.dll
Syntax
public class OBJMaterialData : MaterialData
Constructors
OBJMaterialData(OBJMaterial, int, OBJRuntime)
Initializes a new instance of the OBJMaterialData class.
Declaration
public OBJMaterialData(OBJMaterial objMaterial, int materialId, OBJRuntime objRuntime)
Parameters
| Type | Name | Description |
|---|---|---|
| OBJMaterial | objMaterial | The material data parsed from the OBJ file. |
| int | materialId | The unique identifier for the material. |
| OBJRuntime | objRuntime | The runtime instance responsible for handling OBJ assets. |
Fields
OBJ
The unique identifier for the material.
Declaration
public OBJRuntime OBJ
Field Value
| Type | Description |
|---|---|
| OBJRuntime |
OBJMaterial
The material data parsed from the OBJ file.
Declaration
public OBJMaterial OBJMaterial
Field Value
| Type | Description |
|---|---|
| OBJMaterial |
Properties
AlphaCutoff
Gets the alpha test value.
Declaration
public override float AlphaCutoff { get; }
Property Value
| Type | Description |
|---|---|
| float |
Overrides
AlphaMode
Gets the alpha mode (opaque, mask, blend).
Declaration
public override AlphaMode AlphaMode { get; }
Property Value
| Type | Description |
|---|---|
| AlphaMode |
Overrides
BaseColor
Gets the diffuse color.
Declaration
public override Color BaseColor { get; }
Property Value
| Type | Description |
|---|---|
| Color |
Overrides
EmissiveColor
Gets the emission factor.
Declaration
public override LinearColor EmissiveColor { get; }
Property Value
| Type | Description |
|---|---|
| LinearColor |
Overrides
HasDoubleSided
Gets a value indicating whether the material must render with double sided.
Declaration
public override bool HasDoubleSided { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
HasVertexColor
Gets a value indicating whether the vertex format has color.
Declaration
public override bool HasVertexColor { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
HasVertexNormal
Gets a value indicating whether the vertex format has normals.
Declaration
public override bool HasVertexNormal { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
HasVertexTangent
Gets a value indicating whether the vertex format has a tangent.
Declaration
public override bool HasVertexTangent { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
HasVertexTexcoord
Gets a value indicating whether the vertex format has texture coordinates.
Declaration
public override bool HasVertexTexcoord { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
MetallicFactor
Gets the metallic factor.
Declaration
public override float MetallicFactor { get; }
Property Value
| Type | Description |
|---|---|
| float |
Overrides
Name
Gets the material name.
Declaration
public override string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
RoughnessFactor
Gets the roughness factor.
Declaration
public override float RoughnessFactor { get; }
Property Value
| Type | Description |
|---|---|
| float |
Overrides
Methods
GetBaseColorTextureAndSampler()
Gets the diffuse color texture.
Declaration
public override Task<(Texture Texture, SamplerState Sampler)> GetBaseColorTextureAndSampler()
Returns
| Type | Description |
|---|---|
| Task<(Texture Texture, SamplerState Sampler)> | Texture and sampler instances. |
Overrides
GetEmissiveTextureAndSampler()
Gets the emissive texture.
Declaration
public override Task<(Texture Texture, SamplerState Sampler)> GetEmissiveTextureAndSampler()
Returns
| Type | Description |
|---|---|
| Task<(Texture Texture, SamplerState Sampler)> | Texture and sampler instances. |
Overrides
GetMetallicRoughnessTextureAndSampler()
Gets the metallic roughness texture.
Declaration
public override Task<(Texture Texture, SamplerState Sampler)> GetMetallicRoughnessTextureAndSampler()
Returns
| Type | Description |
|---|---|
| Task<(Texture Texture, SamplerState Sampler)> | Texture and sampler instance. |
Overrides
GetNormalTextureAndSampler()
Gets the normal texture.
Declaration
public override Task<(Texture Texture, SamplerState Sampler)> GetNormalTextureAndSampler()
Returns
| Type | Description |
|---|---|
| Task<(Texture Texture, SamplerState Sampler)> | Texture and sampler instance. |
Overrides
GetOcclusionTextureAndSampler()
Gets the occlusion texture.
Declaration
public override Task<(Texture Texture, SamplerState Sampler)> GetOcclusionTextureAndSampler()
Returns
| Type | Description |
|---|---|
| Task<(Texture Texture, SamplerState Sampler)> | Texture and sampler instance. |