Table of Contents

Class OffReader

Namespace
HelixToolkit.SharpDX
Assembly
HelixToolkit.SharpDX.dll

A Geomview Object File Format (OFF) reader.

[Obsolete("Suggest to use HelixToolkit.SharpDX.Assimp")]
public class OffReader : IModelReader
Inheritance
OffReader
Implements
Inherited Members

Remarks

The reader does not parse colors, normals and texture coordinates. Only 3 dimensional vertices are supported. Homogeneous coordinates are not supported. See the following links for information about the file format: http://www.geomview.org/ http://people.sc.fsu.edu/~jburkardt/data/off/off.html http://people.sc.fsu.edu/~jburkardt/html/off_format.html http://segeval.cs.princeton.edu/public/off_format.html http://paulbourke.net/dataformats/off/

Constructors

OffReader()

Initializes a new instance of the OffReader class.

public OffReader()

Properties

Faces

Gets the faces.

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

Property Value

IList<int[]>

Vertices

Gets the vertices.

public IList<Vector3> Vertices { get; }

Property Value

IList<Vector3>

Methods

BuildModel(ModelInfo)

Creates a Model3D object from the loaded file.

public List<Object3D> BuildModel(ModelInfo info = default)

Parameters

info ModelInfo

The model info.

Returns

List<Object3D>

A Model3D group.

CreateMeshGeometry3D(ModelInfo)

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

public MeshGeometry3D CreateMeshGeometry3D(ModelInfo info = default)

Parameters

info ModelInfo

The model info.

Returns

MeshGeometry3D

A MeshGeometry3D.

Read(Stream, ModelInfo)

Reads the model from the specified stream.

public List<Object3D>? Read(Stream s, ModelInfo info = default)

Parameters

s Stream

The stream.

info ModelInfo

The model info.

Returns

List<Object3D>

The model.

Read(string, ModelInfo)

Reads the model from the specified stream.

public List<Object3D>? Read(string path, ModelInfo info = default)

Parameters

path string

The path.

info ModelInfo

The model info.

Returns

List<Object3D>

The model.