次の方法で共有


OrthographicCamera コンストラクター

定義

OrthographicCamera クラスの新しいインスタンスを初期化します。

オーバーロード

OrthographicCamera()

OrthographicCamera クラスの新しいインスタンスを初期化します。

OrthographicCamera(Point3D, Vector3D, Vector3D, Double)

位置、投影方向、上向き方向、および幅を指定して、OrthographicCamera クラスの新しいインスタンスを初期化します。

OrthographicCamera()

OrthographicCamera クラスの新しいインスタンスを初期化します。

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

次の例では、 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

適用対象

OrthographicCamera(Point3D, Vector3D, Vector3D, Double)

位置、投影方向、上向き方向、および幅を指定して、OrthographicCamera クラスの新しいインスタンスを初期化します。

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)

パラメーター

position
Point3D

カメラの位置を指定する Point3D

lookDirection
Vector3D

カメラの投影の方向を指定する Vector3D

upDirection
Vector3D

観察者の視点に従って上向きの方向を指定する Vector3D

width
Double

ワールド単位でのカメラの表示ボックスの幅。

次のコードでは、 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

適用対象