Partilhar via


MatrixCamera Construtores

Definição

Cria um novo MatrixCamera.

Sobrecargas

MatrixCamera()

Cria uma nova instância de MatrixCamera.

MatrixCamera(Matrix3D, Matrix3D)

Cria um novo MatrixCamera de matrizes de projeção e exibição.

MatrixCamera()

Cria uma nova instância de MatrixCamera.

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

Exemplos

O código a seguir cria um MatrixCamera e define as propriedades ViewMatrix e 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

Aplica-se a

MatrixCamera(Matrix3D, Matrix3D)

Cria um novo MatrixCamera de matrizes de projeção e exibição.

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)

Parâmetros

viewMatrix
Matrix3D

Especifica a matriz de exibição da câmera.

projectionMatrix
Matrix3D

Especifica a matriz de projeção da câmera.

Exemplos

O código a seguir cria um MatrixCamera e define as propriedades ViewMatrix e 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

Aplica-se a