C# Class TagTool.Geometry.ObjExtractor

Extracts render model data to Wavefront .obj files.
Show file Open project: TheGuardians/TagTool Class Usage Examples

Public Methods

Method Description
ExtractMesh ( MeshReader reader, VertexCompressor compressor, Stream resourceStream ) : void

Writes mesh data to the .obj.

Finish ( ) : void

Finishes writing meshes out to the file.

ObjExtractor ( TextWriter writer ) : System

Initializes a new instance of the ObjExtractor class.

Private Methods

Method Description
DecompressVertices ( IEnumerable vertices, VertexCompressor compressor ) : void

Decompresses vertex data in-place.

ReadDualQuatVertices ( IVertexStream reader, int count ) : List

Reads dualquat vertices into a format-independent list.

ReadIndexes ( MeshReader reader, Mesh part, Stream resourceStream ) : uint[]

Reads the index buffer data and converts it into a triangle list if necessary.

ReadRigidVertices ( IVertexStream reader, int count ) : List

Reads rigid vertices into a format-independent list.

ReadSkinnedVertices ( IVertexStream reader, int count ) : List

Reads skinned vertices into a format-independent list.

ReadVertices ( MeshReader reader, Stream resourceStream ) : List

Reads the vertex data for a mesh into a format-independent list.

WriteHeader ( ) : void

Writes a header to the file.

WriteTriangles ( IReadOnlyList indexes ) : void

Queues triangle list data to be written out to the file.

WriteVertex ( ObjVertex vertex ) : void

Writes a vertex out to the file.

WriteVertices ( IEnumerable vertices ) : void

Writes vertex data out to the file.

Method Details

ExtractMesh() public method

Writes mesh data to the .obj.
public ExtractMesh ( MeshReader reader, VertexCompressor compressor, Stream resourceStream ) : void
reader MeshReader The mesh reader to use.
compressor VertexCompressor The vertex compressor to use.
resourceStream Stream A stream open on the resource data.
return void

Finish() public method

Finishes writing meshes out to the file.
public Finish ( ) : void
return void

ObjExtractor() public method

Initializes a new instance of the ObjExtractor class.
public ObjExtractor ( TextWriter writer ) : System
writer System.IO.TextWriter The stream to write the output file to.
return System