CustomCamera QML Type
사용자 정의 투영 행렬을 가진 카메라를 정의합니다. 더 보기...
| Import Statement: | import QtQuick3D |
| Inherits: |
속성
- projection : matrix4x4
상세 설명
Camera 는 3D 씬의 콘텐츠가 View3D 와 같은 2D 표면에 어떻게 투영되는지를 정의합니다. 씬의 콘텐츠를 시각화하려면 적어도 하나의 Camera 가 필요합니다.
Camera 는 씬 내의 다른 공간적 Node 와 마찬가지로 위치와 방향을 조정할 수 있습니다. Node 의 위치와 방향에 따라 Camera 가 씬 내에서 어디에 위치하며, 어느 방향을 향하는지가 결정됩니다. Camera 의 기본 방향은 전방 벡터가 음의 Z축을 향하고, 상향 벡터가 양의 Y축을 향하도록 설정되어 있습니다.
CustomCamera 타입은 투영 행렬을 자유롭게 사용자 정의할 수 있는 Camera 를 제공합니다.
다음 예제는 씬 내 [0, 200, 300] 위치에 CustomCamera를 생성하며, 30도 하향 피치와 사용자 정의 근거리 및 원거리 평면 거리, 사용자 정의 시야각을 기반으로 한 사용자 정의 투영 행렬을 적용합니다.
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);
}참고: CustomCamera를 사용할경우 , 일부 앤티앨리어싱 모드(Temporal AA 및 Progressive AA)가 올바르게 적용되지 않을 수 있습니다.
PerspectiveCamera, OrthographicCamera 및 FrustumCamera도 참조하십시오 .
속성 설명서
projection : matrix4x4
이 속성은 CustomCamera 의 투영 행렬을 정의합니다.
© 2026 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.