Exemple #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Init");
            //var m = TestCollada("unit_tube.DAE");
            //TestBox();
            //var m = TestCollada("sponza6.DAE");
            //var m = TestCollada("test1.DAE");
            var m = TestCollada("noisesphere.DAE");

            Console.WriteLine(m.NVertices + " vertices, " + m.NFaces + " faces");
            Console.WriteLine("Building BB");
            m.BuildBoundingBox();
            Console.WriteLine("Building KDTree");
            m.BuildKDTree();
            Console.WriteLine(m.KDTree.Dump());
            Console.WriteLine(m.KDTree.DumpStats());

            Console.WriteLine("Done");

            System.Windows.Forms.MessageBox.Show("GO?");
            var f = new VisualizeKDTree();

            f.Mesh = m;
            f.ShowDialog();

            TestRay(m);
            Console.ReadKey();
        }
        static void Main(string[] args)
        {
            Console.WriteLine("Init");
            //var m = TestCollada("unit_tube.DAE");
            //TestBox();
            //var m = TestCollada("sponza6.DAE");
            //var m = TestCollada("test1.DAE");
            var m = TestCollada("noisesphere.DAE");

            Console.WriteLine(m.NVertices + " vertices, " + m.NFaces + " faces");
            Console.WriteLine("Building BB");
            m.BuildBoundingBox();
            Console.WriteLine("Building KDTree");
            m.BuildKDTree();
            Console.WriteLine(m.KDTree.Dump());
            Console.WriteLine(m.KDTree.DumpStats());

            Console.WriteLine("Done");

            System.Windows.Forms.MessageBox.Show("GO?");
            var f = new VisualizeKDTree();
            f.Mesh = m;
            f.ShowDialog();

            TestRay(m);
            Console.ReadKey();
        }