Qt3DRender::QPointLight Class
class Qt3DRender::QPointLightQt 3D のシーン内でポイントライトオブジェクトをカプセル化します。詳細...
| ヘッダー: | #include <qpointlight.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3drender) target_link_libraries(mytarget PRIVATE Qt6::3drender) |
| qmake: | QT += 3drender |
| QML内: | PointLight |
| 継承元: | Qt3DRender::QAbstractLight |
| ステータス: | 非推奨 |
このクラスは非推奨です。新しいコードでの使用は強く推奨されません。
プロパティ
- constantAttenuation : float
- linearAttenuation : float
- quadraticAttenuation : float
パブリック関数
| QPointLight(Qt3DCore::QNode *parent = nullptr) | |
| float | constantAttenuation() const |
| float | linearAttenuation() const |
| float | quadraticAttenuation() const |
パブリックスロット
| void | setConstantAttenuation(float value) |
| void | setLinearAttenuation(float value) |
| void | setQuadraticAttenuation(float value) |
シグナル
| void | constantAttenuationChanged(float constantAttenuation) |
| void | linearAttenuationChanged(float linearAttenuation) |
| void | quadraticAttenuationChanged(float quadraticAttenuation) |
詳細な説明
ポイントライトとは、単一の点から全方向に光を放射する光源です。概念的には、これは一般的な電球が発する光に似ています。
ポイントライトは、距離とともに光の強度がどのように減衰するかを記述するために、3つの減衰係数を使用します。これらの係数は、総減衰量を計算する際に組み合わせて使用されるように設計されています。Qt3D Extrasのマテリアルでは、以下の式が使用されます。ここで、distanceは光源からレンダリングされる表面までの距離です:
totalAttenuation = 1.0 / (constantAttenuation + (linearAttenuation * distance) + (quadraticAttenuation * distance * distance));カスタムマテリアルでは、これらの係数を異なる方法で解釈することも可能です。
プロパティのドキュメント
constantAttenuation : float
点光源の定数減衰率を指定します。
注: このプロパティの正確な意味 と使用方法は 、マテリアル実装に依存します。
アクセス関数:
| float | constantAttenuation() const |
| void | setConstantAttenuation(float value) |
通知信号:
| void | constantAttenuationChanged(float constantAttenuation) |
linearAttenuation : float
点光源の線形減衰を指定します。
注: このプロパティの正確な意味 と使用方法は 、マテリアル実装に依存します。
アクセス関数:
| float | linearAttenuation() const |
| void | setLinearAttenuation(float value) |
通知信号:
| void | linearAttenuationChanged(float linearAttenuation) |
quadraticAttenuation : float
点光源の2次減衰を指定します。
注: このプロパティの正確な意味 と使用方法は 、マテリアル実装に依存します。
アクセス関数:
| float | quadraticAttenuation() const |
| void | setQuadraticAttenuation(float value) |
通知信号:
| void | quadraticAttenuationChanged(float quadraticAttenuation) |
メンバ関数のドキュメント
[explicit] QPointLight::QPointLight(Qt3DCore::QNode *parent = nullptr)
指定されたparent を使用して、新しいQPointLightを構築します。
© 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.