C# Class Ohana3DS_Transfigured.Ohana.Models.PICA200.PICACommandReader

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

Public Methods

Method Description
PICACommandReader ( Stream input, uint wordCount, bool ignoreAlign = false ) : System

Creates a new PICA200 Command Buffer reader and reads the content.

getAlphaTest ( ) : RenderBase.OAlphaTest

Gets the parameters used for Alpha testing.

getBlendOperation ( ) : RenderBase.OBlendOperation

Gets Blending operation parameters.

getColorLogicOperation ( ) : RenderBase.OLogicalOperation

Gets the Logical operation applied to Fragment colors.

getCullMode ( ) : RenderBase.OCullMode

Gets the Culling mode.

getDepthTest ( ) : RenderBase.ODepthOperation

Gets the parameters used for Depth testing.

getFSHLookUpTable ( ) : float[]

Gets the 1D LookUp table sampler used on the Fragment Shader lighting.

getFragmentBufferColor ( ) : Color

Gets the Fragment Buffer Color.

getIndexBufferAddress ( ) : uint

Gets the Address where the Index Buffer is located.

getIndexBufferFormat ( ) : PICACommand.indexBufferFormat

Gets the Format of the Index Buffer (byte or short).

getIndexBufferTotalVertices ( ) : uint

Gets the total number of vertices indexed by the Index Buffer.

getParameter ( ushort commandId ) : uint

Gets the lastest written parameter of a given Command in the buffer.

getReflectanceSamplerAbsolute ( ) : PICACommand.fragmentSamplerAbsolute

Gets if the Absolute value should be used before using the LUT for each Input.

getReflectanceSamplerInput ( ) : PICACommand.fragmentSamplerInput

Gets the Input used to pick a value from the LookUp Table on Fragment Shader.

getReflectanceSamplerScale ( ) : PICACommand.fragmentSamplerScale

Gets the scale used on the value on Fragment Shader.

getStencilTest ( ) : RenderBase.OStencilOperation

Gets the parameters used for Stencil testing.

getTevStage ( byte stage ) : RenderBase.OTextureCombiner

Gets TEV Stage parameters.

getTexUnit0Address ( ) : uint

Gets the Address of the texture at Texture Unit 0.

getTexUnit0BorderColor ( ) : Color

Gets the border color used on Texture Unit 0, when the wrapping mode is set to Border.

getTexUnit0Format ( ) : RenderBase.OTextureFormat

Gets the encoded format of the texture at Texture Unit 0.

getTexUnit0Mapper ( ) : RenderBase.OTextureMapper

Gets the mapping parameters used on Texture Unit 0, such as the wrapping mode, filtering and so on.

getTexUnit0Size ( ) : Size

Gets the resolution of the texture at Texture Unit 0.

getTexUnit1Address ( ) : uint

Gets the Address of the texture at Texture Unit 1.

getTexUnit1BorderColor ( ) : Color

Gets the border color used on Texture Unit 1, when the wrapping mode is set to Border.

getTexUnit1Format ( ) : RenderBase.OTextureFormat

Gets the encoded format of the texture at Texture Unit 1.

getTexUnit1Mapper ( ) : RenderBase.OTextureMapper

Gets the mapping parameters used on Texture Unit 1, such as the wrapping mode, filtering and so on.

getTexUnit1Size ( ) : Size

Gets the resolution of the texture at Texture Unit 1.

getTexUnit2Address ( ) : uint

Gets the Address of the texture at Texture Unit 2.

getTexUnit2BorderColor ( ) : Color

Gets the border color used on Texture Unit 2, when the wrapping mode is set to Border.

getTexUnit2Format ( ) : RenderBase.OTextureFormat

Gets the encoded format of the texture at Texture Unit 2.

getTexUnit2Mapper ( ) : RenderBase.OTextureMapper

Gets the mapping parameters used on Texture Unit 2, such as the wrapping mode, filtering and so on.

getTexUnit2Size ( ) : Size

Gets the resolution of the texture at Texture Unit 2.

getVSHAttributesBufferAddress ( ) : uint

Gets the Address where the Attributes Buffer is located. Note that it may be a Relative address, and may need to be relocated.

getVSHAttributesBufferAddress ( byte bufferIndex ) : uint

Gets the Address of a given Attributes Buffer. It is relative to the Main Buffer address.

getVSHAttributesBufferFormat ( ) : Ohana3DS_Transfigured.Ohana.Models.PICA200.PICACommand.attributeFormat[]

Gets an array containing all formats of the main Attributes Buffer. It have the length of each attribute, and the format (byte, float, short...).

getVSHAttributesBufferPermutation ( ) : PICACommand.vshAttribute[]

Gets an array containing all Vertex Atrributes permutation order.

