QDirectionalLight Class

class Qt3DRender::QDirectionalLight

Encapsulate a Directional Light object in a Qt 3D scene. 更多...

頭: #include <QDirectionalLight>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
在 QML: DirectionalLight
繼承: Qt3DRender::QAbstractLight
狀態: 棄用

特性

公共函數

QDirectionalLight (Qt3DCore::QNode * parent = nullptr)
QVector3D worldDirection () const

公共槽

void setWorldDirection (const QVector3D & worldDirection )

信號

void worldDirectionChanged (const QVector3D & worldDirection )

詳細描述

A directional light is a light source that behaves similar to sunlight. The light from a directional light hits all objects from the same direction and with the same intensity, regardless of where they are in the scene.

特性文檔編製

worldDirection : QVector3D

Specifies the world direction of the directional light.

注意: The exact meaning and use of this property is up to the material implementation.

訪問函數:

QVector3D worldDirection () const
void setWorldDirection (const QVector3D & worldDirection )

通知程序信號:

void worldDirectionChanged (const QVector3D & worldDirection )

成員函數文檔編製

[explicit] QDirectionalLight:: QDirectionalLight ( Qt3DCore::QNode * parent = nullptr)

Constructs a new QDirectionalLight with the specified parent .