CSPspEmu.Core.Gpu.Formats.WavefrontObjWriter._EndVertices C# (CSharp) Method

_EndVertices() private method

private _EndVertices ( ) : void
return void
        private void _EndVertices()
        {
            float Normalize = 0.0f;
            foreach (var Vertex in Vertices)
            {
                if (!float.IsNaN(Vertex.X) && !float.IsNaN(Vertex.Y) && !float.IsNaN(Vertex.Z))
                {
                    Normalize = Math.Max(Normalize, Math.Abs(Vertex.X));
                    Normalize = Math.Max(Normalize, Math.Abs(Vertex.Y));
                    Normalize = Math.Max(Normalize, Math.Abs(Vertex.Z));
                }
            }

            Normalize /= 64;

            var NormalizeRecp = (1.0f / Normalize);

            foreach (var Vertex in Vertices)
            {
                var NormalizedVertex = Vertex * NormalizeRecp;
                WriteVerticeLine("v " + NormalizedVertex.X + " " + NormalizedVertex.Y + " " + NormalizedVertex.Z);
            }
        }