getVSHAttributesBufferPermutation ( byte bufferIndex ) : uint[]

Gets the Permutation of a given Attributes Buffer. Values corresponds to a value on the main Permutation.

getVSHAttributesBufferStride ( byte bufferIndex ) : byte

Gets the Stride of a given Attributes Buffer.

getVSHBooleanUniforms ( ) : bool[]

Gets Uniform Booleans used on Vertex Shader.

getVSHFloatUniformData ( uint register ) : Stack

Gets the Float Uniform data array from the given register.

getVSHTotalAttributes ( ) : uint

Gets the Total Attributes minus 1.

getVSHTotalAttributes ( byte bufferIndex ) : uint

Gets the Total Attributes of a given Attributes Buffer.

Private Methods

Method Description
toFloat ( uint value ) : float

Converts a IEEE 754 encoded float on uint to float.

Method Details

PICACommandReader() public method

Creates a new PICA200 Command Buffer reader and reads the content.
public PICACommandReader ( Stream input, uint wordCount, bool ignoreAlign = false ) : System
input Stream The Input stream where the buffer is located
wordCount uint Total number of words (4 bytes per word) that the buffer have
ignoreAlign bool (Optional) Set to true to ignore potential 0x0 padding words
return System

getAlphaTest() public method

Gets the parameters used for Alpha testing.
public getAlphaTest ( ) : RenderBase.OAlphaTest
return RenderBase.OAlphaTest

getBlendOperation() public method

Gets Blending operation parameters.
public getBlendOperation ( ) : RenderBase.OBlendOperation
return RenderBase.OBlendOperation

getColorLogicOperation() public method

Gets the Logical operation applied to Fragment colors.
public getColorLogicOperation ( ) : RenderBase.OLogicalOperation
return RenderBase.OLogicalOperation

getCullMode() public method

Gets the Culling mode.
public getCullMode ( ) : RenderBase.OCullMode
return RenderBase.OCullMode

getDepthTest() public method

Gets the parameters used for Depth testing.
public getDepthTest ( ) : RenderBase.ODepthOperation
return RenderBase.ODepthOperation

getFSHLookUpTable() public method

Gets the 1D LookUp table sampler used on the Fragment Shader lighting.
public getFSHLookUpTable ( ) : float[]
return float[]

getFragmentBufferColor() public method

Gets the Fragment Buffer Color.
public getFragmentBufferColor ( ) : Color
return Color

getIndexBufferAddress() public method

Gets the Address where the Index Buffer is located.
public getIndexBufferAddress ( ) : uint
return uint

getIndexBufferFormat() public method

Gets the Format of the Index Buffer (byte or short).
public getIndexBufferFormat ( ) : PICACommand.indexBufferFormat
return PICACommand.indexBufferFormat

getIndexBufferTotalVertices() public method

Gets the total number of vertices indexed by the Index Buffer.
public getIndexBufferTotalVertices ( ) : uint
return uint

getParameter() public method

Gets the lastest written parameter of a given Command in the buffer.
public getParameter ( ushort commandId ) : uint
commandId ushort ID code of the command
return uint

getReflectanceSamplerAbsolute() public method

Gets if the Absolute value should be used before using the LUT for each Input.
public getReflectanceSamplerAbsolute ( ) : PICACommand.fragmentSamplerAbsolute
return PICACommand.fragmentSamplerAbsolute

getReflectanceSamplerInput() public method

Gets the Input used to pick a value from the LookUp Table on Fragment Shader.
public getReflectanceSamplerInput ( ) : PICACommand.fragmentSamplerInput
return PICACommand.fragmentSamplerInput

getReflectanceSamplerScale() public method

Gets the scale used on the value on Fragment Shader.
public getReflectanceSamplerScale ( ) : PICACommand.fragmentSamplerScale
return PICACommand.fragmentSamplerScale

getStencilTest() public method

Gets the parameters used for Stencil testing.
public getStencilTest ( ) : RenderBase.OStencilOperation
return RenderBase.OStencilOperation

getTevStage() public method

Gets TEV Stage parameters.
public getTevStage ( byte stage ) : RenderBase.OTextureCombiner
stage byte The stage (0-5)
return RenderBase.OTextureCombiner

getTexUnit0Address() public method

Gets the Address of the texture at Texture Unit 0.
public getTexUnit0Address ( ) : uint
return uint

getTexUnit0BorderColor() public method

Gets the border color used on Texture Unit 0, when the wrapping mode is set to Border.
public getTexUnit0BorderColor ( ) : Color
return Color

getTexUnit0Format() public method

Gets the encoded format of the texture at Texture Unit 0.
public getTexUnit0Format ( ) : RenderBase.OTextureFormat
return RenderBase.OTextureFormat

