Build() публичный Метод

public Build ( int size, int min_size, float threshold, int grid_size, List vertices ) : void
size int
min_size int
threshold float
grid_size int
vertices List
Результат void
Пример #1
0
        public override long Contour(float threshold)
        {
            Stopwatch watch = new Stopwatch();

            Vertices.Clear();
            Tree            = new QuadtreeNode();
            OutlineLocation = 0;
            watch.Start();

            Tree.Build(Resolution, 1, threshold, this.Size, Vertices);
            DualGridCount = Vertices.Count;
            if (DualGridCount > 0)
            {
                DualGridBuffer.SetData <VertexPositionColorNormal>(Vertices.ToArray());
            }

            CalculateIndexes();

            watch.Stop();

            ConstructTreeGrid(Tree);

            return(watch.ElapsedMilliseconds);
        }
Пример #2
0
        public override long Contour(float threshold)
        {
            Stopwatch watch = new Stopwatch();

            Vertices.Clear();
            Tree = new QuadtreeNode();
            OutlineLocation = 0;
            watch.Start();

            Tree.Build(Resolution, 1, threshold, this.Size, Vertices);
            DualGridCount = Vertices.Count;
            if (DualGridCount > 0)
                DualGridBuffer.SetData<VertexPositionColorNormal>(Vertices.ToArray());

            CalculateIndexes();

            watch.Stop();

            ConstructTreeGrid(Tree);

            return watch.ElapsedMilliseconds;
        }