MatrixCamera.ProjectionMatrix プロパティ

定義

プロジェクション変換マトリックスとして Matrix3D を取得または設定します。

public:
 property System::Windows::Media::Media3D::Matrix3D ProjectionMatrix { System::Windows::Media::Media3D::Matrix3D get(); void set(System::Windows::Media::Media3D::Matrix3D value); };
public System.Windows.Media.Media3D.Matrix3D ProjectionMatrix { get; set; }
member this.ProjectionMatrix : System.Windows.Media.Media3D.Matrix3D with get, set
Public Property ProjectionMatrix As Matrix3D

プロパティ値

Matrix3D 射影変換を指定する

次のコードでは、 MatrixCamera を作成し、 ViewMatrix プロパティと ProjectionMatrix プロパティを設定します。

private void SetMatrixCamera(object sender, EventArgs e)
{
    //Define matrices for ViewMatrix and ProjectionMatrix properties.
    Matrix3D vmatrix = new Matrix3D(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
    Matrix3D pmatrix = new Matrix3D(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);

    MatrixCamera mCamera = new MatrixCamera(vmatrix, pmatrix);
    myViewport.Camera = mCamera;
}
Private Sub SetMatrixCamera(ByVal sender As Object, ByVal e As EventArgs)
    'Define matrices for ViewMatrix and ProjectionMatrix properties.
    Dim vmatrix As New Matrix3D(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
    Dim pmatrix As New Matrix3D(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)

    Dim mCamera As New MatrixCamera(vmatrix, pmatrix)
    myViewport.Camera = mCamera
End Sub

注釈

このプロパティは、独自のプロジェクション マトリックス計算を実装するアプリケーションに役立ちます。

このプロパティは、座標系をカメラ空間から正規化されたキューブに変換します。X 座標と Y 座標の範囲は -1 から 1、Z 座標の範囲は 0 から 1 です。 カメラ空間の最小 Z 座標と最大 Z 座標は、投影行列が Z 座標をどのように変換するかによって定義されます。

依存関係プロパティ情報

品目 価値
識別子フィールド ProjectionMatrixProperty
に設定されたメタデータ プロパティ true None

適用対象