Table of Contents

Class ObjExporter

Namespace
HelixToolkit.Wpf
Assembly
HelixToolkit.Wpf.dll

Export the 3D visual tree to a Wavefront OBJ file

public sealed class ObjExporter : Exporter<ObjExporter.ObjWriters>, IExporter
Inheritance
ObjExporter
Implements
Inherited Members

Remarks

Constructors

ObjExporter()

Initializes a new instance of the ObjExporter class.

public ObjExporter()

Properties

Comment

Gets or sets the comment.

public string? Comment { get; set; }

Property Value

string

ExportNormals

Gets or sets a value indicating whether to export normals.

public bool ExportNormals { get; set; }

Property Value

bool

FileCreator

Gets or sets the texture image and materials file creator.

public Func<string, Stream> FileCreator { get; set; }

Property Value

Func<string, Stream>

A function used to create streams for texture images and material files.

MaterialsFile

Gets or sets the materials file.

public string? MaterialsFile { get; set; }

Property Value

string

The materials file.

SwitchYZ

Gets or sets a value indicating whether to switch Y and Z coordinates.

public bool SwitchYZ { get; set; }

Property Value

bool

TextureExtension

Gets or sets the texture extension (.png or .jpg).

public string TextureExtension { get; set; }

Property Value

string

The default value is ".png".

TextureFolder

Gets or sets the texture folder.

public string TextureFolder { get; set; }

Property Value

string

TextureQualityLevel

Gets or sets the texture quality level (for JPEG encoding).

public int TextureQualityLevel { get; set; }

Property Value

int

The quality level of the JPEG image. The value range is 1 (lowest quality) to 100 (highest quality) inclusive. The default value is 90.

TextureSize

Gets or sets the texture size.

public int TextureSize { get; set; }

Property Value

int

The default value is 1024.

UseDissolveForTransparency

Gets or sets a value indicating whether to use "d" for transparency (default is "Tr").

public bool UseDissolveForTransparency { get; set; }

Property Value

bool

Methods

Close(ObjWriters)

Closes the specified writer.

protected override void Close(ObjExporter.ObjWriters writer)

Parameters

writer ObjExporter.ObjWriters

The writer.

Create(Stream)

Creates the specified stream.

protected override ObjExporter.ObjWriters Create(Stream stream)

Parameters

stream Stream

The stream.

Returns

ObjExporter.ObjWriters

StreamWriter.

ExportMesh(StreamWriter, MeshGeometry3D?, Transform3D)

Exports the mesh.

public void ExportMesh(StreamWriter writer, MeshGeometry3D? m, Transform3D t)

Parameters

writer StreamWriter

The writer.

m MeshGeometry3D

The mesh geometry.

t Transform3D

The transform.

ExportModel(ObjWriters, GeometryModel3D, Transform3D)

The export model.

protected override void ExportModel(ObjExporter.ObjWriters writer, GeometryModel3D model, Transform3D transform)

Parameters

writer ObjExporter.ObjWriters

The writer.

model GeometryModel3D

The model.

transform Transform3D

The transform.