Compartir a través de


OrthographicCamera Constructores

Definición

Inicializa una nueva instancia de la clase OrthographicCamera.

Sobrecargas

OrthographicCamera()

Inicializa una nueva instancia de la clase OrthographicCamera.

OrthographicCamera(Point3D, Vector3D, Vector3D, Double)

Inicializa una nueva instancia de la clase OrthographicCamera con la posición, la dirección de la proyección, la dirección ascendente y el ancho especificados.

OrthographicCamera()

Inicializa una nueva instancia de la clase OrthographicCamera.

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

Ejemplos

En el ejemplo siguiente se crea una instancia de .OrthographicCamera

//Toggle between camera projections.
public void ToggleCamera(object sender, EventArgs e)
{
    if ((bool)CameraCheck.IsChecked == true)
    {
        OrthographicCamera myOCamera = new OrthographicCamera(new Point3D(0, 0, -3), new Vector3D(0, 0, 1), new Vector3D(0, 1, 0), 3);
        myViewport.Camera = myOCamera;
    }
    if ((bool)CameraCheck.IsChecked != true)
    {
        PerspectiveCamera myPCamera = new PerspectiveCamera(new Point3D(0, 0, -3), new Vector3D(0, 0, 1), new Vector3D(0, 1, 0), 50);
        myViewport.Camera = myPCamera;
    }
}
'Toggle between camera projections.
Public Sub ToggleCamera(ByVal sender As Object, ByVal e As EventArgs)
    If CBool(CameraCheck.IsChecked) = True Then
        Dim myOCamera As New OrthographicCamera(New Point3D(0, 0, -3), New Vector3D(0, 0, 1), New Vector3D(0, 1, 0), 3)
        myViewport.Camera = myOCamera
    End If
    If CBool(CameraCheck.IsChecked) <> True Then
        Dim myPCamera As New PerspectiveCamera(New Point3D(0, 0, -3), New Vector3D(0, 0, 1), New Vector3D(0, 1, 0), 50)
        myViewport.Camera = myPCamera
    End If
End Sub

Se aplica a

OrthographicCamera(Point3D, Vector3D, Vector3D, Double)

Inicializa una nueva instancia de la clase OrthographicCamera con la posición, la dirección de la proyección, la dirección ascendente y el ancho especificados.

public:
 OrthographicCamera(System::Windows::Media::Media3D::Point3D position, System::Windows::Media::Media3D::Vector3D lookDirection, System::Windows::Media::Media3D::Vector3D upDirection, double width);
public OrthographicCamera (System.Windows.Media.Media3D.Point3D position, System.Windows.Media.Media3D.Vector3D lookDirection, System.Windows.Media.Media3D.Vector3D upDirection, double width);
new System.Windows.Media.Media3D.OrthographicCamera : System.Windows.Media.Media3D.Point3D * System.Windows.Media.Media3D.Vector3D * System.Windows.Media.Media3D.Vector3D * double -> System.Windows.Media.Media3D.OrthographicCamera
Public Sub New (position As Point3D, lookDirection As Vector3D, upDirection As Vector3D, width As Double)

Parámetros

position
Point3D

Point3D que especifica la posición de la cámara.

lookDirection
Vector3D

Vector3D que especifica la dirección de la proyección de la cámara.

upDirection
Vector3D

Vector3D que especifica la dirección ascendente según la perspectiva del espectador.

width
Double

El ancho del cuadro de vista de la cámara, en unidades universales.

Ejemplos

El código siguiente crea una instancia de .OrthographicCamera

//Toggle between camera projections.
public void ToggleCamera(object sender, EventArgs e)
{
    if ((bool)CameraCheck.IsChecked == true)
    {
        OrthographicCamera myOCamera = new OrthographicCamera(new Point3D(0, 0, -3), new Vector3D(0, 0, 1), new Vector3D(0, 1, 0), 3);
        myViewport.Camera = myOCamera;
    }
    if ((bool)CameraCheck.IsChecked != true)
    {
        PerspectiveCamera myPCamera = new PerspectiveCamera(new Point3D(0, 0, -3), new Vector3D(0, 0, 1), new Vector3D(0, 1, 0), 50);
        myViewport.Camera = myPCamera;
    }
}
'Toggle between camera projections.
Public Sub ToggleCamera(ByVal sender As Object, ByVal e As EventArgs)
    If CBool(CameraCheck.IsChecked) = True Then
        Dim myOCamera As New OrthographicCamera(New Point3D(0, 0, -3), New Vector3D(0, 0, 1), New Vector3D(0, 1, 0), 3)
        myViewport.Camera = myOCamera
    End If
    If CBool(CameraCheck.IsChecked) <> True Then
        Dim myPCamera As New PerspectiveCamera(New Point3D(0, 0, -3), New Vector3D(0, 0, 1), New Vector3D(0, 1, 0), 50)
        myViewport.Camera = myPCamera
    End If
End Sub

Se aplica a