Instancing QML Type

인스턴스 테이블의 기본 유형입니다. 자세히...

Import Statement: import QtQuick3D
Since: Qt 6.2
In C++: QQuick3DInstancing
Inherits:

Object3D

Inherited By:

FileInstancing, InstanceList, and RandomInstancing

속성

방법

자세한 설명

인스턴스 렌더링을 사용하면 모델을 변형하여 복제할 수 있습니다.

인스턴싱 유형은 각 인스턴스가 기본 모델을 기준으로 수정되는 방식을 지정하는 테이블을 정의합니다. 이 테이블에는 각 인덱스에 대한 항목이 있으며, 여기에는 변환 매트릭스, 색상 및 사용자 지정 머티리얼에서 사용할 일반 데이터가 포함됩니다. 인스턴싱을 사용하려면 모델의 instancing 속성을 인스턴싱 객체를 참조하도록 설정합니다.

애플리케이션은 QQuick3DInstancing 을 서브클래싱하여 C++에서 인스턴싱 객체를 정의하거나 사전 정의된 QML 유형 중 하나를 사용할 수 있습니다: InstanceList FileInstancing 또는 RandomInstancing. 또한 particle system 을 사용하여 ModelParticle3D.instanceTable 속성을 사용하여 인스턴싱 테이블을 정의할 수도 있습니다.

속성 문서

depthSortingEnabled : bool

인스턴스 테이블의 깊이 정렬 활성화 값을 보유합니다. 활성화하면 인스턴스가 카메라에서 가장 먼 인스턴스부터 가장 가까운 인스턴스까지, 즉 앞뒤로 정렬되어 렌더링됩니다. 기본값인 비활성화하면 인스턴스는 인스턴스 테이블에 지정된 순서대로 렌더링됩니다.

참고: 인스턴스는 서로를 기준으로만 정렬됩니다. 인스턴스는 씬의 다른 오브젝트에 대해 정렬되지 않습니다.

참고: 정렬은 특히 인스턴스 수가 많은 경우 프레임 준비 시간을 증가시킵니다.


hasTransparency : bool

인스턴싱 테이블에 모델을 렌더링할 때 사용해야 하는 알파 값이 포함된 경우 이 속성을 true로 설정합니다. 이 속성은 모델이 불투명한 경우에만 차이를 만듭니다: 모델에 투명한 material 또는 1보다 작은 opacity 이 있는 경우 테이블의 알파 값에 관계없이 사용됩니다.

참고: 알파 블렌딩을 활성화하면 인스턴스가 겹칠 때 렌더링 문제가 발생할 수 있습니다. 자세한 내용은 알파 블렌딩 및 인스턴싱 문서를 참조하세요.


instanceCountOverride : int

인스턴스 테이블을 다시 생성하거나 다시 업로드하지 않고 인스턴스 수를 제한하려면 이 속성을 설정합니다. 이를 통해 렌더링되는 인스턴스 수를 매우 저렴하게 애니메이션할 수 있습니다.


메서드 문서

[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, 인스턴스 커스텀데이터도 참조하십시오 .


[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, 인스턴스 스케일, instanceRotation, instanceColor, 및 instanceCustomData도 참조하십시오 .


© 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.