본문으로 건너뛰기

Rotate

Overloads​

NameDescription
Rotate(float x, float y, float z, bool zeroBase)선택된 개체를 회전
Rotate(Vertex3D angle, bool zeroBase)선택된 개체를 회전
Rotate(Vector3D angle, bool zeroBase)선택된 개체를 회전
Rotate(List<int> index, float x, float y, float z, bool zeroBase, bool eachObject)지정된 개체를 회전
Rotate(int[] index, float x, float y, float z, bool zeroBase, bool eachObject)지정된 개체를 회전
Rotate(List<Node> node, float x, float y, float z, bool zeroBase, bool eachObject)지정된 개체를 회전
Rotate(GroupItem group, float x, float y, float z, bool zeroBase, bool eachObject)지정된 그룹의 개체를 회전
Rotate(List<Node> node, Vertex3D v1, Vertex3D v2, float angle, AngleFormat format)지정된 두 점으로 생성된 축을 기준으로 회전

Rotate(float x, float y, float z, bool zeroBase)​

public void Rotate(float x, float y, float z, bool zeroBase)

선택된 개체를 회전

Parameters​

NameTypeDescription
xfloatX 각도(Degree)
yfloatY 각도(Degree)
zfloatZ 각도(Degree)
zeroBasebool모델 초기 상태에서 회전 : True - 초기 상태에서 회전, False - 현재 상태에서 회전

Rotate(Vertex3D angle, bool zeroBase)​

public void Rotate(Vertex3D angle, bool zeroBase)

선택된 개체를 회전

Parameters​

NameTypeDescription
angleVertex3D각도(Degree)
zeroBasebool모델 초기 상태에서 회전 : True - 초기 상태에서 회전, False - 현재 상태에서 회전

Rotate(Vector3D angle, bool zeroBase)​

public void Rotate(Vector3D angle, bool zeroBase)

선택된 개체를 회전

Parameters​

NameTypeDescription
angleVector3D각도(Degree)
zeroBasebool모델 초기 상태에서 회전 : True - 초기 상태에서 회전, False - 현재 상태에서 회전

Rotate(List<int> index, float x, float y, float z, bool zeroBase, bool eachObject)​

public void Rotate(List&lt;int&gt; index, float x, float y, float z, bool zeroBase, bool eachObject)

지정된 개체를 회전

Parameters​

NameTypeDescription
indexList<int>노드 인덱스
xfloatX축 회전 각도(Degree)
yfloatY축 회전 각도(Degree)
zfloatZ축 회전 각도(Degree)
zeroBasebool모델 초기 상태에서 회전 : True - 초기 상태에서 회전, False - 현재 상태에서 회전
eachObjectbool개체 각각 회전 여부 : 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​

NameTypeDescription
indexint[]노드 인덱스
xfloatX축 회전 각도(Degree)
yfloatY축 회전 각도(Degree)
zfloatZ축 회전 각도(Degree)
zeroBasebool모델 초기 상태에서 회전 : True - 초기 상태에서 회전, False - 현재 상태에서 회전
eachObjectbool개체 각각 회전 여부 : True - 각각 회전 / False - 지정된 개체 전체 중심에서 회전

Rotate(List<Node> node, float x, float y, float z, bool zeroBase, bool eachObject)​

public void Rotate(List&lt;Node&gt; node, float x, float y, float z, bool zeroBase, bool eachObject)

지정된 개체를 회전

Parameters​

NameTypeDescription
nodeList<Node>노드
xfloatX축 회전 각도(Degree)
yfloatY축 회전 각도(Degree)
zfloatZ축 회전 각도(Degree)
zeroBasebool모델 초기 상태에서 회전 : True - 초기 상태에서 회전, False - 현재 상태에서 회전
eachObjectbool개체 각각 회전 여부 : 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​

NameTypeDescription
groupGroupItem그룹 아이템
xfloatX축 회전 각도(Degree)
yfloatY축 회전 각도(Degree)
zfloatZ축 회전 각도(Degree)
zeroBasebool모델 초기 상태에서 회전 : True - 초기 상태에서 회전, False - 현재 상태에서 회전
eachObjectbool개체 각각 회전 여부 : True - 각각 회전 / False - 지정된 개체 전체 중심에서 회전

Rotate(List<Node> node, Vertex3D v1, Vertex3D v2, float angle, AngleFormat format)​

public void Rotate(List&lt;Node&gt; node, Vertex3D v1, Vertex3D v2, float angle, AngleFormat format)

지정된 두 점으로 생성된 축을 기준으로 회전

Parameters​

NameTypeDescription
nodeList<Node>회전 대상 노드
v1Vertex3D첫번째 위치
v2Vertex3D두번째 위치
anglefloat회전 각도
formatAngleFormat각도 형식

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();
}