Click or drag to resize

MaterialManagerCopy Method (Int32)

Material 복사

Namespace:  VIZCore3D.NET.Manager
Assembly:  VIZCore3D.NET (in VIZCore3D.NET.dll) Version: 2.8.24.1104 (2.8.24.1104)
Syntax
C#
public int Copy(
	int id
)

Parameters

id
Type: SystemInt32
복사할 Material ID

Return Value

Type: Int32
복사된 Material ID , failed -1
Examples
C#
// 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();
}
See Also