Q3DLight Class
三维空间中的光源表示。更多
头文件: | #include <Q3DLight> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS DataVisualization) target_link_libraries(mytarget PRIVATE Qt6::DataVisualization) |
qmake: | QT += datavisualization |
自 | QtDataVisualization 1.0 |
在 QML 中: | Light3D |
继承: | Q3DObject |
属性
(since QtDataVisualization 5.9)
autoPosition : bool
公共功能
Q3DLight(QObject *parent = nullptr) | |
virtual | ~Q3DLight() |
bool | isAutoPosition() |
void | setAutoPosition(bool enabled) |
信号
void | autoPositionChanged(bool autoPosition) |
属性文档
[since QtDataVisualization 5.9]
autoPosition : bool
该属性表示灯光位置是否自动跟随摄像机。
注: 如果启用了阴影,则该属性无效。请记住在设置灯光位置前禁用阴影,否则如果isAutoPosition()
是false
,它将被自动定位覆盖。
此属性在 QtDataVisualization 5.9 中引入。
访问功能:
bool | isAutoPosition() |
void | setAutoPosition(bool enabled) |
Notifier 信号:
void | autoPositionChanged(bool autoPosition) |
© 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.