Isosurface.ManifoldDC.OctreeNode.ClusterCellBase C# (CSharp) Method

ClusterCellBase() public method

public ClusterCellBase ( float error ) : void
error float
return void
        public void ClusterCellBase(float error)
        {
            if (type != NodeType.Internal)
                return;

            for (int i = 0; i < 8; i++)
            {
                if (children[i] == null)
                    continue;

                children[i].ClusterCell(error);
            }
        }

Usage Example

Ejemplo n.º 1
0
        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);
        }
All Usage Examples Of Isosurface.ManifoldDC.OctreeNode::ClusterCellBase