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;
        }