QDirectionalLight Class

class Qt3DRender ::QDirectionalLight

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

头: #include <QDirectionalLight>
qmake: QT += 3drender
Since: Qt 5.7
实例化: DirectionalLight
继承: Qt3DRender::QAbstractLight

该类在 Qt 5.7 引入。

特性

公共函数

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 )

成员函数文档编制

QDirectionalLight:: QDirectionalLight ( Qt3DCore::QNode * parent = nullptr)

Constructs a new QDirectionalLight with the specified parent .