MatrixCamera Costruttori

Definizione

Crea un nuovo oggetto MatrixCamera.

Overload

MatrixCamera()

Crea una nuova istanza di MatrixCamera.

MatrixCamera(Matrix3D, Matrix3D)

Crea un nuovo oggetto MatrixCamera in base alle matrici di visualizzazione e di proiezione.

MatrixCamera()

Crea una nuova istanza di MatrixCamera.

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

Esempio

Il codice seguente crea una MatriceCamera e imposta le proprietà 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

Si applica a

MatrixCamera(Matrix3D, Matrix3D)

Crea un nuovo oggetto MatrixCamera in base alle matrici di visualizzazione e di proiezione.

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)

Parametri

viewMatrix
Matrix3D

Specifica la matrice di visualizzazione della camera.

projectionMatrix
Matrix3D

Specifica la matrice di proiezione della camera.

Esempio

Il codice seguente crea una MatriceCamera e imposta le proprietà 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

Si applica a