Share via


MatrixCamera.ViewMatrix 속성

정의

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

Matrix3D 위치를 나타내는, 보기 방향 및 카메라에 대 한 벡터를 설정 합니다.

예제

다음 코드에서는 MatrixCamera 가져오거나 설정 합니다 ViewMatrixProjectionMatrix 속성입니다.

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 없음

적용 대상