C# Class TressFXLib.Formats.TFXBFormat

TressFX Binary (TFXB) file format implementation. This format is available for import and export. This file format implementation does __NOT__ contain import logic for amd's TFXB file. Unity TressFX uses a slightly modified version, because the data amd's exporter exported couldnt be read into c# easily.
Inheritance: IHairFormat
Show file Open project: kennux/TressFXUnity

Public Methods

Method Description
Export ( BinaryWriter writer, string path, Hair hair ) : void
Import ( BinaryReader reader, string path, Hair hair, HairImportSettings importSettings ) : HairMesh[]

Protected Methods

Method Description
ReadFloatArray ( BinaryReader reader, int count ) : float[]

Reads an float array from BinaryReader reader.

ReadIntegerArray ( BinaryReader reader, int count ) : int[]

Reads an integer array from BinaryReader reader.

ReadQuaternion ( BinaryReader reader ) : Quaternion

Reads a 4-component vector (Quaternion) from the given BinaryReader reader.

ReadQuaternionArray ( BinaryReader reader, int count ) : Quaternion[]

Reads a 4-component vector (Quaternion) array from the given BinaryReader reader.

ReadVector3 ( BinaryReader reader ) : System.Vector3

Reads a 3-component vector (Vector3) from the given BinaryReader reader.

ReadVector3Array ( BinaryReader reader, int count ) : System.Vector3[]

Reads a 3-component vector (Vector3) array from the given BinaryReader reader.

ReadVector4 ( BinaryReader reader ) : System.Vector4

Reads a 4-component vector (Vector4) from the given BinaryReader reader.

ReadVector4Array ( BinaryReader reader, int count ) : System.Vector4[]

Reads a 4-component vector (Vector4) array from the given BinaryReader reader.

WriteQuaternion ( BinaryWriter writer, Quaternion quaternion ) : void
WriteVector3 ( BinaryWriter writer, System.Vector3 vector ) : void
WriteVector4 ( BinaryWriter writer, System.Vector4 vector ) : void

Method Details

Export() public method

public Export ( BinaryWriter writer, string path, Hair hair ) : void
writer System.IO.BinaryWriter
path string
hair Hair
return void

Import() public method

public Import ( BinaryReader reader, string path, Hair hair, HairImportSettings importSettings ) : HairMesh[]
reader System.IO.BinaryReader
path string
hair Hair
importSettings HairImportSettings
return HairMesh[]

ReadFloatArray() protected static method

Reads an float array from BinaryReader reader.
protected static ReadFloatArray ( BinaryReader reader, int count ) : float[]
reader System.IO.BinaryReader Reader.
count int The count of elements to load.
return float[]

ReadIntegerArray() protected static method

Reads an integer array from BinaryReader reader.
protected static ReadIntegerArray ( BinaryReader reader, int count ) : int[]
reader System.IO.BinaryReader Reader.
count int The count of elements to load.
return int[]

ReadQuaternion() protected static method

Reads a 4-component vector (Quaternion) from the given BinaryReader reader.
protected static ReadQuaternion ( BinaryReader reader ) : Quaternion
reader System.IO.BinaryReader Reader.
return Quaternion

ReadQuaternionArray() protected static method

Reads a 4-component vector (Quaternion) array from the given BinaryReader reader.
protected static ReadQuaternionArray ( BinaryReader reader, int count ) : Quaternion[]
reader System.IO.BinaryReader Reader.
count int The count of elements to load.
return Quaternion[]

ReadVector3() protected static method

Reads a 3-component vector (Vector3) from the given BinaryReader reader.
protected static ReadVector3 ( BinaryReader reader ) : System.Vector3
reader System.IO.BinaryReader Reader.
return System.Vector3

ReadVector3Array() protected static method

Reads a 3-component vector (Vector3) array from the given BinaryReader reader.
protected static ReadVector3Array ( BinaryReader reader, int count ) : System.Vector3[]
reader System.IO.BinaryReader Reader.
count int The count of elements to load.
return System.Vector3[]

ReadVector4() protected static method

Reads a 4-component vector (Vector4) from the given BinaryReader reader.
protected static ReadVector4 ( BinaryReader reader ) : System.Vector4
reader System.IO.BinaryReader Reader.
return System.Vector4

ReadVector4Array() protected static method

Reads a 4-component vector (Vector4) array from the given BinaryReader reader.
protected static ReadVector4Array ( BinaryReader reader, int count ) : System.Vector4[]
reader System.IO.BinaryReader Reader.
count int The count of elements to load.
return System.Vector4[]

WriteQuaternion() protected static method

protected static WriteQuaternion ( BinaryWriter writer, Quaternion quaternion ) : void
writer System.IO.BinaryWriter
quaternion Quaternion
return void

WriteVector3() protected static method

protected static WriteVector3 ( BinaryWriter writer, System.Vector3 vector ) : void
writer System.IO.BinaryWriter
vector System.Vector3
return void

WriteVector4() protected static method

protected static WriteVector4 ( BinaryWriter writer, System.Vector4 vector ) : void
writer System.IO.BinaryWriter
vector System.Vector4
return void