Class OBJMaterialStreamReader
Provides functionality to read material definitions (MTL) from a stream, such as a MemoryStream.
Namespace: Evergine.Runtimes.OBJ.DataTypes
Assembly: Evergine.Runtimes.OBJ.dll
Syntax
public class OBJMaterialStreamReader
Constructors
OBJMaterialStreamReader(Stream)
Initializes a new instance of the OBJMaterialStreamReader class.
Declaration
public OBJMaterialStreamReader(Stream inStream)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | inStream | The input stream containing the material data. |
Methods
Read(string, List<OBJMaterial>, Dictionary<string, int>, out string, out string)
Reads material data from the stream and populates the provided materials and material map.
Declaration
public bool Read(string matId, List<OBJMaterial> materials, Dictionary<string, int> matMap, out string warning, out string error)
Parameters
| Type | Name | Description |
|---|---|---|
| string | matId | The material identifier to read. |
| List<OBJMaterial> | materials | The list to populate with OBJMaterial objects. |
| Dictionary<string, int> | matMap | The dictionary to populate with material names and their indices. |
| string | warning | Outputs any warnings encountered during the read operation. |
| string | error | Outputs any errors encountered during the read operation. |
Returns
| Type | Description |
|---|---|
| bool |
|