Rotate
Overloads
Rotate(float x, float y, float z, bool zeroBase)
public void Rotate(float x, float y, float z, bool zeroBase)
선택된 개체를 회전
Parameters
| Name | Type | Description |
|---|---|---|
| x | float | X 각도(Degree) |
| y | float | Y 각도(Degree) |
| z | float | Z 각도(Degree) |
| zeroBase | bool | 모델 초기 상태에서 회전 : True - 초기 상태에서 회전, False - 현재 상태에서 회전 |
Rotate(Vertex3D angle, bool zeroBase)
public void Rotate(Vertex3D angle, bool zeroBase)
선택된 개체를 회전
Parameters
| Name | Type | Description |
|---|---|---|
| angle | Vertex3D | 각도(Degree) |
| zeroBase | bool | 모델 초기 상태에서 회전 : True - 초기 상태에서 회전, False - 현재 상태에서 회전 |
Rotate(Vector3D angle, bool zeroBase)
public void Rotate(Vector3D angle, bool zeroBase)
선택된 개체를 회전
Parameters
| Name | Type | Description |
|---|---|---|
| angle | Vector3D | 각도(Degree) |
| zeroBase | bool | 모델 초기 상태에서 회전 : True - 초기 상태에서 회전, False - 현재 상태에서 회전 |
Rotate(List<int> index, float x, float y, float z, bool zeroBase, bool eachObject)
public void Rotate(List<int> index, float x, float y, float z, bool zeroBase, bool eachObject)
지정된 개체를 회전
Parameters
| Name | Type | Description |
|---|---|---|
| index | List<int> | 노드 인덱스 |
| x | float | X축 회전 각도(Degree) |
| y | float | Y축 회전 각도(Degree) |
| z | float | Z축 회전 각도(Degree) |
| zeroBase | bool | 모델 초기 상태에서 회전 : True - 초기 상태에서 회전, False - 현재 상태에서 회전 |
| eachObject | bool | 개체 각각 회전 여부 : True - 각각 회전 / False - 지정된 개체 전체 중심에서 회전 |
Rotate(int[] index, float x, float y, float z, bool zeroBase, bool eachObject)
public void Rotate(int[] index, float x, float y, float z, bool zeroBase, bool eachObject)
지정된 개체를 회전
Parameters
| Name | Type | Description |
|---|---|---|
| index | Int32[] | 노드 인덱스 |
| x | float | X축 회전 각도(Degree) |
| y | float | Y축 회전 각도(Degree) |
| z | float | Z축 회전 각도(Degree) |
| zeroBase | bool | 모델 초기 상태에서 회전 : True - 초기 상태에서 회전, False - 현재 상태에서 회전 |
| eachObject | bool | 개체 각각 회전 여부 : True - 각각 회전 / False - 지정된 개체 전체 중심에서 회전 |
Rotate(List<Node> node, float x, float y, float z, bool zeroBase, bool eachObject)
public void Rotate(List<Node> node, float x, float y, float z, bool zeroBase, bool eachObject)
지정된 개체를 회전
Parameters
| Name | Type | Description |
|---|---|---|
| node | List<Node> | 노드 |
| x | float | X축 회전 각도(Degree) |
| y | float | Y축 회전 각도(Degree) |
| z | float | Z축 회전 각도(Degree) |
| zeroBase | bool | 모델 초기 상태에서 회전 : True - 초기 상태에서 회전, False - 현재 상태에서 회전 |
| eachObject | bool | 개체 각각 회전 여부 : True - 각각 회전 / False - 지정된 개체 전체 중심에서 회전 |
Examples
// VIZCore3D.NET Control
private VIZCore3D.NET.VIZCore3DControl vizcore3d;
private void Example()
{
List<VIZCore3D.NET.Data.Node> node =
vizcore3d.Object3D.FromFilter(Data.Object3dFilter.SELECTED_TOP);
vizcore3d.Object3D.Transform.Rotate(
node
, 45.0f
, 0.0f
, 0.0f
, true
, false
);
}
Rotate(GroupItem group, float x, float y, float z, bool zeroBase, bool eachObject)
public void Rotate(GroupItem group, float x, float y, float z, bool zeroBase, bool eachObject)
지정된 그룹의 개체를 회전
Parameters
| Name | Type | Description |
|---|---|---|
| group | GroupItem | 그룹 아이템 |
| x | float | X축 회전 각도(Degree) |
| y | float | Y축 회전 각도(Degree) |
| z | float | Z축 회전 각도(Degree) |
| zeroBase | bool | 모델 초기 상태에서 회전 : True - 초기 상태에서 회전, False - 현재 상태에서 회전 |
| eachObject | bool | 개체 각각 회전 여부 : True - 각각 회전 / False - 지정된 개체 전체 중심에서 회전 |
Rotate(List<Node> node, Vertex3D v1, Vertex3D v2, float angle, AngleFormat format)
public void Rotate(List<Node> node, Vertex3D v1, Vertex3D v2, float angle, AngleFormat format)
지정된 두 점으로 생성된 축을 기준으로 회전
Parameters
| Name | Type | Description |
|---|---|---|
| node | List<Node> | 회전 대상 노드 |
| v1 | Vertex3D | 첫번째 위치 |
| v2 | Vertex3D | 두번째 위치 |
| angle | float | 회전 각도 |
| format | AngleFormat | 각도 형식 |
Examples
// VIZCore3D.NET Control
private VIZCore3D.NET.VIZCore3DControl vizcore3d;
private System.Timers.Timer timerScrew;
private void Example()
{
timerScrew = new System.Timers.Timer();
timerScrew.Interval = 100;
timerScrew.Elapsed += TimerScrew_Elapsed;
AnimationScrew(true);
}
private List<VIZCore3D.NET.Data.Node> NODES_SCREW1 { get; set; }
private List<VIZCore3D.NET.Data.Node> NODES_SCREW2 { get; set; }
private float Screw_Rotate_Angle = 0;
private void AnimationScrew(bool enable)
{
if (enable == true)
{
NODES_SCREW1 = vizcore3d.Object3D.Find.QuickSearch("SHIP_SCREW#1", true);
NODES_SCREW2 = vizcore3d.Object3D.Find.QuickSearch("SHIP_SCREW#2", true);
timerScrew.Enabled = true;
}
else
{
timerScrew.Enabled = false;
}
}
private void TimerScrew_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
timerScrew.Enabled = false;
this.Invoke(new EventHandler(delegate
{
RotateScrew();
}));
timerScrew.Enabled = true;
}
private void RotateScrew()
{
vizcore3d.BeginUpdate();
vizcore3d.Object3D.Transform.Rotate(
NODES_SCREW1
, new VIZCore3D.NET.Data.Vertex3D(-40144.21, 2159.66, -15277.70)
, new VIZCore3D.NET.Data.Vertex3D(-38685.59, 2170.91, -15204.43)
, Screw_Rotate_Angle % 360
, VIZCore3D.NET.Data.AngleFormat.DEGREE
);
vizcore3d.Object3D.Transform.Rotate(
NODES_SCREW2
, new VIZCore3D.NET.Data.Vertex3D(-40110.58, -2575.70, -15209.66)
, new VIZCore3D.NET.Data.Vertex3D(-38651.92, -2564.30, -15135.98)
, Screw_Rotate_Angle % 360
, VIZCore3D.NET.Data.AngleFormat.DEGREE
);
Screw_Rotate_Angle += 30;
vizcore3d.EndUpdate();
}