言語

Matrix.RotatePrepend(Double) メソッド

定義

指定した角度の回転を、この Matrix 構造体の前に付加します。

public:
 void RotatePrepend(double angle);
public void RotatePrepend(double angle);
member this.RotatePrepend : double -> unit
Public Sub RotatePrepend (angle As Double)

パラメーター

angle
Double

先頭に追加する回転の角度。

次の例は、回転を Matrixの前に追加する方法を示しています。

private Matrix prependRotateExample()
{

    Matrix myMatrix = new Matrix(5, 10, 15, 20, 25, 30);

    // Prepend a 90 degree rotation about the origin.
    // myMatrix is now equal to  (15,20,-5,-10,25,30).
    myMatrix.RotatePrepend(90);

    return myMatrix;
}

private Matrix prependRotateAboutPointExample()
{

    Matrix myMatrix = new Matrix(5, 10, 15, 20, 25, 30);

    // Prepend a 90 degree rotation about the 
    // point (100,100). 
    // myMatrix is now equal to  (15,20,-5,-10,1025,2030).
    myMatrix.RotateAtPrepend(90, 100, 100);

    return myMatrix;
}

注釈

複合変換では、個々の変換の順序が重要です。 たとえば、最初に回転し、その後に拡大縮小してから平行移動するのと、最初に平行移動し、その後に回転して拡大縮小するのでは、異なる結果が得られます。 順序が重要な理由の 1 つは、座標系の原点に対して回転やスケーリングなどの変換が行われることです。 原点を中心とするオブジェクトをスケーリングすると、原点から離れたオブジェクトのスケーリングとは異なる結果が生成されます。 同様に、原点を中心とするオブジェクトを回転すると、原点から離れたオブジェクトを回転する場合とは異なる結果が得られます。

適用対象

こちらもご覧ください