다음을 통해 공유


PerspectiveCamera 생성자

정의

PerspectiveCamera 클래스의 새 인스턴스를 초기화합니다.

오버로드

PerspectiveCamera()

PerspectiveCamera 클래스의 새 인스턴스를 초기화합니다.

PerspectiveCamera(Point3D, Vector3D, Vector3D, Double)

지정된 위치, 방향 및 뷰 필드를 사용하여 PerspectiveCamera 클래스의 새 인스턴스를 초기화합니다.

PerspectiveCamera()

PerspectiveCamera 클래스의 새 인스턴스를 초기화합니다.

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

예제

<!-- Add a camera. -->
<Viewport3D.Camera>
    <PerspectiveCamera FarPlaneDistance="20" LookDirection="5,-2,-3" UpDirection="0,1,0" NearPlaneDistance="1" Position="-5,2,3" FieldOfView="45" />
</Viewport3D.Camera>

적용 대상

PerspectiveCamera(Point3D, Vector3D, Vector3D, Double)

지정된 위치, 방향 및 뷰 필드를 사용하여 PerspectiveCamera 클래스의 새 인스턴스를 초기화합니다.

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

매개 변수

position
Point3D

카메라의 위치를 지정하는 Point3D입니다.

lookDirection
Vector3D

카메라의 프로젝션 방향을 지정하는 Vector3D입니다.

upDirection
Vector3D

보는 이의 원근에 따라 위쪽 방향을 지정하는 Vector3D입니다.

fieldOfView
Double

카메라의 프로젝션 각도 너비(도)입니다.

예제

//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

적용 대상