RotateTransform3D.CenterZ Właściwość

Definicja

Pobiera lub ustawia współrzędną Z, która ma Point3D być obracana.

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

Wartość właściwości

Double

Podwójna wartość reprezentująca współrzędną Point3D Z, która ma być obracana.

Przykłady

Poniższy kod używa tej właściwości do zmiany punktu, wokół którego obiekt RotateTransform3D przekształca model.

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

Dotyczy