SpotLight QML Type
在Qt 3D 场景中封装聚光灯对象。更多
Import Statement: | import Qt3D.Render 2.9 |
In C++: | QSpotLight |
Inherits: | |
Status: | Deprecated |
属性
- constantAttenuation : real
- cutOffAngle : real
- linearAttenuation : real
- localDirection : vector3d
- quadraticAttenuation : real
详细说明
聚光灯是一种向特定方向发射锥形光的光源。
聚光灯使用三个衰减系数来描述光的强度随距离衰减的情况。这些系数可在计算总衰减时一起使用。对于 Qt3D Extras 中的材质,使用了以下公式,其中距离是指光线到被渲染表面的距离:
totalAttenuation = 1.0 / (constantAttenuation + (linearAttenuation * distance) + (quadraticAttenuation * distance * distance));
自定义材质可以选择以不同方式解释这些因素。
属性文档
constantAttenuation : real |
指定聚光灯的恒定衰减。
注: 此属性的确切含义和使用取决于材质的实现。
cutOffAngle : real |
指定聚光灯的截止角。
注: 此属性的确切含义和使用取决于材料的实现。
linearAttenuation : real |
指定聚光灯的线性衰减。
注: 此属性的确切含义和使用取决于材质的实现。
localDirection : vector3d |
指定聚光灯的局部方向。
注: 此属性的确切含义和使用取决于材质的实现。
quadraticAttenuation : real |
指定聚光灯的二次衰减。
注: 此属性的确切含义和使用取决于材质的实现。
© 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.