Table of Contents

Class Exporter

Namespace
HelixToolkit.SharpDX.Assimp
Assembly
HelixToolkit.SharpDX.Assimp.dll
public class Exporter : IDisposable
Inheritance
Exporter
Implements
Inherited Members

Fields

geometryCollection

protected readonly Dictionary<Geometry3D, int> geometryCollection

Field Value

Dictionary<Geometry3D, int>

materialCollection

protected readonly Dictionary<MaterialCore, int> materialCollection

Field Value

Dictionary<MaterialCore, int>

meshInfos

protected readonly Dictionary<ulong, Exporter.MeshInfo> meshInfos

Field Value

Dictionary<ulong, Exporter.MeshInfo>

Properties

Configuration

Gets or sets the configuration.

public ExportConfiguration Configuration { get; set; }

Property Value

ExportConfiguration

The configuration.

DefaultTicksPerSecond

public static double DefaultTicksPerSecond { get; set; }

Property Value

double

SupportedFormats

Gets the supported formats.

public static ExportFormatDescription[] SupportedFormats { get; }

Property Value

ExportFormatDescription[]

The supported formats.

SupportedFormatsString

Gets the supported formats string.

public static string SupportedFormatsString { get; }

Property Value

string

The supported formats string.

Methods

AddProperties(DiffuseMaterialCore, Material)

Adds the properties.

protected virtual void AddProperties(DiffuseMaterialCore diffuse, Material assimpMaterial)

Parameters

diffuse DiffuseMaterialCore

The diffuse.

assimpMaterial Material

The assimp material.

AddProperties(PBRMaterialCore, Material)

Adds the properties.

protected virtual void AddProperties(PBRMaterialCore pbr, Material assimpMaterial)

Parameters

pbr PBRMaterialCore

The PBR.

assimpMaterial Material

The assimp material.

AddProperties(PhongMaterialCore, Material)

Adds the properties.

protected virtual void AddProperties(PhongMaterialCore phong, Material assimpMaterial)

Parameters

phong PhongMaterialCore

The phong.

assimpMaterial Material

The assimp material.

Clear()

protected virtual void Clear()

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Dispose(bool)

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

ExportToBlob(SceneNode, string, out ExportDataBlob?)

Exports to BLOB.

public ErrorCode ExportToBlob(SceneNode root, string formatId, out ExportDataBlob? blob)

Parameters

root SceneNode

The root.

formatId string

The format identifier.

blob ExportDataBlob

The BLOB.

Returns

ErrorCode

ExportToFile(string, HelixToolkitScene?, string)

Exports to file.

public ErrorCode ExportToFile(string filePath, HelixToolkitScene? scene, string formatId)

Parameters

filePath string

The file path.

scene HelixToolkitScene

The scene.

formatId string

The format identifier. SupportedFormats

Returns

ErrorCode

ExportToFile(string, SceneNode, string)

Exports to file.

public ErrorCode ExportToFile(string filePath, SceneNode root, string formatId)

Parameters

filePath string

The file path.

root SceneNode

The root.

formatId string

The format identifier. SupportedFormats

Returns

ErrorCode

GetGeometryFromNode(SceneNode, out Geometry3D?)

Gets the geometry from node. Currently only supports GeometryNode

protected virtual bool GetGeometryFromNode(SceneNode node, out Geometry3D? geometry)

Parameters

node SceneNode

The node.

geometry Geometry3D

The geometry.

Returns

bool

GetMaterialFromNode(SceneNode, out MaterialCore?)

Gets the material from node. Currently only supports MaterialGeometryNode

protected virtual bool GetMaterialFromNode(SceneNode node, out MaterialCore? material)

Parameters

node SceneNode

The node.

material MaterialCore

The material.

Returns

bool

OnCreateAssimpMaterial(MaterialCore)

Called when [create assimp material].

protected virtual Material OnCreateAssimpMaterial(MaterialCore material)

Parameters

material MaterialCore

The material.

Returns

Material

OnCreateAssimpMesh(MeshInfo)

Called when [create assimp mesh] from Exporter.MeshInfo.

protected virtual Mesh OnCreateAssimpMesh(Exporter.MeshInfo info)

Parameters

info Exporter.MeshInfo

The information.

Returns

Mesh

ToAssimpScene(SceneNode, out Scene)

Convert a HelixToolkit scene graph to the assimp scene.

public ErrorCode ToAssimpScene(SceneNode root, out Scene assimpScene)

Parameters

root SceneNode

The HelixToolkit scene graph root node.

assimpScene Scene

The assimp scene.

Returns

ErrorCode

Events

AssimpExceptionOccurred

public event EventHandler<Exception>? AssimpExceptionOccurred

Event Type

EventHandler<Exception>