在 3D 空间表示光源。 更多...
头: | #include <Q3DLight> |
CMake: |
find_package(Qt6 REQUIRED COMPONENTS Graphs)
target_link_libraries(mytarget PRIVATE Qt6::Graphs) |
qmake: | QT += graphs |
实例化: | Light3D |
继承: | Q3DObject |
Status: | Technical Preview |
Q3DLight (QObject * parent = nullptr) | |
virtual | ~Q3DLight () |
bool | isAutoPosition () |
void | setAutoPosition (bool enabled ) |
void | autoPositionChanged (bool autoPosition ) |
Q3DLight 表示在 3D 空间中的单色光源。
注意:
默认光有
isAutoPosition
()
true
.
This property holds whether the light position follows the camera automatically.
注意:
Has no effect if shadows are enabled. Remember to disable shadows before setting light's position, or it will be overwritten by automatic positioning if
isAutoPosition()
is
false
.
访问函数:
bool | isAutoPosition () |
void | setAutoPosition (bool enabled ) |
通知程序信号:
void | autoPositionChanged (bool autoPosition ) |
[explicit]
Q3DLight::
Q3DLight
(
QObject
*
parent
= nullptr)
构造位于原点的新 3D 光。可选 parent 参数可以给出,然后会被传递给 QObject 构造函数。
[virtual noexcept]
Q3DLight::
~Q3DLight
()
销毁光对象。