getTexUnit0Mapper() public method

Gets the mapping parameters used on Texture Unit 0, such as the wrapping mode, filtering and so on.
public getTexUnit0Mapper ( ) : RenderBase.OTextureMapper
return RenderBase.OTextureMapper

getTexUnit0Size() public method

Gets the resolution of the texture at Texture Unit 0.
public getTexUnit0Size ( ) : Size
return System.Drawing.Size

getTexUnit1Address() public method

Gets the Address of the texture at Texture Unit 1.
public getTexUnit1Address ( ) : uint
return uint

getTexUnit1BorderColor() public method

Gets the border color used on Texture Unit 1, when the wrapping mode is set to Border.
public getTexUnit1BorderColor ( ) : Color
return Color

getTexUnit1Format() public method

Gets the encoded format of the texture at Texture Unit 1.
public getTexUnit1Format ( ) : RenderBase.OTextureFormat
return RenderBase.OTextureFormat

getTexUnit1Mapper() public method

Gets the mapping parameters used on Texture Unit 1, such as the wrapping mode, filtering and so on.
public getTexUnit1Mapper ( ) : RenderBase.OTextureMapper
return RenderBase.OTextureMapper

getTexUnit1Size() public method

Gets the resolution of the texture at Texture Unit 1.
public getTexUnit1Size ( ) : Size
return System.Drawing.Size

getTexUnit2Address() public method

Gets the Address of the texture at Texture Unit 2.
public getTexUnit2Address ( ) : uint
return uint

getTexUnit2BorderColor() public method

Gets the border color used on Texture Unit 2, when the wrapping mode is set to Border.
public getTexUnit2BorderColor ( ) : Color
return Color

getTexUnit2Format() public method

Gets the encoded format of the texture at Texture Unit 2.
public getTexUnit2Format ( ) : RenderBase.OTextureFormat
return RenderBase.OTextureFormat

getTexUnit2Mapper() public method

Gets the mapping parameters used on Texture Unit 2, such as the wrapping mode, filtering and so on.
public getTexUnit2Mapper ( ) : RenderBase.OTextureMapper
return RenderBase.OTextureMapper

getTexUnit2Size() public method

Gets the resolution of the texture at Texture Unit 2.
public getTexUnit2Size ( ) : Size
return System.Drawing.Size

getVSHAttributesBufferAddress() public method

Gets the Address where the Attributes Buffer is located. Note that it may be a Relative address, and may need to be relocated.
public getVSHAttributesBufferAddress ( ) : uint
return uint

getVSHAttributesBufferAddress() public method

Gets the Address of a given Attributes Buffer. It is relative to the Main Buffer address.
public getVSHAttributesBufferAddress ( byte bufferIndex ) : uint
bufferIndex byte Index number of the buffer (0-11)
return uint

getVSHAttributesBufferFormat() public method

Gets an array containing all formats of the main Attributes Buffer. It have the length of each attribute, and the format (byte, float, short...).
public getVSHAttributesBufferFormat ( ) : Ohana3DS_Transfigured.Ohana.Models.PICA200.PICACommand.attributeFormat[]
return Ohana3DS_Transfigured.Ohana.Models.PICA200.PICACommand.attributeFormat[]

getVSHAttributesBufferPermutation() public method

Gets an array containing all Vertex Atrributes permutation order.
public getVSHAttributesBufferPermutation ( ) : PICACommand.vshAttribute[]
return PICACommand.vshAttribute[]

getVSHAttributesBufferPermutation() public method

Gets the Permutation of a given Attributes Buffer. Values corresponds to a value on the main Permutation.
public getVSHAttributesBufferPermutation ( byte bufferIndex ) : uint[]
bufferIndex byte Index number of the buffer (0-11)
return uint[]

getVSHAttributesBufferStride() public method

Gets the Stride of a given Attributes Buffer.
public getVSHAttributesBufferStride ( byte bufferIndex ) : byte
bufferIndex byte Index number of the buffer (0-11)
return byte

getVSHBooleanUniforms() public method

Gets Uniform Booleans used on Vertex Shader.
public getVSHBooleanUniforms ( ) : bool[]
return bool[]

getVSHFloatUniformData() public method

Gets the Float Uniform data array from the given register.
public getVSHFloatUniformData ( uint register ) : Stack
register uint Index number of the register (observed values: 6 and 7)
return Stack

getVSHTotalAttributes() public method

Gets the Total Attributes minus 1.
public getVSHTotalAttributes ( ) : uint
return uint

getVSHTotalAttributes() public method

Gets the Total Attributes of a given Attributes Buffer.
public getVSHTotalAttributes ( byte bufferIndex ) : uint
bufferIndex byte Index number of the buffer (0-11)
return uint