Isosurface.AdaptiveDualContouring.ADC3D.Contour C# (CSharp) Method

Contour() public method

public Contour ( float threshold ) : long
threshold float
return long
        public override long Contour(float threshold)
        {
            Stopwatch watch = new Stopwatch();

            Vertices.Clear();
            tree = new OctreeNode();

            watch.Start();
            tree.Build(Vector3.Zero, Resolution, threshold, Vertices, Size);

            tree.GenerateVertexBuffer(Vertices);
            if (Vertices.Count > 0)
                VertexBuffer.SetData<VertexPositionColorNormal>(Vertices.ToArray());
            VertexCount = Vertices.Count;
            //ConstructTreeGrid(tree);
            CalculateIndexes();
            watch.Stop();

            return watch.ElapsedMilliseconds;
        }