TerrainDisplay.Collision.BSPTree.DumpBranchContents C# (CSharp) Method

DumpBranchContents() private method

private DumpBranchContents ( TextWriter file, BSPNode startAt, IList vectors ) : void
file System.IO.TextWriter
startAt BSPNode
vectors IList
return void
        private void DumpBranchContents(TextWriter file, BSPNode startAt, IList<Vector3> vectors)
        {
            // Write the vertices referenced by the first
            var posVertList = new List<Vector3>();
            GetBranchContents(startAt.posChild, vectors, posVertList);
            file.WriteLine("Positive Polys: {0}", posVertList.Count);
            file.WriteLine("_______________");
            file.Write(file.NewLine);

            var min = new Vector3(float.MaxValue);
            var max = new Vector3(float.MinValue);
            foreach (var vert in posVertList)
            {
                min = Vector3.Min(min, vert);
                max = Vector3.Max(max, vert);
            }
            file.WriteLine("MinVals: {0}", min);
            file.WriteLine("MaxVals: {0}", max);
            file.WriteLine(file.NewLine);

            //Write the vertices referenced by the last
            var negVertList = new List<Vector3>();
            GetBranchContents(startAt.negChild, vectors, negVertList);
            file.WriteLine("Negative Polys: {0}", negVertList.Count);
            file.WriteLine("_______________");
            file.Write(file.NewLine);

            min = new Vector3(float.MaxValue);
            max = new Vector3(float.MinValue);
            foreach (var vert in negVertList)
            {
                min = Vector3.Min(min, vert);
                max = Vector3.Max(max, vert);
            }
            file.WriteLine("MinVals: {0}", min);
            file.WriteLine("MaxVals: {0}", max);
            file.WriteLine(file.NewLine);
        }