Object3DManagerGetPartialNode Method |
Namespace: VIZCore3D.NET.Manager
public List<Node> GetPartialNode( bool assembly, bool part, bool body )
// VIZCore3D.NET Control 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); } // 노드의 부가정보 채우기 : Index 및 Node Name만 필요한 경우, 호출 불필요. 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()); }