public override long Contour(float threshold)
{
Stopwatch watch = new Stopwatch();
watch.Start();
if (tree == null)
{
Vertices.Clear();
tree = new OctreeNode();
List <VertexPositionColorNormal> vs = new List <VertexPositionColorNormal>();
tree.ConstructBase(Resolution, threshold, ref vs);
tree.ClusterCellBase(threshold);
//Vertices = vs.ToList();
tree.GenerateVertexBuffer(Vertices);
if (Vertices.Count > 0)
{
VertexBuffer.SetData <VertexPositionColorNormal>(Vertices.ToArray());
}
VertexCount = Vertices.Count;
}
OutlineLocation = 0;
//ConstructTreeGrid(tree);
CalculateIndexes(threshold);
watch.Stop();
return(watch.ElapsedMilliseconds);
}