Exemple #1
0
        public TriangleQuadtree(TriangleCollection tc)
        {
            Console.WriteLine("Build oct " + tc.GetNumberOfTriangles());
            this.tc = tc;
            tc.GetBBox(out min.x, out min.y, out min.z,
                       out max.x, out max.y, out max.z);
            rootNode = new Node(this, min, max);

            SimpleLinkedList tlist = new SimpleLinkedList();

            for (int i = 0; i < tc.GetNumberOfTriangles(); i++)
            {
                tlist.AddNew(i);
            }
            rootNode.Build(tlist, 0);
            Console.WriteLine("done");
        }
Exemple #2
0
        public TriangleOctree(TriangleCollection tc)
        {
            PathGraph.Log("Build oct " + tc.GetNumberOfTriangles());
            this.tc = tc;
            tc.GetBBox(out min.x, out min.y, out min.z,
                       out max.x, out max.y, out max.z);
            rootNode = new Node(this, min, max);

            var tlist = new SimpleLinkedList();

            for (int i = 0; i < tc.GetNumberOfTriangles(); i++)
            {
                tlist.AddNew(i);
            }
            rootNode.Build(tlist, 0);
            PathGraph.Log("done");
        }
Exemple #3
0
        public TriangleOctree(TriangleCollection tc, Logger logger)
        {
            this.logger = logger;
            logger.WriteLine("Build oct " + tc.GetNumberOfTriangles());
            this.tc = tc;
            tc.GetBBox(out min.x, out min.y, out min.z,
                       out max.x, out max.y, out max.z);
            rootNode = new Node(this, min, max, this.logger);

            SimpleLinkedList tlist = new SimpleLinkedList(this.logger);

            for (int i = 0; i < tc.GetNumberOfTriangles(); i++)
            {
                tlist.AddNew(i);
            }
            rootNode.Build(tlist, 0);
            logger.WriteLine("done");
        }