Click or drag to resize

PrimitiveManagerOpenModel Method

VIZCore3D.NET 에 모델 열기

Namespace: VIZCore3D.NET.Manager
Assembly: VIZCore3D.NET (in VIZCore3D.NET.dll) Version: 2.8.24.910 (2.8.24.910)
Syntax
C#
public void OpenModel(
	string modelName,
	bool addMode = false
)

Parameters

modelName  String
모델 이름
addMode  Boolean  (Optional)
모델 추가 모드 : True - 추가로 열기, False - 기존 모델 닫고 열기
Example
C#
// VIZCore3D.NET Control
private VIZCore3D.NET.VIZCore3DControl vizcore3d;

private void Example()
{
    // Color Index : rev2bst.config.rev 파일 참고

    VIZCore3D.NET.Manager.PrimitiveObject root =
        vizcore3d.Primitive.AddNode("Root", 4 /* Yellow Color*/);

    VIZCore3D.NET.Manager.PrimitiveObject child1 =
        root.AddNode("CHILD1", 7 /* Blue Color */);

    {
        VIZCore3D.NET.Manager.PrimitiveBox box1 = 
            new VIZCore3D.NET.Manager.PrimitiveBox();

        box1.Set2Point(
            new float[] { 0, 0, 0 }
            , new float[] { 100, 100, 100 }
            , 50.0f
            );

        child1.AddPrimitive(box1);


        VIZCore3D.NET.Manager.PrimitiveBox box2 =
            new VIZCore3D.NET.Manager.PrimitiveBox();

        VIZCore3D.NET.Data.BoundBox3D boundBox1 =
            new VIZCore3D.NET.Data.BoundBox3D(
                new VIZCore3D.NET.Data.Vertex3D(
                    200, 200, 200
                    )
                , new VIZCore3D.NET.Data.Vertex3D(
                    300, 300, 300
                    )
                );

        box2.SetMinMaxPoints(boundBox1);

        child1.AddPrimitive(box2);
    }


    VIZCore3D.NET.Manager.PrimitiveObject child2 =
        root.AddNode("CHILD2", 11 /* Pink Color */);

    {
        VIZCore3D.NET.Manager.PrimitiveCylinder cylinder1 =
            new VIZCore3D.NET.Manager.PrimitiveCylinder();

        cylinder1.Set2Point(
            new float[] { 400, 400, 400 }
            , new float[] { 600, 600, 600 }
            , 50.0f
            );

        child2.AddPrimitive(cylinder1);
    }

    // Open Model
    vizcore3d.Primitive.OpenModel("Primitive", false);
}
See Also