private VIZCore3D.NET.VIZCore3DControl vizcore3d;
private void Example()
{
List<VIZCore3D.NET.Data.Node> items = vizcore3d.Object3D.GetPartialNode(true, false, false);
List<VIZCore3D.NET.Data.Node> result = new List<VIZCore3D.NET.Data.Node>();
foreach (VIZCore3D.NET.Data.Node item in items)
{
string[] vals = item.SplitNodeName("/");
if (vals.Length != 4) continue;
result.Add(item);
}
result = vizcore3d.Object3D.FillNodeData(result);
}
private void CheckPerformance()
{
System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.AppendLine(string.Format("NODE COUNT : {0:#,0} EA", vizcore3d.Object3D.GetNodeCount()));
sb.AppendLine();
System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
sw.Start();
List<VIZCore3D.NET.Data.Node> allSync = vizcore3d.Object3D.FromFilter(Data.Object3dFilter.ALL);
sw.Stop();
sb.AppendLine(string.Format("SYNC. ALL : {0:#,0} milliseconds", sw.ElapsedMilliseconds));
sw.Restart();
List<VIZCore3D.NET.Data.Node> allAssemblySync = vizcore3d.Object3D.FromFilter(Data.Object3dFilter.ASSEMBLY);
sw.Stop();
sb.AppendLine(string.Format("SYNC. ASSEMBLY : {0:#,0} milliseconds", sw.ElapsedMilliseconds));
sw.Restart();
List<VIZCore3D.NET.Data.Node> allPartSync = vizcore3d.Object3D.FromFilter(Data.Object3dFilter.PART);
sw.Stop();
sb.AppendLine(string.Format("SYNC. PART : {0:#,0} milliseconds", sw.ElapsedMilliseconds));
sb.AppendLine();
sw.Restart();
List<VIZCore3D.NET.Data.Node> allAsync = vizcore3d.Object3D.GetPartialNode(true, true, true);
sw.Stop();
sb.AppendLine(string.Format("ASYNC. ALL : {0:#,0} milliseconds", sw.ElapsedMilliseconds));
sw.Restart();
List<VIZCore3D.NET.Data.Node> allAssyPartAsync = vizcore3d.Object3D.GetPartialNode(true, true, false);
sw.Stop();
sb.AppendLine(string.Format("ASYNC. ASSEMBLY + PART : {0:#,0} milliseconds", sw.ElapsedMilliseconds));
sw.Restart();
List<VIZCore3D.NET.Data.Node> allAssemblyAsync = vizcore3d.Object3D.GetPartialNode(true, false, false);
sw.Stop();
sb.AppendLine(string.Format("ASYNC. ASSEMBLY : {0:#,0} milliseconds", sw.ElapsedMilliseconds));
sw.Restart();
List<VIZCore3D.NET.Data.Node> allPartAsync = vizcore3d.Object3D.GetPartialNode(false, true, false);
sw.Stop();
sb.AppendLine(string.Format("ASYNC. PART : {0:#,0} milliseconds", sw.ElapsedMilliseconds));
sw.Restart();
List<VIZCore3D.NET.Data.Node> allBodyAsync = vizcore3d.Object3D.GetPartialNode(false, false, true);
sw.Stop();
sb.AppendLine(string.Format("ASYNC. BODY : {0:#,0} milliseconds", sw.ElapsedMilliseconds));
MessageBox.Show(sb.ToString());
}