![]() |
Qt 6.x
The Qt SDK
|
#include <proceduralskytexturedata_p.h>
Public Types | |
enum class | SkyTextureQuality { SkyTextureQualityLow , SkyTextureQualityMedium , SkyTextureQualityHigh , SkyTextureQualityVeryHigh } |
![]() | |
enum | Format { None , RGBA8 , RGBA16F , RGBA32F , RGBE8 , R8 , R16 , R16F , R32F , BC1 , BC2 , BC3 , BC4 , BC5 , BC6H , BC7 , DXT1_RGBA , DXT1_RGB , DXT3_RGBA , DXT5_RGBA , ETC2_RGB8 , ETC2_RGB8A1 , ETC2_RGBA8 , ASTC_4x4 , ASTC_5x4 , ASTC_5x5 , ASTC_6x5 , ASTC_6x6 , ASTC_8x5 , ASTC_8x6 , ASTC_8x8 , ASTC_10x5 , ASTC_10x6 , ASTC_10x8 , ASTC_10x10 , ASTC_12x10 , ASTC_12x12 } |
Returns the color format of the texture data assigned in \l textureData property. More... | |
Public Slots | |
void | setSkyTopColor (QColor skyTopColor) |
void | setSkyHorizonColor (QColor skyHorizonColor) |
void | setSkyCurve (float skyCurve) |
void | setSkyEnergy (float skyEnergy) |
void | setGroundBottomColor (QColor groundBottomColor) |
void | setGroundHorizonColor (QColor groundHorizonColor) |
void | setGroundCurve (float groundCurve) |
void | setGroundEnergy (float groundEnergy) |
void | setSunColor (QColor sunColor) |
void | setSunLatitude (float sunLatitude) |
void | setSunLongitude (float sunLongitude) |
void | setSunAngleMin (float sunAngleMin) |
void | setSunAngleMax (float sunAngleMax) |
void | setSunCurve (float sunCurve) |
void | setSunEnergy (float sunEnergy) |
void | setTextureQuality (SkyTextureQuality textureQuality) |
void | generateRGBA16FTexture () |
![]() | |
void | update () |
void | setParentItem (QQuick3DObject *parentItem) |
![]() | |
void | deleteLater () |
\threadsafe | |
Public Member Functions | |
ProceduralSkyTextureData () | |
\qmltype ProceduralSkyTextureData \inqmlmodule QtQuick3D.Helpers \inherits TextureData | |
~ProceduralSkyTextureData () | |
QColor | skyTopColor () const |
QColor | skyHorizonColor () const |
float | skyCurve () const |
float | skyEnergy () const |
QColor | groundBottomColor () const |
QColor | groundHorizonColor () const |
float | groundCurve () const |
float | groundEnergy () const |
QColor | sunColor () const |
float | sunLatitude () const |
float | sunLongitude () const |
float | sunAngleMin () const |
float | sunAngleMax () const |
float | sunCurve () const |
float | sunEnergy () const |
SkyTextureQuality | textureQuality () const |
![]() | |
QQuick3DTextureData (QQuick3DObject *parent=nullptr) | |
~QQuick3DTextureData () | |
const QByteArray | textureData () const |
Returns the current texture data defined by this item. | |
void | setTextureData (const QByteArray &data) |
Sets the texture data. | |
QSize | size () const |
Returns the size of the texture data in pixels. | |
void | setSize (const QSize &size) |
Sets the size of the texture data in pixels. | |
int | depth () const |
Returns the depth of the texture data in pixels. | |
void | setDepth (int depth) |
Sets the depth of the texture data in pixels. | |
Format | format () const |
Returns the format of the texture data. | |
void | setFormat (Format format) |
Sets the format of the texture data. | |
bool | hasTransparency () const |
Returns true if the texture data has transparency. | |
void | setHasTransparency (bool hasTransparency) |
Set hasTransparency to true if the texture data has an active alpha channel with non-opaque values. | |
![]() | |
Q_INVOKABLE | QObject (QObject *parent=nullptr) |
Constructs an object with parent object parent. | |
virtual | ~QObject () |
Destroys the object, deleting all its child objects. | |
virtual bool | event (QEvent *event) |
This virtual function receives events to an object and should return true if the event e was recognized and processed. | |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
Filters events if this object has been installed as an event filter for the watched object. | |
QString | objectName () const |
Q_WEAK_OVERLOAD void | setObjectName (const QString &name) |
Sets the object's name to name. | |
void | setObjectName (QAnyStringView name) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
QBindable< QString > | bindableObjectName () |
bool | isWidgetType () const |
Returns true if the object is a widget; otherwise returns false . | |
bool | isWindowType () const |
Returns true if the object is a window; otherwise returns false . | |
bool | isQuickItemType () const |
Returns true if the object is a QQuickItem; otherwise returns false . | |
bool | signalsBlocked () const noexcept |
Returns true if signals are blocked; otherwise returns false . | |
bool | blockSignals (bool b) noexcept |
If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). | |
QThread * | thread () const |
Returns the thread in which the object lives. | |
void | moveToThread (QThread *thread) |
Changes the thread affinity for this object and its children. | |
int | startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer) |
This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds. | |
int | startTimer (std::chrono::milliseconds time, Qt::TimerType timerType=Qt::CoarseTimer) |
void | killTimer (int id) |
Kills the timer with timer identifier, id. | |
template<typename T > | |
T | findChild (const QString &aName=QString(), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object. | |
template<typename T > | |
QList< T > | findChildren (const QString &aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects. | |
template<typename T > | |
QList< T > | findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
const QObjectList & | children () const |
Returns a list of child objects. | |
void | setParent (QObject *parent) |
Makes the object a child of parent. | |
void | installEventFilter (QObject *filterObj) |
Installs an event filter filterObj on this object. | |
void | removeEventFilter (QObject *obj) |
Removes an event filter object obj from this object. | |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const |
bool | disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const |
bool | disconnect (const QObject *receiver, const char *member=nullptr) const |
void | dumpObjectTree () const |
Dumps a tree of children to the debug output. | |
void | dumpObjectInfo () const |
Dumps information about signal connections, etc. | |
bool | setProperty (const char *name, const QVariant &value) |
Sets the value of the object's name property to value. | |
bool | setProperty (const char *name, QVariant &&value) |
QVariant | property (const char *name) const |
Returns the value of the object's name property. | |
QList< QByteArray > | dynamicPropertyNames () const |
QBindingStorage * | bindingStorage () |
const QBindingStorage * | bindingStorage () const |
QObject * | parent () const |
Returns a pointer to the parent object. | |
bool | inherits (const char *classname) const |
Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false . | |
![]() | |
QQmlParserStatus () | |
virtual | ~QQmlParserStatus () |
virtual void | classBegin ()=0 |
Invoked after class creation, but before any properties have been set. | |
virtual void | componentComplete ()=0 |
Invoked after the root component that caused this instantiation has completed construction. | |
Properties | |
QColor | skyTopColor |
QColor | skyHorizonColor |
float | skyCurve |
float | skyEnergy |
QColor | groundBottomColor |
QColor | groundHorizonColor |
float | groundCurve |
float | groundEnergy |
QColor | sunColor |
float | sunLatitude |
float | sunLongitude |
float | sunAngleMin |
float | sunAngleMax |
float | sunCurve |
float | sunEnergy |
SkyTextureQuality | textureQuality |
![]() | |
QQuick3DObject * | parent |
\qmlproperty Object3D QtQuick3D::Object3D::parent This property holds the parent of the Object3D in a 3D scene. | |
![]() | |
QString | objectName |
the name of this object | |
Additional Inherited Members | |
![]() | |
static QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection) |
\threadsafe | |
static QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot) |
static bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member) |
\threadsafe | |
static bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member) |
static bool | disconnect (const QMetaObject::Connection &) |
Disconnect a connection. | |
template<typename Func1 , typename Func2 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot) |
template<typename Func1 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero) |
![]() | |
QSSGRenderGraphObject * | updateSpatialNode (QSSGRenderGraphObject *node) override |
void | markAllDirty () override |
![]() | |
virtual QSSGRenderGraphObject * | updateSpatialNode (QSSGRenderGraphObject *node) |
virtual void | markAllDirty () |
virtual void | itemChange (ItemChange, const ItemChangeData &) |
QQuick3DObject (QQuick3DObjectPrivate &dd, QQuick3DObject *parent=nullptr) | |
void | classBegin () override |
Invoked after class creation, but before any properties have been set. | |
void | componentComplete () override |
Invoked after the root component that caused this instantiation has completed construction. | |
bool | isComponentComplete () const |
virtual void | preSync () |
![]() | |
QObject * | sender () const |
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr. | |
int | senderSignalIndex () const |
int | receivers (const char *signal) const |
Returns the number of receivers connected to the signal. | |
bool | isSignalConnected (const QMetaMethod &signal) const |
virtual void | timerEvent (QTimerEvent *event) |
This event handler can be reimplemented in a subclass to receive timer events for the object. | |
virtual void | childEvent (QChildEvent *event) |
This event handler can be reimplemented in a subclass to receive child events. | |
virtual void | customEvent (QEvent *event) |
This event handler can be reimplemented in a subclass to receive custom events. | |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
QObject (QObjectPrivate &dd, QObject *parent=nullptr) | |
![]() | |
QScopedPointer< QObjectData > | d_ptr |
![]() | |
template< class T > T | qobject_cast (const QObject *object) |
Returns the given object cast to type T if the object is of type T (or of a subclass); otherwise returns \nullptr. | |
template< typename T > T | qFindChildqFindChildren (const QObject *obj, const QString &name)() |
template< typename T > QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QString &name)() |
QObjectList | |
\macro Q_CLASSINFO(Name, Value) | |
Definition at line 27 of file proceduralskytexturedata_p.h.
|
strong |
Enumerator | |
---|---|
SkyTextureQualityLow | |
SkyTextureQualityMedium | |
SkyTextureQualityHigh | |
SkyTextureQualityVeryHigh |
Definition at line 51 of file proceduralskytexturedata_p.h.
QT_BEGIN_NAMESPACE ProceduralSkyTextureData::ProceduralSkyTextureData | ( | ) |
\qmltype ProceduralSkyTextureData \inqmlmodule QtQuick3D.Helpers \inherits TextureData
Generates an HDR skybox cubemap.
This helper type provides an easy way to generate a lightprobe/skybox texture in HDR format. Note that generating a lightprobe is an expensive process that can take significant time on embedded hardware.
The generated cubemap consists of three elements: the sky, the ground, and the sun. The sky and the ground cover the top and bottom hemispheres. The position of the sun can be specified by setting \l sunLatitude and \l sunLongitude.
\qml View3D { environment: SceneEnvironment { backgroundMode: SceneEnvironment.SkyBox lightProbe: Texture { textureData: ProceduralSkyTextureData { } } } } \endqml
\qmlproperty color ProceduralSkyTextureData::skyTopColor Specifies the sky color at the top of the skybox. The top half of the skybox has a gradient from \l skyHorizonColor to skyTopColor
.
\qmlproperty color ProceduralSkyTextureData::skyHorizonColor Specifies the sky color at the horizon. The top half of the skybox has a gradient from skyHorizonColor
to \l skyTopColor.
\qmlproperty real ProceduralSkyTextureData::skyCurve Modifies the curve of the sky gradient.
\qmlproperty real ProceduralSkyTextureData::skyEnergy Specifies the intensity of the top half of the skybox. The sky gradient is multiplied with this factor.
\qmlproperty color ProceduralSkyTextureData::groundBottomColor Specifies the ground color at the bottom of the skybox. The bottom half of the skybox has a gradient from \l groundHorizonColor to groundBottomColor
.
\qmlproperty color ProceduralSkyTextureData::groundHorizonColor Specifies the ground color at the horizon. The bottom half of the skybox has a gradient from groundHorizonColor
to \l groundBottomColor.
\qmlproperty real ProceduralSkyTextureData::groundCurve Modifies the curve of the ground gradient.
\qmlproperty real ProceduralSkyTextureData::groundEnergy Specifies the intensity of the bottom half of the skybox. The ground gradient is multiplied with this factor.
\qmlproperty color ProceduralSkyTextureData::sunColor Specifies the color of the sun.
\qmlproperty real ProceduralSkyTextureData::sunLatitude Specifies the angle between the horizon and the sun position.
\qmlproperty real ProceduralSkyTextureData::sunLongitude Specifies the angle between the forward direction and the sun position.
\qmlproperty real ProceduralSkyTextureData::sunAngleMin Specifies the angle from the center of the sun to where it starts to fade.
\qmlproperty real ProceduralSkyTextureData::sunAngleMax Specifies the angle from the center of the sun to where it fades out completely.
\qmlproperty real ProceduralSkyTextureData::sunCurve Modifies the curve of the sun gradient.
\qmlproperty float ProceduralSkyTextureData::sunEnergy Specifies the intensity of the sun.
\qmlproperty SkyTextureQuality ProceduralSkyTextureData::textureQuality This property sets the quality of the sky texture. Supported values are:
\value ProceduralSkyTextureData.SkyTextureQualityLow Generate a 512x512 texture \value ProceduralSkyTextureData.SkyTextureQualityMedium Generate a 1024x1024 texture \value ProceduralSkyTextureData.SkyTextureQualityHigh Generate a 2048x2048 texture \value ProceduralSkyTextureData.SkyTextureQualityVeryHigh Generate a 4096x4096 texture
Definition at line 117 of file proceduralskytexturedata.cpp.
ProceduralSkyTextureData::~ProceduralSkyTextureData | ( | ) |
Definition at line 122 of file proceduralskytexturedata.cpp.
|
slot |
Definition at line 366 of file proceduralskytexturedata.cpp.
References imageData, QByteArray::resize(), QQuick3DTextureData::RGBA16F, QQuick3DTextureData::setFormat(), QQuick3DTextureData::setHasTransparency(), QQuick3DTextureData::setSize(), QQuick3DTextureData::setTextureData(), QQuick3DTextureData::size(), SkyTextureQualityHigh, SkyTextureQualityLow, SkyTextureQualityMedium, and SkyTextureQualityVeryHigh.
QColor ProceduralSkyTextureData::groundBottomColor | ( | ) | const |
Definition at line 146 of file proceduralskytexturedata.cpp.
float ProceduralSkyTextureData::groundCurve | ( | ) | const |
Definition at line 156 of file proceduralskytexturedata.cpp.
|
signal |
float ProceduralSkyTextureData::groundEnergy | ( | ) | const |
Definition at line 161 of file proceduralskytexturedata.cpp.
|
signal |
QColor ProceduralSkyTextureData::groundHorizonColor | ( | ) | const |
Definition at line 151 of file proceduralskytexturedata.cpp.
Definition at line 246 of file proceduralskytexturedata.cpp.
References emit, groundBottomColor, and groundBottomColorChanged().
|
slot |
Definition at line 266 of file proceduralskytexturedata.cpp.
References emit, groundCurve, groundCurveChanged(), and qFuzzyCompare().
|
slot |
Definition at line 276 of file proceduralskytexturedata.cpp.
References emit, groundEnergy, groundEnergyChanged(), and qFuzzyCompare().
Definition at line 256 of file proceduralskytexturedata.cpp.
References emit, groundHorizonColor, and groundHorizonColorChanged().
|
slot |
Definition at line 226 of file proceduralskytexturedata.cpp.
References emit, qFuzzyCompare(), skyCurve, and skyCurveChanged().
|
slot |
Definition at line 236 of file proceduralskytexturedata.cpp.
References emit, qFuzzyCompare(), skyEnergy, and skyEnergyChanged().
Definition at line 216 of file proceduralskytexturedata.cpp.
References emit, skyHorizonColor, and skyHorizonColorChanged().
Definition at line 206 of file proceduralskytexturedata.cpp.
References emit, skyTopColor, and skyTopColorChanged().
|
slot |
Definition at line 326 of file proceduralskytexturedata.cpp.
References emit, qFuzzyCompare(), sunAngleMax, and sunAngleMaxChanged().
|
slot |
Definition at line 316 of file proceduralskytexturedata.cpp.
References emit, qFuzzyCompare(), sunAngleMin, and sunAngleMinChanged().
Definition at line 286 of file proceduralskytexturedata.cpp.
References emit, sunColor, and sunColorChanged().
|
slot |
Definition at line 336 of file proceduralskytexturedata.cpp.
References emit, qFuzzyCompare(), sunCurve, and sunCurveChanged().
|
slot |
Definition at line 346 of file proceduralskytexturedata.cpp.
References emit, qFuzzyCompare(), sunEnergy, and sunEnergyChanged().
|
slot |
Definition at line 296 of file proceduralskytexturedata.cpp.
References emit, qFuzzyCompare(), sunLatitude, and sunLatitudeChanged().
|
slot |
Definition at line 306 of file proceduralskytexturedata.cpp.
References emit, qFuzzyCompare(), sunLongitude, and sunLongitudeChanged().
|
slot |
Definition at line 356 of file proceduralskytexturedata.cpp.
References emit, textureQuality, and textureQualityChanged().
float ProceduralSkyTextureData::skyCurve | ( | ) | const |
Definition at line 136 of file proceduralskytexturedata.cpp.
|
signal |
float ProceduralSkyTextureData::skyEnergy | ( | ) | const |
Definition at line 141 of file proceduralskytexturedata.cpp.
|
signal |
QColor ProceduralSkyTextureData::skyHorizonColor | ( | ) | const |
Definition at line 131 of file proceduralskytexturedata.cpp.
QColor ProceduralSkyTextureData::skyTopColor | ( | ) | const |
Definition at line 126 of file proceduralskytexturedata.cpp.
float ProceduralSkyTextureData::sunAngleMax | ( | ) | const |
Definition at line 186 of file proceduralskytexturedata.cpp.
|
signal |
float ProceduralSkyTextureData::sunAngleMin | ( | ) | const |
Definition at line 181 of file proceduralskytexturedata.cpp.
|
signal |
QColor ProceduralSkyTextureData::sunColor | ( | ) | const |
Definition at line 166 of file proceduralskytexturedata.cpp.
float ProceduralSkyTextureData::sunCurve | ( | ) | const |
Definition at line 191 of file proceduralskytexturedata.cpp.
|
signal |
float ProceduralSkyTextureData::sunEnergy | ( | ) | const |
Definition at line 196 of file proceduralskytexturedata.cpp.
|
signal |
float ProceduralSkyTextureData::sunLatitude | ( | ) | const |
Definition at line 171 of file proceduralskytexturedata.cpp.
|
signal |
float ProceduralSkyTextureData::sunLongitude | ( | ) | const |
Definition at line 176 of file proceduralskytexturedata.cpp.
|
signal |
ProceduralSkyTextureData::SkyTextureQuality ProceduralSkyTextureData::textureQuality | ( | ) | const |
Definition at line 201 of file proceduralskytexturedata.cpp.
|
signal |
|
readwrite |
Definition at line 167 of file proceduralskytexturedata_p.h.
Referenced by setGroundBottomColor().
|
readwrite |
Definition at line 167 of file proceduralskytexturedata_p.h.
Referenced by setGroundCurve().
|
readwrite |
Definition at line 167 of file proceduralskytexturedata_p.h.
Referenced by setGroundEnergy().
|
readwrite |
Definition at line 167 of file proceduralskytexturedata_p.h.
Referenced by setGroundHorizonColor().
|
readwrite |
Definition at line 167 of file proceduralskytexturedata_p.h.
Referenced by setSkyCurve().
|
readwrite |
Definition at line 167 of file proceduralskytexturedata_p.h.
Referenced by setSkyEnergy().
|
readwrite |
Definition at line 167 of file proceduralskytexturedata_p.h.
Referenced by setSkyHorizonColor().
|
readwrite |
Definition at line 167 of file proceduralskytexturedata_p.h.
Referenced by setSkyTopColor().
|
readwrite |
Definition at line 167 of file proceduralskytexturedata_p.h.
Referenced by setSunAngleMax().
|
readwrite |
Definition at line 167 of file proceduralskytexturedata_p.h.
Referenced by setSunAngleMin().
|
readwrite |
Definition at line 167 of file proceduralskytexturedata_p.h.
Referenced by setSunColor().
|
readwrite |
Definition at line 167 of file proceduralskytexturedata_p.h.
Referenced by setSunCurve().
|
readwrite |
Definition at line 167 of file proceduralskytexturedata_p.h.
Referenced by setSunEnergy().
|
readwrite |
Definition at line 167 of file proceduralskytexturedata_p.h.
Referenced by setSunLatitude().
|
readwrite |
Definition at line 167 of file proceduralskytexturedata_p.h.
Referenced by setSunLongitude().
|
readwrite |
Definition at line 167 of file proceduralskytexturedata_p.h.
Referenced by setTextureQuality().