LevelOfDetail QML Type
레벨오브디테일은 화면의 크기에 따라 렌더링된 엔티티의 복잡도를 제어하는 방법을 제공합니다. 더 보기...
Import Statement: | import Qt3D.Render 2.8 |
In C++: | QLevelOfDetail |
Inherits: | |
Status: | Deprecated |
속성
- ThresholdType : enumeration
- camera : Camera
- currentIndex : int
- thresholdType : int
- thresholds : QList<qreal>
- volumeOverride : int
상세 설명
레벨오브디테일은 관찰자로부터의 거리 또는 화면의 크기에 따라 엔티티의 표현을 제어하는 데 사용할 수 있습니다.
렌더링 성능을 향상시키기 위해 매우 작은 오브젝트는 지오메트리 또는 텍스처에서 훨씬 적은 수의 디테일을 사용하여 렌더링할 수 있습니다.
이 컴포넌트는 카메라로부터의 거리 또는 화면 크기로 해석되는 값의 임계값을 지정하여 제어합니다.
시점이 변경되면 currentIndex 프로퍼티가 범위 배열에 일치하는 값을 반영하도록 변경됩니다.
그런 다음 currentIndex 프로퍼티를 사용하여 예를 들어 엔티티를 활성화 또는 비활성화하거나 EntityLoader 또는 머티리얼의 소스를 변경할 수 있습니다.
레벨오브디테일 컴포넌트는 여러 엔티티 간에 공유할 수 없습니다.
import Qt3D.Core 2.0 import Qt3D.Render 2.0 Entity { id: root // Scene Camera { id: mainCamera } LevelOfDetail { id: lod camera: mainCamera thresholds: [20, 35, 50, 65] thresholdType: LevelOfDetail.DistanceToCameraThreshold } GeometryRenderer { id: mesh view: CylinderMesh { property var sliceValues: [20, 10, 6, 4] slices: sliceValues[lod.currentIndex] } } Entity { id: renderableEntity components: [ mesh, lod ] } }
프로퍼티 문서
ThresholdType : enumeration |
임계값의 값을 해석하는 방법을 지정합니다.
- DistanceToCameraThreshold 엔티티에서 선택한 카메라까지의 거리
- ProjectedScreenPixelSizeThreshold 선택한 카메라에서 화면에 투영되었을 때 엔티티의 크기를 화면 공간에서 경계 사각형 측면의 픽셀 수로 표현합니다.
camera : Camera |
실제 거리 또는 화면 크기를 계산하는 데 사용되는 카메라의 ID를 보유합니다.
currentIndex : int |
현재 거리와 카메라 또는 화면 크기를 일치시키는 범위 배열의 인덱스입니다.
thresholdType : int |
범위 값이 해석되는 방식을 지정합니다.
thresholds : QList<qreal> |
부동 소수점 숫자로 된 범위 값의 배열입니다. 가장 자세한 표현을 위한 값을 먼저 지정해야 합니다.
LevelOfDetail::thresholdType 가 LevelOfDetail.DistanceToCameraThreshold로 설정된 경우, 값을 카메라 공간 좌표로 오름차순으로 지정해야 합니다.
LevelOfDetail::thresholdType 가 LevelOfDetail.ProjectedScreenPixelSizeThreshold로 설정된 경우, 화면 공간 픽셀 단위로 값을 내림차순으로 지정해야 합니다.
volumeOverride : int |
거리 또는 화면 크기를 평가하는 데 사용되는 것을 지정합니다.
기본값은 엔티티의 로컬 원점을 중심으로 한 반경 1의 구체입니다. 이 프록시 볼륨은 카메라까지의 거리 또는 화면 투영의 크기를 계산하는 데 사용됩니다.
이 값이 null이면 엔티티의 바운딩 볼륨이 사용됩니다. 이 바운딩 볼륨이 유효하지 않게 되지 않도록 주의해야 합니다.
© 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.