Class MeshReader
This class is used to load 3D Models in .obj format into memory.
Inheritance
Inherited Members
Namespace: Fusee.Engine.Core
Assembly: Fusee.Engine.Core.dll
Syntax
public static class MeshReader
Methods
Double_Parse(String)
Replacement for double.Parse(s, [InvariantCulture]) Hack needed for JSIL.
Declaration
public static double Double_Parse(string s)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | s | string to parse |
Returns
| Type | Description |
|---|---|
| System.Double | A double number |
FilteredSplit(String, Char[])
This method is used to split a string in a list of strings based on the separator passed to the method.
Declaration
public static string[] FilteredSplit(string strIn, char[] separator)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | strIn | The string. |
| System.Char[] | separator | The separator. |
Returns
| Type | Description |
|---|---|
| System.String[] | An array of string with all separated values. |
LoadGeometry(Stream)
This method loads an object file and returns it as a geometry.
Declaration
public static Geometry LoadGeometry(Stream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.Stream | stream | Stream to read from. |
Returns
| Type | Description |
|---|---|
| Geometry | The newly created Mesh object |
LoadMesh(Stream)
This method loads an object file and returns it as a mesh.
Declaration
public static Mesh LoadMesh(Stream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.Stream | stream | Stream to read from. |
Returns
| Type | Description |
|---|---|
| Mesh | The newly created Mesh object |
ReadWavefrontObj(TextReader)
Parses the contents of the TextReader object passed to the method and tries to interpret the contents as a Wavefront obj file. Creates a Mesh object from the contents.
Declaration
public static Geometry ReadWavefrontObj(TextReader tr)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.TextReader | tr | The initialized TextReader (can be either a StreamReader or a StringReader) |
Returns
| Type | Description |
|---|---|
| Geometry | The newly created Mesh object |