MatrixCamera.ViewMatrix プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
ビュー変換マトリックスとして Matrix3D を取得または設定します。
public:
property System::Windows::Media::Media3D::Matrix3D ViewMatrix { System::Windows::Media::Media3D::Matrix3D get(); void set(System::Windows::Media::Media3D::Matrix3D value); };
public System.Windows.Media.Media3D.Matrix3D ViewMatrix { get; set; }
member this.ViewMatrix : System.Windows.Media.Media3D.Matrix3D with get, set
Public Property ViewMatrix 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
注釈
このプロパティは、独自のプロジェクション マトリックス計算を実装するアプリケーションに役立ちます。
このマトリックスで指定されたカメラ プロパティは、 Model3D 階層の最上位の変換とは異なる場合があります。
依存関係プロパティ情報
| 品目 | 価値 |
|---|---|
| 識別子フィールド | ViewMatrixProperty |
に設定されたメタデータ プロパティ true |
None |