QSpotLight Class
class Qt3DRender::QSpotLightQt 3D シーン内の Spot Light オブジェクトをカプセル化します。もっと見る
ヘッダー | #include <QSpotLight> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS 3drender) target_link_libraries(mytarget PRIVATE Qt6::3drender) |
qmake | QT += 3drender |
QML で | SpotLight |
を継承しています: | Qt3DRender::QAbstractLight |
ステータス | 非推奨 |
プロパティ
|
|
パブリック機能
QSpotLight(Qt3DCore::QNode *parent = nullptr) | |
float | constantAttenuation() const |
float | cutOffAngle() const |
float | linearAttenuation() const |
QVector3D | localDirection() const |
float | quadraticAttenuation() const |
パブリックスロット
void | setConstantAttenuation(float value) |
void | setCutOffAngle(float cutOffAngle) |
void | setLinearAttenuation(float value) |
void | setLocalDirection(const QVector3D &localDirection) |
void | setQuadraticAttenuation(float value) |
シグナル
void | constantAttenuationChanged(float constantAttenuation) |
void | cutOffAngleChanged(float cutOffAngle) |
void | linearAttenuationChanged(float linearAttenuation) |
void | localDirectionChanged(const QVector3D &localDirection) |
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) |
cutOffAngle : float
スポットライトのカットオフアングルを指定します。
注: このプロパティの正確な意味と使用方法は、マテリアルの実装次第です。
アクセス関数:
float | cutOffAngle() const |
void | setCutOffAngle(float cutOffAngle) |
通知信号:
void | cutOffAngleChanged(float cutOffAngle) |
linearAttenuation : float
スポット光の線形減衰を指定します。
注: このプロパティの正確な意味と使用方法は、マテリアルの実装次第です。
アクセス関数:
float | linearAttenuation() const |
void | setLinearAttenuation(float value) |
通知信号:
void | linearAttenuationChanged(float linearAttenuation) |
localDirection : QVector3D
スポットライトのローカルな方向を指定します。
注意: このプロパティの正確な意味と使用方法は、マテリアルの実装次第です。
アクセス関数:
QVector3D | localDirection() const |
void | setLocalDirection(const QVector3D &localDirection) |
通知シグナル:
void | localDirectionChanged(const QVector3D &localDirection) |
quadraticAttenuation : float
スポット光の二次減衰を指定します。
注意: このプロパティの正確な意味と使用方法は、マテリアルの実装次第です。
アクセス関数:
float | quadraticAttenuation() const |
void | setQuadraticAttenuation(float value) |
通知シグナル:
void | quadraticAttenuationChanged(float quadraticAttenuation) |
メンバ関数ドキュメント
[explicit]
QSpotLight::QSpotLight(Qt3DCore::QNode *parent = nullptr)
指定されたparent で新しい QSpotLight を構築します。
© 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.