Isosurface.DualMarchingSquares.QuadtreeNode.Build C# (CSharp) Method

Build() public method

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
return void
        public void Build(int size, int min_size, float threshold, int grid_size, List<VertexPositionColorNormal> vertices)
        {
            this.size = size;
            position = Vector2.Zero;
            leaf = false;
            TrySplit(min_size, threshold, grid_size, vertices);
        }

Usage Example

コード例 #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);
        }
All Usage Examples Of Isosurface.DualMarchingSquares.QuadtreeNode::Build