QAbstractLight Class

( Qt3DRender::QAbstractLight )

Encapsulate a QAbstractLight object in a Qt 3D scene. 更多...

头: #include <QAbstractLight>
qmake: QT += 3drender
Since: Qt 5.6
实例化: Light
继承: Qt3DCore::QComponent
继承者: Qt3DRender::QDirectionalLight , Qt3DRender::QPointLight ,和 Qt3DRender::QSpotLight

公共类型

enum Type { PointLight, DirectionalLight, SpotLight }

特性

公共函数

~QAbstractLight ()
QColor color () const
float intensity () const
类型 type () const

公共槽

void setColor (const QColor & color )
void setIntensity (float intensity )

信号

void colorChanged (const QColor & color )
void intensityChanged (float intensity )

保护函数

QAbstractLight (QAbstractLightPrivate & dd , Qt3DCore::QNode * parent = nullptr)

额外继承成员

详细描述

Encapsulate a QAbstractLight object in a Qt 3D scene.

成员类型文档编制

enum QAbstractLight:: Type

Identifies the particular type of light.

常量
Qt3DRender::QAbstractLight::PointLight 0
Qt3DRender::QAbstractLight::DirectionalLight 1
Qt3DRender::QAbstractLight::SpotLight 2

特性文档编制

color : QColor

Holds the current QAbstractLight 颜色。

访问函数:

QColor color () const
void setColor (const QColor & color )

通知程序信号:

void colorChanged (const QColor & color )

intensity : float

Holds the current QAbstractLight intensity.

访问函数:

float intensity () const
void setIntensity (float intensity )

通知程序信号:

void intensityChanged (float intensity )

type : const Type

Contains the type of light.

访问函数:

类型 type () const

成员函数文档编制

[protected] QAbstractLight:: QAbstractLight ( QAbstractLightPrivate & dd , Qt3DCore::QNode * parent = nullptr)

Copy constructor.

QAbstractLight:: ~QAbstractLight ()

Destroys the instance of QAbstractLight.

Type QAbstractLight:: type () const

Holds the current QAbstractLight 类型。

注意: Getter 函数对于特性 type .