RandomInstancing QML Type
무작위 인스턴싱 테이블을 생성합니다. 더 보기...
Import Statement: | import QtQuick3D.Helpers |
Since: | Qt 6.2 |
Inherits: |
속성
- color : InstanceRange
- colorModel : enumeration
- customData : InstanceRange
- instanceCount : int
- position : InstanceRange
- randomSeed : int
- rotation : InstanceRange
- scale : InstanceRange
상세 설명
랜덤 인스턴싱 유형은 정의된 범위 내에서 많은 수의 랜덤 인스턴스를 쉽게 생성할 수 있는 방법을 제공합니다. 인스턴스 수는 instanceCount 속성에 의해 정의됩니다. 범위는 position, scale, rotation, color, customData 속성에 의해 정의됩니다.
InstanceList도 참조하세요 .
속성 문서
color : InstanceRange |
색상 속성은 생성된 인스턴스의 색상 변형 범위를 정의합니다. 유형은 색상입니다. 기본값은 비어 있으므로 색상이 흰색이 됩니다.
예를 들어 colorModel 속성을 설정하면 채도가 높은 색상만 선택할 수 있습니다.
position, rotation, scale, customData 을참조하세요 .
colorModel : enumeration |
이 속성은 색상 범위가 해석되는 방식을 제어합니다.
인스턴스 색상은 from 및 to 색상에 의해 결정된 범위 내에서 컴포넌트별로 생성됩니다. 색상 모델에 따라 이러한 구성 요소가 정의되는 방식이 결정됩니다.
Constant | 설명 |
---|---|
RandomInstancing.RGB | RGB 색상 모델에 따라 빨강, 녹색, 파랑, 알파로 구성됩니다. |
RandomInstancing.HSV | 구성 요소는 색조, 채도, 값 및 알파이며 HSV Color Model 에 따릅니다. |
RandomInstancing.HSL | 구성 요소는 색조, 채도, 밝기 및 알파이며, HSL Color Model 에 따릅니다. |
예를 들어, 다음 색상 범위
color: InstanceRange { from: Qt.hsva(0, 0.1, 0.8, 1) to: Qt.hsva(1, 0.3, 1, 1) }
은 HSV
색상 모델을 사용하는 경우 전체 범위의 파스텔 색상을 생성하지만 RGB
색상 모델을 사용하는 경우 분홍색 음영만 생성합니다.
기본값은 RandomInstancing.RGB
RandomInstancing::color 를참조하세요 .
customData : InstanceRange |
instanceCount : int |
instanceCount 속성은 생성할 인스턴스 수를 지정합니다. 이 값을 변경하면 전체 테이블이 다시 생성됩니다.
randomSeed도 참조하세요 .
position : InstanceRange |
위치 속성은 생성된 인스턴스의 기하학적 경계를 정의합니다. 기본값은 비어 있으므로 생성된 위치는 [0, 0, 0]
입니다.
color, rotation, scale, customData도 참조 하세요.
randomSeed : int |
이 속성은 난수 생성기의 시드를 정의합니다. 이 값을 -1과 다른 값으로 설정하면 인스턴스 테이블이 생성될 때마다 동일한 콘텐츠를 갖도록 보장합니다. 속성을 추가하거나 변경하면 완전히 다른 테이블이 생성될 수 있다는 점에 유의하세요.
기본값은 -1이므로 테이블이 생성될 때마다 새로운 임의의 값을 얻게 됩니다.
rotation : InstanceRange |
회전 속성은 생성된 인스턴스의 회전 범위를 정의합니다. 유형은 오일러 회전 벡터 [xRotation, yRotation, zRotation]
에 해당하는 vector3d 입니다. 기본값은 비어 있으므로 회전이 적용되지 않습니다.
position, color, scale, customData도 참조 하세요.
scale : InstanceRange |
scale 속성은 생성된 인스턴스의 스케일링 한계를 정의합니다. 유형은 vector3d 입니다. 균일한 스케일링을 위해 InstanceRange.proportional 을 true
으로 설정합니다. 기본값은 비어 있으므로 스케일링이 적용되지 않습니다.
position, color, rotation, scale 및 customData도 참조하세요 .
© 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.