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) |
通知器信号:
| void | autoPositionChanged(bool autoPosition) |
© 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.