Click or drag to resize

MeshEditManagerSetBodyVertices Method

Body 노드의 정점 정보 변경

Namespace:  VIZCore3D.NET.Manager
Assembly:  VIZCore3D.NET (in VIZCore3D.NET.dll) Version: 2.8.24.1104 (2.8.24.1104)
Syntax
C#
public void SetBodyVertices(
	int bodyIndex,
	List<BodyVertexData> vertexData,
	bool rebuildData
)

Parameters

bodyIndex
Type: SystemInt32
Body Index
vertexData
Type: System.Collections.GenericListBodyVertexData
Vertex Data
rebuildData
Type: SystemBoolean
데이터 재구성 여부
Examples
C#
// VIZCore3D.NET Control
private VIZCore3D.NET.VIZCore3DControl vizcore3d;

private void Example()
{
    vizcore3d.BeginUpdate();
    List<int> bodies = new List<int>();
    bodies.Add(1234);    

    for( int j = 0; j < bodies.Count; j++)
    {
        int bodyIndex = bodies[j];
        //Get Vertices Info
        List<VIZCore3D.NET.Data.BodyVertexData> safeData = vizcore3d.MeshEdit.GetBodyVertices(bodyIndex);

        // Vertex Postition Move
        for(int i = 0; i < safeData.Count; i++)
        {
            safeData[i].Vertex.X += 1000;
        }

        vizcore3d.MeshEdit.SetBodyVertices(
            bodyIndex /* body index */
            , safeData /* Vertex Info */
            , false);  /* RebuildData */
    }

    vizcore3d.Structure.RebuildData();
    vizcore3d.EndUpdate();
}
See Also