QAbstractLight Class

class Qt3DRender ::QAbstractLight

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

頭: #include <QAbstractLight>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
實例化: Light
繼承: Qt3DCore::QComponent
繼承者: Qt3DRender::QDirectionalLight , Qt3DRender::QPointLight ,和 Qt3DRender::QSpotLight

公共類型

enum Type { PointLight, DirectionalLight, SpotLight }

特性

公共函數

QColor color () const
float intensity () const
Qt3DRender::QAbstractLight::Type type () const

公共槽

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

信號

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

詳細描述

成員類型文檔編製

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 )

[read-only] type : const Type

The type of light.

訪問函數:

Qt3DRender::QAbstractLight::Type type () const

成員函數文檔編製

Qt3DRender::QAbstractLight::Type QAbstractLight:: type () const

Holds the current QAbstractLight 類型。

注意: getter 函數對於特性 type。