Copy
Overloads
| Name | Description |
|---|---|
| Copy(int id) | Material 복사 |
| Copy(ResourceMaterials material) | Material 복사 |
Copy(int id)
public int Copy(int id)
Material 복사
Parameters
| Name | Type | Description |
|---|---|---|
| id | int | 복사할 Material ID |
Returns
| Type | Description |
|---|---|
| int | 복사된 Material ID , failed -1 |
Examples
// VIZCore3D.NET Control
private VIZCore3D.NET.VIZCore3DControl vizcore3d;
private void Example()
{
vizcore3d.BeginUpdate();
Data.BoundBox3D boundbox = vizcore3d.Model.BoundBox;
// SEA(바다) 커스텀 개체 추가
int customSeaId = vizcore3d.ShapeDrawing.AddSea(
boundbox.MinZ - 10.0f /* 높이 : Z축 */
, true /* Visible */
);
// 기본 리소스 (SEA Material) 복사
int material = vizcore3d.Object3D.Material.Copy(Data.ResourceMaterials.SEA);
System.Drawing.Color color = System.Drawing.Color.FromArgb(127, 255, 255, 255);
// 리소스 색상 변경
vizcore3d.Object3D.Material.SetColor(material, color);
// 수정된 리소스 (Material) 를 기존 커스텀 개체에 지정
vizcore3d.ShapeDrawing.SetMaterial(customSeaId, material);
vizcore3d.EndUpdate();
}
Copy(ResourceMaterials material)
public int Copy(ResourceMaterials material)
Material 복사
Parameters
| Name | Type | Description |
|---|---|---|
| material | ResourceMaterials | Material |
Returns
| Type | Description |
|---|---|
| int | 복사된 Material ID , failed -1 |