본문으로 건너뛰기

DisassembleBySphereCenterDistanceRate

Overloads

NameDescription
DisassembleBySphereCenterDistanceRate(bool useGroup, float rate)구분해 형식으로 모델 전체의 중심에서 거리의 비율로 분해

DisassembleBySphereCenterDistanceRate(bool useGroup, float rate)

public void DisassembleBySphereCenterDistanceRate(bool useGroup, float rate)

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

Parameters

NameTypeDescription
useGroupbool그룹 사용 : True(Group), False(Selected)
ratefloat거리 비율 (0.5)

Examples

// 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);
}