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
http://en.wikipedia.org/wiki/Obj http://www.martinreddy.net/gfx/3d/OBJ.spec http://www.eg-models.de/formats/Format_Obj.html
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
ExportNormals
Gets or sets a value indicating whether to export normals.
public bool ExportNormals { get; set; }
Property Value
FileCreator
Gets or sets the texture image and materials file creator.
public Func<string, Stream> FileCreator { get; set; }
Property Value
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
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
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
Methods
Close(ObjWriters)
Closes the specified writer.
protected override void Close(ObjExporter.ObjWriters writer)
Parameters
writerObjExporter.ObjWritersThe writer.
Create(Stream)
Creates the specified stream.
protected override ObjExporter.ObjWriters Create(Stream stream)
Parameters
streamStreamThe stream.
Returns
- ObjExporter.ObjWriters
StreamWriter.
ExportMesh(StreamWriter, MeshGeometry3D?, Transform3D)
Exports the mesh.
public void ExportMesh(StreamWriter writer, MeshGeometry3D? m, Transform3D t)
Parameters
writerStreamWriterThe writer.
mMeshGeometry3DThe mesh geometry.
tTransform3DThe transform.
ExportModel(ObjWriters, GeometryModel3D, Transform3D)
The export model.
protected override void ExportModel(ObjExporter.ObjWriters writer, GeometryModel3D model, Transform3D transform)
Parameters
writerObjExporter.ObjWritersThe writer.
modelGeometryModel3DThe model.
transformTransform3DThe transform.