CSPspEmu.Core.Gpu.Formats.PspWavefrontObjWriter.StartPrimitive C# (CSharp) Method

StartPrimitive() public method

public StartPrimitive ( GpuStateStruct GpuState, State PrimitiveType, uint VertexAddress, int VertexCount, State &VertexType ) : void
GpuState CSPspEmu.Core.Gpu.State.GpuStateStruct
PrimitiveType State
VertexAddress uint
VertexCount int
VertexType State
return void
        public void StartPrimitive(GpuStateStruct* GpuState, State.GuPrimitiveType PrimitiveType, uint VertexAddress, int VertexCount, ref State.VertexTypeStruct VertexType)
        {
            this.GpuState = GpuState;
            this.VertexType = VertexType;
            var ViewMatrix = GpuState->VertexState.ViewMatrix.Matrix4;
            var WorldMatrix = GpuState->VertexState.WorldMatrix.Matrix4;
            ModelMatrix.Multiply(ViewMatrix);
            ModelMatrix.Multiply(WorldMatrix);

            this.CurrentPrimitiveType = PrimitiveType;
            WavefrontObjWriter.StartComment("Start: " + this.CurrentPrimitiveType + " : VertexAddress: 0x" + String.Format("{0:X}", VertexAddress) + " : " + VertexCount + " : " + this.VertexType);
            PrimitiveIndices.Clear();

            //throw new NotImplementedException();
            /*
            Console.WriteLine("ViewMatrix (DEMO):");
            Console.WriteLine("{0}", Matrix4.Translation(new Vector3(0f, 0f, -3.5f)));
            Console.WriteLine("ViewMatrix:");
            Console.WriteLine("{0}", ViewMatrix);
            */
        }