Click or drag to resize

DisassemblyManagerDisassembleBySphereCenterDistanceRate Method

구분해 형식으로 모델 전체의 중심에서 거리의 비율로 분해

Namespace:  VIZCore3D.NET.Manager
Assembly:  VIZCore3D.NET (in VIZCore3D.NET.dll) Version: 2.8.24.1104 (2.8.24.1104)
Syntax
C#
public void DisassembleBySphereCenterDistanceRate(
	bool useGroup,
	float rate
)

Parameters

useGroup
Type: SystemBoolean
그룹 사용 : True(Group), False(Selected)
rate
Type: SystemSingle
거리 비율 (0.5)
Examples
C#
// 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);
}
See Also