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
materialCollection
protected readonly Dictionary<MaterialCore, int> materialCollection
Field Value
meshInfos
protected readonly Dictionary<ulong, Exporter.MeshInfo> meshInfos
Field Value
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
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
diffuseDiffuseMaterialCoreThe diffuse.
assimpMaterialMaterialThe assimp material.
AddProperties(PBRMaterialCore, Material)
Adds the properties.
protected virtual void AddProperties(PBRMaterialCore pbr, Material assimpMaterial)
Parameters
pbrPBRMaterialCoreThe PBR.
assimpMaterialMaterialThe assimp material.
AddProperties(PhongMaterialCore, Material)
Adds the properties.
protected virtual void AddProperties(PhongMaterialCore phong, Material assimpMaterial)
Parameters
phongPhongMaterialCoreThe phong.
assimpMaterialMaterialThe 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
disposingbool
ExportToBlob(SceneNode, string, out ExportDataBlob?)
Exports to BLOB.
public ErrorCode ExportToBlob(SceneNode root, string formatId, out ExportDataBlob? blob)
Parameters
Returns
ExportToFile(string, HelixToolkitScene?, string)
Exports to file.
public ErrorCode ExportToFile(string filePath, HelixToolkitScene? scene, string formatId)
Parameters
filePathstringThe file path.
sceneHelixToolkitSceneThe scene.
formatIdstringThe format identifier. SupportedFormats
Returns
ExportToFile(string, SceneNode, string)
Exports to file.
public ErrorCode ExportToFile(string filePath, SceneNode root, string formatId)
Parameters
filePathstringThe file path.
rootSceneNodeThe root.
formatIdstringThe format identifier. SupportedFormats
Returns
GetGeometryFromNode(SceneNode, out Geometry3D?)
Gets the geometry from node. Currently only supports GeometryNode
protected virtual bool GetGeometryFromNode(SceneNode node, out Geometry3D? geometry)
Parameters
nodeSceneNodeThe node.
geometryGeometry3DThe geometry.
Returns
GetMaterialFromNode(SceneNode, out MaterialCore?)
Gets the material from node. Currently only supports MaterialGeometryNode
protected virtual bool GetMaterialFromNode(SceneNode node, out MaterialCore? material)
Parameters
nodeSceneNodeThe node.
materialMaterialCoreThe material.
Returns
OnCreateAssimpMaterial(MaterialCore)
Called when [create assimp material].
protected virtual Material OnCreateAssimpMaterial(MaterialCore material)
Parameters
materialMaterialCoreThe material.
Returns
- Material
OnCreateAssimpMesh(MeshInfo)
Called when [create assimp mesh] from Exporter.MeshInfo.
protected virtual Mesh OnCreateAssimpMesh(Exporter.MeshInfo info)
Parameters
Returns
- Mesh
ToAssimpScene(SceneNode, out Scene)
Convert a HelixToolkit scene graph to the assimp scene.
public ErrorCode ToAssimpScene(SceneNode root, out Scene assimpScene)
Parameters
rootSceneNodeThe HelixToolkit scene graph root node.
assimpSceneSceneThe assimp scene.
Returns
Events
AssimpExceptionOccurred
public event EventHandler<Exception>? AssimpExceptionOccurred