본문으로 건너뛰기

ChangeBodyMesh

Overloads

NameDescription
ChangeBodyMesh(int bodyIndex, List<Vertex3D> coords, List<Vector3D> normals, List<float> color)Body 노드의 Mesh를 교체
ChangeBodyMesh(List<int> bodyIndex, List<Vertex3D> coords, List<Vector3D> normals, List<float> color, List<int> coordListNum)Body 노드 리스트의 Mesh 를 교체

ChangeBodyMesh(int bodyIndex, List<Vertex3D> coords, List<Vector3D> normals, List<float> color)

public void ChangeBodyMesh(int bodyIndex, List&lt;Vertex3D&gt; coords, List&lt;Vector3D&gt; normals, List&lt;float&gt; color)

Body 노드의 Mesh를 교체

Parameters

NameTypeDescription
bodyIndexint바디 노드 인덱스
coordsList<Vertex3D>Coords
normalsList<Vector3D>Normals
colorList<float>Color

ChangeBodyMesh(List<int> bodyIndex, List<Vertex3D> coords, List<Vector3D> normals, List<float> color, List<int> coordListNum)

public void ChangeBodyMesh(List&lt;int&gt; bodyIndex, List&lt;Vertex3D&gt; coords, List&lt;Vector3D&gt; normals, List&lt;float&gt; color, List&lt;int&gt; coordListNum)

Body 노드 리스트의 Mesh 를 교체

Parameters

NameTypeDescription
bodyIndexList<int>바디 노드 인덱스 리스트
coordsList<Vertex3D>Coords
normalsList<Vector3D>Normals
colorList<float>Color
coordListNumList<int>Coord. Count List

Examples

// VIZCore3D.NET Control
private VIZCore3D.NET.VIZCore3DControl vizcore3d;

private void Example()
{
List<int> bodies = new List<int>();
List<int> coordListNum = new List<int>();
List<VIZCore3D.NET.Data.Vertex3D> v = new List<VIZCore3D.NET.Data.Vertex3D>();
List<VIZCore3D.NET.Data.Vector3D> n = new List<VIZCore3D.NET.Data.Vector3D>();
List<float> color = new List<float>();

// 면 #1
bodies.Add(2296); // Body Index
coordListNum.Add(18); // Vertex Float 총 개수

// Vertex 좌표 => Triangle Mesh 를 기반
v.Add(new VIZCore3D.NET.Data.Vertex3D(80180.00, 10600.00, 35572.12));
v.Add(new VIZCore3D.NET.Data.Vertex3D(71890.00, 10600.00, 35572.12));
v.Add(new VIZCore3D.NET.Data.Vertex3D(72324.89, 7170.00, 35645.86));
v.Add(new VIZCore3D.NET.Data.Vertex3D(72324.89, 7170.00, 35645.86));
v.Add(new VIZCore3D.NET.Data.Vertex3D(80180.00, 7170.00, 35645.86));
v.Add(new VIZCore3D.NET.Data.Vertex3D(80180.00, 10600.00, 35572.12));

// Normal 좌표
n.Add(new VIZCore3D.NET.Data.Vector3D(0.00, 0.00, -1.00));
n.Add(new VIZCore3D.NET.Data.Vector3D(0.00, 0.00, -1.00));
n.Add(new VIZCore3D.NET.Data.Vector3D(0.00, 0.00, -1.00));
n.Add(new VIZCore3D.NET.Data.Vector3D(0.00, 0.00, -1.00));
n.Add(new VIZCore3D.NET.Data.Vector3D(0.00, 0.00, -1.00));
n.Add(new VIZCore3D.NET.Data.Vector3D(0.00, 0.00, -1.00));

// 면의 색상 설정
color.Add(1.000f); // R
color.Add(1.000f); // G
color.Add(0.000f); // B
color.Add(1); // A

// 면 #2
bodies.Add(2293); // Body Index
coordListNum.Add(18); // Vertex Float 총 개수

v.Add(new VIZCore3D.NET.Data.Vertex3D(80180.00, 7170.00, 35645.86));
v.Add(new VIZCore3D.NET.Data.Vertex3D(72324.89, 7170.00, 35645.86));
v.Add(new VIZCore3D.NET.Data.Vertex3D(71890.00, 3740.00, 35719.60));
v.Add(new VIZCore3D.NET.Data.Vertex3D(71890.00, 3740.00, 35719.60));
v.Add(new VIZCore3D.NET.Data.Vertex3D(80180.00, 3740.00, 35719.60));
v.Add(new VIZCore3D.NET.Data.Vertex3D(80180.00, 7170.00, 35645.86));

n.Add(new VIZCore3D.NET.Data.Vector3D(0.00, 0.00, -1.00));
n.Add(new VIZCore3D.NET.Data.Vector3D(0.00, 0.00, -1.00));
n.Add(new VIZCore3D.NET.Data.Vector3D(0.00, 0.00, -1.00));
n.Add(new VIZCore3D.NET.Data.Vector3D(0.00, 0.00, -1.00));
n.Add(new VIZCore3D.NET.Data.Vector3D(0.00, 0.00, -1.00));
n.Add(new VIZCore3D.NET.Data.Vector3D(0.00, 0.00, -1.00));

color.Add(0.043f); // R
color.Add(0.043f); // G
color.Add(0.043f); // B
color.Add(1); // A

vizcore3d.MeshEdit.ChangeBodyMesh(
bodies /* BODY INDEX LIST */
, v /* VERTEX LIST */
, n /* NORMAL LIST */
, color /* COLOR */
, coordListNum /* VERTEX COUNT LIST */
);
}