MaterialManagerCopy Method (Int32) |
Namespace: VIZCore3D.NET.Manager
public int Copy( int id )
// 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(); }