OrthographicCamera 생성자
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
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)
매개 변수
- 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