Qt3DRender::QSpotLight Class
class Qt3DRender::QSpotLightQt 3D のシーンにSpot Lightオブジェクトをカプセル化します。詳細...
| ヘッダー: | #include <qspotlight.h> |
| 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 のマテリアルでは、以下の式が使用されます。ここで、distance は光源からレンダリングされる表面までの距離です。
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
スポットライトの2次減衰を指定します。
注: このプロパティの正確な意味 と使用方法は 、マテリアル実装に依存します。
アクセス関数:
| float | quadraticAttenuation() const |
| void | setQuadraticAttenuation(float value) |
通知信号:
| void | quadraticAttenuationChanged(float quadraticAttenuation) |
メンバ関数のドキュメント
[explicit] QSpotLight::QSpotLight(Qt3DCore::QNode *parent = nullptr)
指定されたparent を使用して、新しいQSpotLightを構築します。
© 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.