Qt3DRender::QDirectionalLight Class
class Qt3DRender::QDirectionalLight在Qt 3D 场景中封装一个“定向光”对象。更多内容...
| 标题: | #include <qdirectionallight.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3drender) target_link_libraries(mytarget PRIVATE Qt6::3drender) |
| qmake: | QT += 3drender |
| 在 QML 中: | DirectionalLight |
| 继承自: | Qt3DRender::QAbstractLight |
| 状态: | 已弃用 |
该类已弃用。我们强烈建议不要在新代码中使用它。
属性
- worldDirection : QVector3D
公共函数
| QDirectionalLight(Qt3DCore::QNode *parent = nullptr) | |
| QVector3D | worldDirection() const |
公共槽位
| void | setWorldDirection(const QVector3D &worldDirection) |
信号
| void | worldDirectionChanged(const QVector3D &worldDirection) |
属性文档
worldDirection : QVector3D
指定定向光的世界方向。
注意: 该属性的确切含义 和用法取决于材质实现。
访问函数:
| QVector3D | worldDirection() const |
| void | setWorldDirection(const QVector3D &worldDirection) |
通知信号:
| void | worldDirectionChanged(const QVector3D &worldDirection) |
成员函数文档
[explicit] QDirectionalLight::QDirectionalLight(Qt3DCore::QNode *parent = nullptr)
使用指定的parent 创建一个新的QDirectionalLight。
© 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.