Class STLRuntime
STL file loader at runtime. Source: https://github.com/karl-/pb_Stl/blob/master/Runtime/Importer.cs.
Namespace: Evergine.Runtimes.STL
Assembly: Evergine.Runtimes.STL.dll
Syntax
public class STLRuntime : ModelRuntime
Constructors
STLRuntime(GraphicsContext, AssetsService, AssetsDirectory)
Initializes a new instance of the STLRuntime class.
Declaration
public STLRuntime(GraphicsContext graphicsContext, AssetsService assetsService, AssetsDirectory assetsDirectory)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphicsContext | graphicsContext | Graphics Context instance. |
| AssetsService | assetsService | Assets Service instance. |
| AssetsDirectory | assetsDirectory | Assets Directory instance. |
Fields
Instance
Gets the a default instance of the class resolving the required services using the default Evergine container.
Declaration
public static readonly STLRuntime Instance
Field Value
| Type | Description |
|---|---|
| STLRuntime |
Properties
Extension
Gets the 3D format extension.
Declaration
public override string Extension { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
Methods
Read(Stream, Func<MaterialData, Task<Material>>)
Reads an STL from the stream.
Declaration
public override Task<Model> Read(Stream stream, Func<MaterialData, Task<Material>> materialAssigner = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | stream | The stream. |
| Func<MaterialData, Task<Material>> | materialAssigner | The material assigner function. |
Returns
| Type | Description |
|---|---|
| Task<Model> | The model. |
Overrides
Read(string, Func<MaterialData, Task<Material>>)
Reads an STL from the file path.
Declaration
public Task<Model> Read(string filePath, Func<MaterialData, Task<Material>> materialAssigner = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | filePath | The file path. |
| Func<MaterialData, Task<Material>> | materialAssigner | The material assigner. |
Returns
| Type | Description |
|---|---|
| Task<Model> | The model. |