在 3D 空間錶示光源。 更多...
| 頭: | #include <Q3DLight> |
| qmake: | QT += datavisualization |
| Since: | QtDataVisualization 1.0 |
| 實例化: | Light3D |
| 繼承: | Q3DObject |
該類在 QtDataVisualization 1.0 引入。
| 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
.
該特性在 QtDataVisualization 5.9 引入。
訪問函數:
| bool | isAutoPosition () |
| void | setAutoPosition (bool enabled ) |
通知程序信號:
| void | autoPositionChanged (bool autoPosition ) |
構造位於原點的新 3D 光。可選 parent 參數可以給齣,然後會被傳遞給 QObject 構造函數。
[虛擬]
Q3DLight::
~Q3DLight
()
銷毀光對象。