C# Class Ohana3DS_Transfigured.Ohana.Models.BCH

显示文件 Open project: Quibilia/Ohana3DS-Transfigured

Public Methods

Method Description
load ( MemoryStream data ) : RenderBase.OModelGroup

Loads a BCH file. Note that BCH must start at offset 0x0 (don't try using it for BCHs inside containers).

load ( string fileName ) : RenderBase.OModelGroup

Loads a BCH file.

Private Methods

Method Description
getAnimationKeyFrame ( BinaryReader input, RenderBase frame ) : void

Gets an Animation Key frame from the BCH file. The Reader position must be set to the beggining of the Key Frame Data.

getAnimationKeyFrameBool ( BinaryReader input ) : RenderBase.OAnimationKeyFrameGroup

Gets an Animation Key frame from the BCH file. The Reader position must be set to the beggining of the Key Frame Data. This function should be ONLY used with Bool values, since they're stored in a different way.

getMetaData ( BinaryReader input ) : List

Gets Meta Data from the BCH Stream.

getVector ( BinaryReader input, PICACommand format ) : RenderBase.OVector4

Gets a Vector4 from Data. Number of used elements of the Vector4 will depend on the vector type.

peek ( BinaryReader input ) : uint

Reads a UInt without advancing the position on the Stream.

readString ( BinaryReader input ) : string

Reads a string if offset is different of 0. Position advances 4 bytes only.

scaleSkeleton ( List skeleton, int index, int parentIndex ) : void

Scales all child bones of the current bone.

transformSkeleton ( List skeleton, int index, RenderBase &target ) : void

Transforms a Skeleton from relative to absolute positions.

Method Details

load() public static method

Loads a BCH file. Note that BCH must start at offset 0x0 (don't try using it for BCHs inside containers).
public static load ( MemoryStream data ) : RenderBase.OModelGroup
data System.IO.MemoryStream Memory Stream of the BCH file. The Stream will not be usable after
return RenderBase.OModelGroup

load() public static method

Loads a BCH file.
public static load ( string fileName ) : RenderBase.OModelGroup
fileName string File Name of the BCH file
return RenderBase.OModelGroup