CustomCamera QML Type

사용자 지정 프로젝션 매트릭스가 있는 카메라를 정의합니다. 더 보기...

Import Statement: import QtQuick3D
Inherits:

Camera

속성

상세 설명

Camera 은 3D 씬의 콘텐츠가 2D 표면(예: View3D)에 투영되는 방식을 정의합니다. 씬의 콘텐츠를 시각화하려면 하나 이상의 Camera 이 필요합니다.

씬의 다른 공간 Node 과 마찬가지로 Camera 의 위치 및 회전이 가능합니다. Node 의 위치와 방향에 따라 Camera 이 씬에서 어느 위치에 있고 어느 방향을 향하고 있는지가 결정됩니다. Camera 의 기본 방향은 음의 Z 축을 따라 앞으로 향하는 벡터와 양의 Y 축을 따라 위로 향하는 벡터를 갖습니다.

CustomCamera 유형은 투사 매트릭스를 자유롭게 사용자 지정할 수 있는 Camera 을 제공합니다.

다음 예제는 씬의 [0, 200, 300] 위치에 30도 하향 피치, 사용자 지정 근거리 및 원거리 평면 거리와 사용자 지정 시야를 기반으로 하는 사용자 지정 투영 매트릭스를 가진 CustomCamera를 생성합니다.

CustomCamera {
    position: Qt.vector3d(0, 200, 300)
    eulerRotation.x: -30

    property real near: 10.0
    property real far: 10000.0
    property real fov: 60.0 * Math.PI / 180.0
    projection: Qt.matrix4x4(Math.cos(fov / 2) / Math.sin(fov / 2) * (window.height / window.width), 0, 0, 0,
                             0, Math.cos(fov / 2) / Math.sin(fov / 2), 0, 0,
                             0, 0, -(near + far) / (far - near), -(2.0 * near * far) / (far - near),
                             0, 0, -1, 0);
}

참고: 커스텀 카메라를 사용할 때 일부 안티앨리어싱 모드(템포럴 AA 및 프로그레시브 AA)가 올바르게 적용되지 않을 수 있습니다.

PerspectiveCamera, OrthographicCamera, FrustumCamera참조하세요 .

프로퍼티 문서

projection : matrix4x4

이 프로퍼티는 CustomCamera 의 투영 매트릭스를 정의합니다.


© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.