RotateTransform3D.CenterZ 속성

정의

회전의 기준으로 사용할 Point3D의 Z 좌표를 가져오거나 설정합니다.

public:
 property double CenterZ { double get(); void set(double value); };
public double CenterZ { get; set; }
member this.CenterZ : double with get, set
Public Property CenterZ As Double

속성 값

Double

회전의 기준으로 사용할 Point3D의 Z 좌표를 나타내는 Double입니다.

예제

다음 코드에서는 이 속성을 사용하여 RotateTransform3D가 모델을 변환하는 지점을 변경합니다.

public void AddAnimation(object sender, EventArgs e)
{
    if ((bool)CenterAnimCheck.IsChecked == true)
    {
        //Shift point around which model rotates to (-0.5, -0.5, -0.5).
        myHorizontalRTransform.CenterX = -0.5;
        myHorizontalRTransform.CenterY = -0.5;
        myHorizontalRTransform.CenterZ = -0.5;
    }
    if ((bool)CenterAnimCheck.IsChecked != true)
    {
        //Set point around which model rotates back to (0, 0, 0).
        myHorizontalRTransform.CenterX = 0;
        myHorizontalRTransform.CenterY = 0;
        myHorizontalRTransform.CenterZ = 0;
    }
}
Public Sub AddAnimation(ByVal sender As Object, ByVal e As EventArgs)
    If CBool(CenterAnimCheck.IsChecked) = True Then
        'Shift point around which model rotates to (-0.5, -0.5, -0.5).
        myHorizontalRTransform.CenterX = -0.5
        myHorizontalRTransform.CenterY = -0.5
        myHorizontalRTransform.CenterZ = -0.5
    End If
    If CBool(CenterAnimCheck.IsChecked) <> True Then
        'Set point around which model rotates back to (0, 0, 0).
        myHorizontalRTransform.CenterX = 0
        myHorizontalRTransform.CenterY = 0
        myHorizontalRTransform.CenterZ = 0
    End If
End Sub

적용 대상