다음을 통해 공유


MatrixCamera 생성자

정의

MatrixCamera를 만듭니다.

오버로드

MatrixCamera()

MatrixCamera의 새 인스턴스를 만듭니다.

MatrixCamera(Matrix3D, Matrix3D)

뷰 및 프로젝션 매트릭스에서 새 MatrixCamera를 만듭니다.

MatrixCamera()

MatrixCamera의 새 인스턴스를 만듭니다.

public:
 MatrixCamera();
public MatrixCamera ();
Public Sub New ()

예제

다음 코드는 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

적용 대상

MatrixCamera(Matrix3D, Matrix3D)

뷰 및 프로젝션 매트릭스에서 새 MatrixCamera를 만듭니다.

public:
 MatrixCamera(System::Windows::Media::Media3D::Matrix3D viewMatrix, System::Windows::Media::Media3D::Matrix3D projectionMatrix);
public MatrixCamera (System.Windows.Media.Media3D.Matrix3D viewMatrix, System.Windows.Media.Media3D.Matrix3D projectionMatrix);
new System.Windows.Media.Media3D.MatrixCamera : System.Windows.Media.Media3D.Matrix3D * System.Windows.Media.Media3D.Matrix3D -> System.Windows.Media.Media3D.MatrixCamera
Public Sub New (viewMatrix As Matrix3D, projectionMatrix As Matrix3D)

매개 변수

viewMatrix
Matrix3D

카메라의 뷰 매트릭스를 지정합니다.

projectionMatrix
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

적용 대상