DisassemblyManagerDisassembleBySphereCenterDistanceRate Method |
Namespace: VIZCore3D.NET.Manager
public void DisassembleBySphereCenterDistanceRate( bool useGroup, float rate )
// VIZCore3D.NET Control private VIZCore3D.NET.VIZCore3DControl vizcore3d; private void Example() { AddGroup(0); DisassemblyByRate(0.5f); } private void AddGroup(int groupKind) { int index = groupKind; List<VIZCore3D.NET.Data.Node> items = null; if (index == 0) // Children of Root { items = vizcore3d.Object3D.GetChildObject3d( 0 /* Root Node Index */ , VIZCore3D.NET.Data.Object3DChildOption.CHILD_ONLY /* Sub Node */ ); } else if (index == 1) // Part (Leaf Node) { items = vizcore3d.Object3D.FromFilter(Data.Object3dFilter.PART); } else if (index == 2) // Leaf Assembly { items = vizcore3d.Object3D.FromFilter(Data.Object3dFilter.LEAF_ASSEMBLY); } else if (index == 3) // Parent of Leaf Assembly { items = vizcore3d.Object3D.FromFilter(Data.Object3dFilter.PARENT_LEAF_ASSEMBLY); } if (items == null) return; for (int i = 0; i < items.Count; i++) { bool result = vizcore3d.Object3D.Disassembly.AddGroup( i /* ID : 0 ~ */ , items[i].Index /* NODE INDEX */ , true /* Recursive */ ); } } private void DisassemblyByRate(float rate) { vizcore3d.Object3D.Disassembly.DisassembleBySphereCenterDistanceRate(true, rate); }