예제 #1
0
        public void SaveTree(StreamWriter sw)
        {
            int WidthTreeRoot = 0;

            for (int i = 1; i <= 20; i++)
            {
                if (Math.Pow(2, i) >= Math.Max(m_heightMap, m_widthMap))
                {
                    WidthTreeRoot = (int)Math.Pow(2, i);
                    break;
                }
            }
            NodeRoot.m_boundNode.right = (float)WidthTreeRoot;
            NodeRoot.m_boundNode.top   = (float)WidthTreeRoot;
            sw.WriteLine("0 0 " + WidthTreeRoot.ToString() + " " + WidthTreeRoot.ToString() + " 0");//
            TreeObject.Build(NodeRoot);
            TreeObject.Save(NodeRoot, sw);
            sw.WriteLine("<End>");
            sw.Close();
        }
예제 #2
0
 public void AddTreeObjectInNode(TreeObject Tobjet)
 {
     ListTreeObjectInNode.Add(Tobjet);
 }