Table of Contents

Class OffReader

Namespace
HelixToolkit.Wpf
Assembly
HelixToolkit.Wpf.dll

Provides an Object File Format (OFF) reader.

public sealed class OffReader : ModelReader, IModelReader
Inheritance
OffReader
Implements
Inherited Members

Remarks

The reader does not parse colors, normal vectors and texture coordinates. Only 3 dimensional vertices are supported. Homogeneous coordinates are not supported.

Constructors

OffReader(Dispatcher?)

Initializes a new instance of the OffReader class.

public OffReader(Dispatcher? dispatcher = null)

Parameters

dispatcher Dispatcher

The dispatcher.

Properties

Faces

Gets the faces.

public IList<int[]> Faces { get; }

Property Value

IList<int[]>

Vertices

Gets the vertices.

public IList<Point3D> Vertices { get; }

Property Value

IList<Point3D>

Methods

CreateMesh()

Creates a mesh from the loaded file.

public Mesh3D CreateMesh()

Returns

Mesh3D

A Mesh3D.

CreateMeshGeometry3D()

Creates a MeshGeometry3D object from the loaded file. Polygons are triangulated using triangle fans.

public MeshGeometry3D CreateMeshGeometry3D()

Returns

MeshGeometry3D

A MeshGeometry3D.

CreateModel3D()

Creates a Model3DGroup from the loaded file.

public Model3DGroup CreateModel3D()

Returns

Model3DGroup

A Model3DGroup.

Load(Stream)

Loads the model from the specified stream.

public void Load(Stream s)

Parameters

s Stream

The stream.

Read(Stream)

Reads the model from the specified stream.

public override Model3DGroup Read(Stream s)

Parameters

s Stream

The stream.

Returns

Model3DGroup

A Model3DGroup.