Instancing QML Type (Uncreatable)
인스턴스 테이블의 기본 유형. 더 보기...
| Import Statement: | import QtQuick3D |
| Since: | Qt 6.2 |
| In C++: | QQuick3DInstancing |
| Inherits: | |
| Inherited By: |
참고: 이 타입은 생성할 수 없습니다. QML에서 인스턴스화할 수 없습니다.
속성
- depthSortingEnabled : bool
- hasTransparency : bool
- instanceCountOverride : int
- shadowBoundsMaximum : vector3d
- shadowBoundsMinimum : vector3d
방법
- color instanceColor(int index)
(since 6.3) - vector3d instanceCustomData(int index)
(since 6.3) - vector3d instancePosition(int index)
(since 6.3) - quaternion instanceRotation(int index)
(since 6.3) - vector3d instanceScale(int index)
(since 6.3)
상세 설명
인스턴스 렌더링을 사용하면 모델에 변형을 가해 복제할 수 있습니다.
인스턴싱 유형은 각 인스턴스가 기본 모델에 비해 어떻게 수정되는지를 지정하는 테이블을 정의합니다. 이 테이블에는 각 인덱스에 대한 항목이 있으며, 각 항목에는 변환 행렬, 색상 및 사용자 정의 머티리얼에서 사용할 일반 데이터가 포함됩니다. 인스턴싱을 사용하려면 모델의 ` instancing ` 속성을 설정하여 인스턴싱 객체를 참조하도록 하십시오.
애플리케이션은 ` QQuick3DInstancing`을 서브클래스화하여 C++에서 인스턴싱 객체를 정의하거나, 미리 정의된 QML 유형 중 하나인 ` InstanceList `, ` FileInstancing` 또는 ` RandomInstancing`을 사용할 수 있습니다. 또한 ` particle system `을 사용하여 ` ModelParticle3D.instanceTable ` 속성을 통해 인스턴싱 테이블을 정의할 수도 있습니다.
속성 설명서
depthSortingEnabled : bool
인스턴스 테이블에 대한 깊이 정렬 활성화 값을 저장합니다. 이 기능이 활성화되면 인스턴스는 카메라에서 가장 먼 인스턴스부터 가장 가까운 인스턴스 순으로, 즉 뒤에서 앞으로 정렬되어 렌더링됩니다. 비활성화된 경우(기본값)에는 인스턴스가 인스턴스 테이블에 지정된 순서대로 렌더링됩니다.
참고: 인스턴스는 서로에 대해서만 정렬됩니다. 인스턴스는 씬 내의 다른 오브젝트와 비교하여 정렬되지 않습니다.
참고: 정렬기능은 특히 인스턴스 수가 많을 경우 프레임 준비 시간을 증가시킵니다.
hasTransparency : bool
인스턴싱 테이블에 모델 렌더링 시 사용해야 할 알파 값이 포함되어 있다면 이 속성을 true로 설정하십시오. 이 속성은 모델이 불투명한 경우에만 영향을 미칩니다. 모델의 투명도( material)가 투명하거나, 알파 값( opacity )이 1보다 작은 경우에는 테이블의 알파 값이 무조건 사용됩니다.
참고: 알파 블렌딩을활성화하면 인스턴스가 겹칠 때 렌더링 문제가 발생할 수 있습니다. 자세한 내용은 알파 블렌딩 및 인스턴싱 문서를 참조하십시오.
instanceCountOverride : int
이 속성을 설정하면 인스턴스 테이블을 다시 생성하거나 재업로드하지 않고도 인스턴스 수를 제한할 수 있습니다. 이를 통해 렌더링되는 인스턴스 수를 매우 효율적으로 애니메이션 처리할 수 있습니다.
shadowBoundsMaximum : vector3d
인스턴스 테이블에 있는 모델의 섀도 맵 경계를 계산할 때 사용되는 최대 경계를 설정합니다.
기본값: (-1, -1, -1)
참고: 이 속성은 Instancing::shadowBoundsMinimum 의 각 구성 요소가 Instancing::shadowBoundsMaximum에 지정된 값보다 작을 때만 활성화됩니다. 그렇지 않은 경우 경계는 자동으로 계산됩니다.
shadowBoundsMinimum도 참조하십시오 .
shadowBoundsMinimum : vector3d
인스턴스 테이블에 있는 모델의 섀도우 맵 범위를 계산할 때 사용되는 최소 범위를 설정합니다.
기본값: (1, 1, 1)
참고: 이 속성은 Instancing::shadowBoundsMinimum의 각 구성 요소가 Instancing::shadowBoundsMaximum 에 정의된 값보다 작을 때만 활성화됩니다. 그렇지 않은 경우 경계는 자동으로 계산됩니다.
shadowBoundsMaximum도 참조하십시오 .
메서드 설명
[since 6.3] color instanceColor(int index)
다음 위치에 있는 인스턴스의 색상을 반환합니다. index
이 메서드는 Qt 6.3에서 도입되었습니다.
instancePosition, instanceScale, instanceRotation, instanceColor 및 instanceCustomData도 참조하십시오 .
[since 6.3] vector3d instanceCustomData(int index)
다음 위치에 있는 인스턴스의 사용자 정의 데이터를 반환합니다. index
이 메서드는 Qt 6.3에서 도입되었습니다.
instancePosition, instanceScale, instanceRotation, instanceColor 및 instanceCustomData도 참조하십시오 .
[since 6.3] vector3d instancePosition(int index)
인스턴스가 위치한 위치를 반환합니다. index
이 메서드는 Qt 6.3에서 도입되었습니다.
instanceScale, instanceRotation, instanceColor 및 instanceCustomData도 참조하십시오 .
[since 6.3] quaternion instanceRotation(int index)
인스턴스의 회전을 나타내는 쿼터니언을 반환합니다. index
이 메서드는 Qt 6.3에서 도입되었습니다.
instancePosition, instanceScale, instanceRotation, instanceColor 및 instanceCustomData도 참조하십시오 .
[since 6.3] vector3d instanceScale(int index)
다음 위치에서 인스턴스의 스케일을 반환합니다. index
이 메서드는 Qt 6.3에서 도입되었습니다.
instancePosition, instanceScale, instanceRotation, instanceColor 및 instanceCustomData도 참조하십시오 .
© 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.