QAbstractLight 类
class Qt3DRender::QAbstractLight在 Qt 3D 场景中封装 QAbstractLight 对象。更多...
| 头文件 | #include <QAbstractLight> | 
| CMake | find_package(Qt6 REQUIRED COMPONENTS 3drender) target_link_libraries(mytarget PRIVATE Qt6::3drender) | 
| qmake | QT += 3drender | 
| 由以下类实例化 | 光 | 
| 继承自 | Qt3DCore::QComponent | 
| 由以下类继承 | Qt3DRender::QDirectionalLight, Qt3DRender::QPointLight, 和 Qt3DRender::QSpotLight | 
公共类型
| 枚举 | Type { PointLight, DirectionalLight, SpotLight } | 
属性
公共函数
公共槽
| void | setColor(const QColor &color) | 
| void | setIntensity(float intensity) | 
信号
| void | colorChanged(const QColor &color) | 
| void | intensityChanged(float intensity) | 
成员类型文档
enum QAbstractLight::Type
标识特定类型的光。
| 常量 | 值 | 
|---|---|
| Qt3DRender::QAbstractLight::PointLight | 0 | 
| Qt3DRender::QAbstractLight::DirectionalLight | 1 | 
| Qt3DRender::QAbstractLight::SpotLight | 2 | 
属性文档
color : QColor
保持当前 QAbstractLight 颜色。
访问函数
| QColor | color() const | 
| void | setColor(const QColor &color) | 
通知信号
| void | colorChanged(const QColor &color) | 
intensity : float
保持当前 QAbstractLight 强度。
访问函数
| float | intensity() const | 
| void | setIntensity(float intensity) | 
通知信号
| void | intensityChanged(float intensity) | 
[只读] 类型 : const 类型
光源的类型。
访问函数
| Qt3DRender::QAbstractLight::Type | 类型() const | 
成员函数文档
Qt3DRender::QAbstractLight::类型 QAbstractLight::类型() const
包含当前的 QAbstractLight 类型。
注意: 属性类型的获取函数。
© 2024 The Qt Company Ltd. 本文档中的贡献属于各自所有者。本提供的文档受自由软件基金会发布的 GNU自由文档许可协议版本1.3 的条款约束。Qt及相应的标志是芬兰的The Qt Company Ltd.及其全球子公司和关联公司的 商标。所有其他商标均为其各自所有者的财产。