| PrimitiveManagerOpenModel Method |
VIZCore3D.NET 에 모델 열기
Namespace: VIZCore3D.NET.ManagerAssembly: VIZCore3D.NET (in VIZCore3D.NET.dll) Version: 2.8.24.910 (2.8.24.910)
Syntax public void OpenModel(
string modelName,
bool addMode = false
)
Parameters
- modelName String
- 모델 이름
- addMode Boolean (Optional)
- 모델 추가 모드 : True - 추가로 열기, False - 기존 모델 닫고 열기
Example
private VIZCore3D.NET.VIZCore3DControl vizcore3d;
private void Example()
{
VIZCore3D.NET.Manager.PrimitiveObject root =
vizcore3d.Primitive.AddNode("Root", 4 );
VIZCore3D.NET.Manager.PrimitiveObject child1 =
root.AddNode("CHILD1", 7 );
{
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 );
{
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);
}
vizcore3d.Primitive.OpenModel("Primitive", false);
}
See Also