QPointLight Class
class Qt3DRender::QPointLightQt 3D シーン内の Point Light オブジェクトをカプセル化します。もっと見る
ヘッダー | #include <QPointLight> |
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のマテリアルでは以下の式が使用され、距離はライトからレンダリングされるサーフェスまでの距離です:
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 を構築する。
© 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.