C# Класс HelixToolkit.Wpf.SharpDX.ObjReader

A Wavefront .obj file reader.
See the file format specifications at http://en.wikipedia.org/wiki/Obj http://en.wikipedia.org/wiki/Material_Template_Library http://www.martinreddy.net/gfx/3d/OBJ.spec http://www.eg-models.de/formats/Format_Obj.html
Наследование: IModelReader
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AddFace void
AddGroup void
AddNormal void
AddTexCoord void
AddVertex void
BuildModel System.Collections.Generic.List
ColorParse global::SharpDX.Color4
DoubleParse double
EnsureNewMesh void
GetMaterial HelixToolkit.Wpf.SharpDX.Material
LoadMaterialLib void
SetMaterial void
SetSmoothingGroup void
Split IList
SplitLine void

Открытые методы

Метод Описание
ObjReader ( ) : System

Initializes a new instance of the ObjReader class.

Read ( Stream s, HelixToolkit.Wpf.SharpDX.ModelInfo info = default(ModelInfo) ) : System.Collections.Generic.List

Reads the model from the specified stream.

Read ( string path, HelixToolkit.Wpf.SharpDX.ModelInfo info = default(ModelInfo) ) : System.Collections.Generic.List

Reads the model from the specified path.

ReadZ ( string path ) : System.Collections.Generic.List

Reads a GZipStream compressed OBJ file.

This is a file format used by Helix Toolkit only. Use the GZipHelper class to compress an .obj file.

Приватные методы

Метод Описание
AddFace ( string values ) : void

Adds a face.

Adds a polygonal face. The numbers are indexes into the arrays of vertex positions, texture coordinates, and normals respectively. A number may be omitted if, for example, texture coordinates are not being defined in the model. There is no maximum number of vertices that a single polygon may contain. The .obj file specification says that each face must be flat and convex.

AddGroup ( string name ) : void

Adds a group with the specified name.

AddNormal ( string values ) : void

Adds a normal.

AddTexCoord ( string values ) : void

Adds a texture coordinate.

AddVertex ( string values ) : void

Adds a vertex.

BuildModel ( ) : System.Collections.Generic.List

Builds the model.

ColorParse ( string values ) : global::SharpDX.Color4

Parses a color string.

DoubleParse ( string input ) : double

Parse a string containing a double value.

EnsureNewMesh ( ) : void

Ensures that a new mesh is created.

GetMaterial ( string materialName ) : HelixToolkit.Wpf.SharpDX.Material

Gets the material with the specified name.

LoadMaterialLib ( string mtlFile ) : void

Loads a material library.

SetMaterial ( string materialName ) : void

Sets the material for the current group.

SetSmoothingGroup ( string values ) : void

Sets the smoothing group number.

Split ( string input ) : IList

Splits the specified string using whitespace(input) as separators.

SplitLine ( string line, string &keyword, string &arguments ) : void

Splits a line in keyword and arguments.

Описание методов

ObjReader() публичный Метод

Initializes a new instance of the ObjReader class.
public ObjReader ( ) : System
Результат System

Read() публичный Метод

Reads the model from the specified stream.
public Read ( Stream s, HelixToolkit.Wpf.SharpDX.ModelInfo info = default(ModelInfo) ) : System.Collections.Generic.List
s Stream /// The stream. ///
info HelixToolkit.Wpf.SharpDX.ModelInfo
Результат System.Collections.Generic.List

Read() публичный Метод

Reads the model from the specified path.
public Read ( string path, HelixToolkit.Wpf.SharpDX.ModelInfo info = default(ModelInfo) ) : System.Collections.Generic.List
path string /// The path. ///
info HelixToolkit.Wpf.SharpDX.ModelInfo
Результат System.Collections.Generic.List

ReadZ() публичный Метод

Reads a GZipStream compressed OBJ file.
This is a file format used by Helix Toolkit only. Use the GZipHelper class to compress an .obj file.
public ReadZ ( string path ) : System.Collections.Generic.List
path string /// The path. ///
Результат System.Collections.Generic.List