C# Class Ohana3DS_Transfigured.Ohana.Models.CGFX

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

Public Methods

Method Description
getName ( MemoryStream data ) : string

Gets the name of the first model on a CGFX file. Returns null if the file doesn't contain any model.

load ( Stream data ) : RenderBase.OModelGroup

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

load ( string fileName ) : RenderBase.OModelGroup

Loads a CGFX file.

Private Methods

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

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

getDictionary ( BinaryReader input ) : List

Reads a Dictionary section from the CGFX file. The Stream is advanced exactly 8 bytes.

getDictionary ( BinaryReader input, uint dictionaryOffset ) : List

Reads a Dictionary section from the CGFX file.

getFragmentSampler ( BinaryReader input, uint address ) : RenderBase.OFragmentSampler

Gets an Fragment Sampler from the CGFX. It is used to access 1-D LookUp tables on Fragment Shader Lighting.

getMatrix ( BinaryReader input ) : RenderBase.OMatrix

Reads a 4x3 Matrix from the file.

getRelativeOffset ( BinaryReader input ) : uint

Gets a relative offset and automaticaly transforms into a absolute offset. If the offset is zero (data doesn't exists), it will remain zero.

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

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

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

getName() public static method

Gets the name of the first model on a CGFX file. Returns null if the file doesn't contain any model.
public static getName ( MemoryStream data ) : string
data System.IO.MemoryStream
return string

load() public static method

Loads a CGFX file. Note that CGFX must start at offset 0x0 (don't try using it for CGFXs inside containers).
public static load ( Stream data ) : RenderBase.OModelGroup
data Stream Stream of the CGFX file.
return RenderBase.OModelGroup

load() public static method

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