Freigeben über


RotateTransform3D.CenterZ Eigenschaft

Definition

Ruft die z-Koordinate des Point3D ab, um das die Drehung erfolgen soll, oder legt diese fest.

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

Eigenschaftswert

Double

Ein Double, das die z-Koordinate des Point3D darstellt, um das die Drehung erfolgen soll.

Beispiele

Der folgende Code verwendet diese Eigenschaft, um den Punkt zu ändern, an dem ein RotateTransform3D das Modell transformiert.

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

Gilt für