PointLight QML Type
在Qt 3D 场景中封装一个“点光源”(Point Light)对象。更多内容...
| Import Statement: | import Qt3D.Render 2.12 |
| In C++: | QPointLight |
| Inherits: | |
| Status: | Deprecated |
此类型已弃用。我们强烈建议不要在新代码中使用它。
属性
- constantAttenuation : real
- linearAttenuation : real
- quadraticAttenuation : real
详细说明
点光源是一种从单一点向各个方向发射光线的光源。从概念上讲,这类似于标准灯泡发出的光。
点光源使用三个衰减因子来描述光强随距离的衰减情况。这些因子旨在共同用于计算总衰减量。对于 Qt3D Extras 中的材质,采用以下公式,其中距离是指光源到被渲染表面的距离:
totalAttenuation = 1.0 / (constantAttenuation + (linearAttenuation * distance) + (quadraticAttenuation * distance * distance));自定义材质可能会对这些因子采用不同的解释方式。
属性文档
constantAttenuation : real
指定点光源的恒定衰减。
注意: 该属性的确切含义和用法取决于具体实现。
linearAttenuation : real
指定点光源的线性衰减。
注意: 该属性的确切含义和用法取决于具体实现。
quadraticAttenuation : real
指定点光的二次衰减。
注意: 该属性的确切含义 和用法取决于具体材料的实现方式。
© 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.