![]() |
Qt 6.x
The Qt SDK
|
#include <qquick3dtexture_p.h>
Public Types | |
enum | MappingMode { UV = 0 , Environment = 1 , LightProbe = 2 } |
enum | TilingMode { ClampToEdge = 1 , MirroredRepeat , Repeat } |
enum | Filter { None = 0 , Nearest , Linear } |
Signals | |
void | sourceChanged () |
void | sourceItemChanged () |
void | scaleUChanged () |
void | scaleVChanged () |
void | mappingModeChanged () |
void | horizontalTilingChanged () |
void | verticalTilingChanged () |
void | rotationUVChanged () |
void | positionUChanged () |
void | positionVChanged () |
void | pivotUChanged () |
void | pivotVChanged () |
void | flipUChanged () |
void | flipVChanged () |
void | indexUVChanged () |
void | magFilterChanged () |
void | minFilterChanged () |
void | mipFilterChanged () |
void | textureDataChanged () |
void | generateMipmapsChanged () |
void | autoOrientationChanged () |
![]() | |
void | parentChanged () |
void | childrenChanged () |
void | stateChanged () |
![]() | |
void | destroyed (QObject *=nullptr) |
This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked. | |
void | objectNameChanged (const QString &objectName, QPrivateSignal) |
This signal is emitted after the object's name has been changed. | |
Public Member Functions | |
QQuick3DTexture (QQuick3DObject *parent=nullptr) | |
\qmltype Texture \inherits Object3D \inqmlmodule QtQuick3D | |
~QQuick3DTexture () override | |
QUrl | source () const |
\qmlproperty url QtQuick3D::Texture::source | |
QQuickItem * | sourceItem () const |
\qmlproperty Item QtQuick3D::Texture::sourceItem | |
float | scaleU () const |
\qmlproperty float QtQuick3D::Texture::scaleU | |
float | scaleV () const |
\qmlproperty float QtQuick3D::Texture::scaleV | |
MappingMode | mappingMode () const |
\qmlproperty enumeration QtQuick3D::Texture::mappingMode | |
TilingMode | horizontalTiling () const |
\qmlproperty enumeration QtQuick3D::Texture::tilingModeHorizontal | |
TilingMode | verticalTiling () const |
\qmlproperty enumeration QtQuick3D::Texture::tilingModeVertical | |
float | rotationUV () const |
\qmlproperty float QtQuick3D::Texture::rotationUV | |
float | positionU () const |
\qmlproperty float QtQuick3D::Texture::positionU | |
float | positionV () const |
\qmlproperty float QtQuick3D::Texture::positionV | |
float | pivotU () const |
\qmlproperty float QtQuick3D::Texture::pivotU | |
float | pivotV () const |
\qmlproperty float QtQuick3D::Texture::pivotV | |
bool | flipU () const |
\qmlproperty bool QtQuick3D::Texture::flipU | |
bool | flipV () const |
\qmlproperty bool QtQuick3D::Texture::flipV | |
int | indexUV () const |
\qmlproperty int QtQuick3D::Texture::indexUV | |
Filter | magFilter () const |
\qmlproperty enumeration QtQuick3D::Texture::magFilter | |
Filter | minFilter () const |
\qmlproperty enumeration QtQuick3D::Texture::minFilter | |
Filter | mipFilter () const |
\qmlproperty enumeration QtQuick3D::Texture::mipFilter | |
QQuick3DTextureData * | textureData () const |
\qmlproperty TextureData QtQuick3D::Texture::textureData | |
bool | generateMipmaps () const |
\qmlproperty bool QtQuick3D::Texture::generateMipmaps | |
bool | autoOrientation () const |
\qmlproperty bool QtQuick3D::Texture::autoOrientation | |
QSSGRenderImage * | getRenderImage () |
![]() | |
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. | |
![]() | |
virtual | ~QQuickItemChangeListener () |
virtual void | itemGeometryChanged (QQuickItem *, QQuickGeometryChange, const QRectF &) |
virtual void | itemSiblingOrderChanged (QQuickItem *) |
virtual void | itemVisibilityChanged (QQuickItem *) |
virtual void | itemEnabledChanged (QQuickItem *) |
virtual void | itemOpacityChanged (QQuickItem *) |
virtual void | itemDestroyed (QQuickItem *) |
virtual void | itemChildAdded (QQuickItem *, QQuickItem *) |
virtual void | itemChildRemoved (QQuickItem *, QQuickItem *) |
virtual void | itemParentChanged (QQuickItem *, QQuickItem *) |
virtual void | itemRotationChanged (QQuickItem *) |
virtual void | itemImplicitWidthChanged (QQuickItem *) |
virtual void | itemImplicitHeightChanged (QQuickItem *) |
virtual void | itemFocusChanged (QQuickItem *, Qt::FocusReason) |
virtual QQuickAnchorsPrivate * | anchorPrivate () |
Protected Member Functions | |
QSSGRenderGraphObject * | updateSpatialNode (QSSGRenderGraphObject *node) override |
void | markAllDirty () override |
void | itemChange (ItemChange change, const ItemChangeData &value) override |
void | itemGeometryChanged (QQuickItem *item, QQuickGeometryChange change, const QRectF &geometry) override |
QQuick3DTexture (QQuick3DObjectPrivate &dd, QQuick3DObject *parent=nullptr) | |
![]() | |
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) | |
Properties | |
QUrl | source |
QQuickItem * | sourceItem |
QQuick3DTextureData * | textureData |
float | scaleU |
float | scaleV |
MappingMode | mappingMode |
TilingMode | tilingModeHorizontal |
TilingMode | tilingModeVertical |
float | rotationUV |
float | positionU |
float | positionV |
float | pivotU |
float | pivotV |
bool | flipU |
bool | flipV |
int | indexUV |
Filter | magFilter |
Filter | minFilter |
Filter | mipFilter |
bool | generateMipmaps |
bool | autoOrientation |
![]() | |
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) |
![]() | |
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 31 of file qquick3dtexture_p.h.
Enumerator | |
---|---|
None | |
Nearest | |
Linear |
Definition at line 75 of file qquick3dtexture_p.h.
Enumerator | |
---|---|
UV | |
Environment | |
LightProbe |
Definition at line 59 of file qquick3dtexture_p.h.
Enumerator | |
---|---|
ClampToEdge | |
MirroredRepeat | |
Repeat |
Definition at line 67 of file qquick3dtexture_p.h.
|
explicit |
\qmltype Texture \inherits Object3D \inqmlmodule QtQuick3D
Defines a texture for use in 3D scenes.
A texture is technically any array of pixels (1D, 2D or 3D) and its related settings, such as minification and magnification filters, scaling and UV transformations.
The Texture type in Qt Quick 3D represents a two-dimensional image. Its use is typically to map onto / wrap around three-dimensional geometry to emulate additional detail which cannot be efficiently modelled in 3D. It can also be used to emulate other lighting effects, such as reflections.
While Texture itself always represents a 2D texture, other kinds of textures are available as well via subclasses of Texture. For example, to create a cube map texture with 6 faces, use the \l CubeMapTexture type.
When the geometry is being rendered, each location on its surface will be transformed to a corresponding location in the texture by transforming and interpolating the UV coordinates (texture coordinate) that have been set for the mesh's vertexes. The fragment shader program that is being used to render the active material will then typically sample the material's texture(s) at the given coordinates and use the sampled data in its light calculations.
Texture objects can source image data from: \list
The following example maps the image "madewithqt.png" onto the default sphere mesh, and scales the UV coordinates to tile the image on the sphere surface. \qml Model { source: "#Sphere" materials: [ PrincipledMaterial { baseColorMap: Texture { source: "madewithqt.png" scaleU: 4.0 scaleV: 4.0 } } ] } \endqml
The result looks as follows: \table \header
Definition at line 90 of file qquick3dtexture.cpp.
|
override |
Definition at line 106 of file qquick3dtexture.cpp.
References QObject::deleteLater(), QQuickItemPrivate::Geometry, QQuickItemPrivate::get(), QQuick3DSceneManager::qsgDynamicTextures, and QQuickItemPrivate::removeItemChangeListener().
|
explicitprotected |
Definition at line 95 of file qquick3dtexture.cpp.
References QMetaMethod::isValid(), metaObject(), mo, and qWarning.
bool QQuick3DTexture::autoOrientation | ( | ) | const |
\qmlproperty bool QtQuick3D::Texture::autoOrientation
This property determines if a texture transformation, such as flipping the V texture coordinate, is applied automatically for textures where this is typically relevant.
By default, this property is set to true.
Certain type of texture data, such as compressed textures loaded via the \l source property from a .ktx or .pkm file, or textures generated by rendering a Qt Quick scene via the \l sourceItem property, often have a different Y axis orientation when compared to textures loaded from image files, such as, .png or .jpg. Therefore, such a Texture would appear "upside down" compared to a Texture with its source set to a regular image file. To remedy this, any qualifying Texture gets an implicit UV transformation as if the flipV property was set to true. If this is not desired, set this property to false.
Definition at line 628 of file qquick3dtexture.cpp.
|
signal |
bool QQuick3DTexture::flipU | ( | ) | const |
\qmlproperty bool QtQuick3D::Texture::flipU
This property sets the use of the horizontally flipped texture coordinates.
The default is false.
Definition at line 452 of file qquick3dtexture.cpp.
|
signal |
bool QQuick3DTexture::flipV | ( | ) | const |
\qmlproperty bool QtQuick3D::Texture::flipV
This property sets the use of the vertically flipped texture coordinates.
The default is false.
Definition at line 473 of file qquick3dtexture.cpp.
|
signal |
bool QQuick3DTexture::generateMipmaps | ( | ) | const |
\qmlproperty bool QtQuick3D::Texture::generateMipmaps
This property determines if mipmaps are generated for textures that do not provide mipmap levels themselves. Using mipmaps along with mip filtering gives better visual quality when viewing textures at a distance compared rendering without them, but it may come at a performance cost (both when initializing the image and during rendering).
By default, this property is set to false.
Definition at line 592 of file qquick3dtexture.cpp.
|
signal |
QSSGRenderImage * QQuick3DTexture::getRenderImage | ( | ) |
Definition at line 1391 of file qquick3dtexture.cpp.
References QQuick3DObjectPrivate::get().
Referenced by QQuick3DRenderLayerHelpers::updateLayerNodeHelper(), QQuick3DParticleSpriteParticle::updateParticleNode(), QQuick3DDefaultMaterial::updateSpatialNode(), QQuick3DEffect::updateSpatialNode(), QQuick3DMaterial::updateSpatialNode(), QQuick3DPrincipledMaterial::updateSpatialNode(), QQuick3DReflectionProbe::updateSpatialNode(), and QQuick3DSpecularGlossyMaterial::updateSpatialNode().
QQuick3DTexture::TilingMode QQuick3DTexture::horizontalTiling | ( | ) | const |
\qmlproperty enumeration QtQuick3D::Texture::tilingModeHorizontal
Controls how the texture is mapped when the U scaling value is greater than 1.
By default, this property is set to {Texture.Repeat}.
\value Texture.ClampToEdge Texture is not tiled, but the value on the edge is used instead. \value Texture.MirroredRepeat Texture is repeated and mirrored over the X axis. \value Texture.Repeat Texture is repeated over the X axis.
Definition at line 300 of file qquick3dtexture.cpp.
Referenced by QQuick3DEffect::updateSpatialNode().
|
signal |
int QQuick3DTexture::indexUV | ( | ) | const |
\qmlproperty int QtQuick3D::Texture::indexUV
This property sets the UV coordinate index used by this texture. Since QtQuick3D supports 2 UV sets(0 or 1) for now, the value will be saturated to the range.
The default is 0.
Definition at line 487 of file qquick3dtexture.cpp.
|
signal |
|
overrideprotectedvirtual |
Reimplemented from QQuick3DObject.
Definition at line 1302 of file qquick3dtexture.cpp.
References QObject::connect(), QQuick3DObjectPrivate::derefSceneManager(), disconnect(), QQuick3DObjectPrivate::get(), QQuickItemPrivate::get(), QQuick3DObject::itemChange(), Q_ASSERT, QQuick3DSceneManager::qsgDynamicTextures, QQuick3DObjectPrivate::refSceneManager(), QQuickItemPrivate::refWindow(), QQuickItem::window(), and QQuick3DSceneManager::windowChanged().
|
overrideprotectedvirtual |
Reimplemented from QQuickItemChangeListener.
Definition at line 1358 of file qquick3dtexture.cpp.
References item, Q_ASSERT, Q_UNUSED, QQuickGeometryChange::sizeChange(), and QQuick3DObject::update().
QQuick3DTexture::Filter QQuick3DTexture::magFilter | ( | ) | const |
\qmlproperty enumeration QtQuick3D::Texture::magFilter
This property determines how the texture is sampled when a texel covers more than one pixel.
The default value is {Texture.Linear}.
\value Texture.Nearest uses the value of the closest texel. \value Texture.Linear takes the four closest texels and bilinearly interpolates them.
Texture.None
here will default to Texture.Linear
instead.Definition at line 507 of file qquick3dtexture.cpp.
|
signal |
QQuick3DTexture::MappingMode QQuick3DTexture::mappingMode | ( | ) | const |
\qmlproperty enumeration QtQuick3D::Texture::mappingMode
This property defines which method of mapping to use when sampling this texture.
\value Texture.UV The default value. Suitable for base color, diffuse, opacity, and most other texture maps. Performs standard UV mapping. The same portion of the image will always appear on the same vertex, unless the UV coordinates are transformed and animated.
\value Texture.Environment Used for \l{PrincipledMaterial::specularReflectionMap}{specular reflection}, this causes the image to be projected onto the material as though it was being reflected. Using this mode for other type of texture maps provides a mirror effect.
\value Texture.LightProbe The default for HDRI sphere maps used by light probes. This mode does not need to be manually set for Texture objects associated with the \l{SceneEnvironment::lightProbe}{lightProbe} property, because it is implied automatically.
Definition at line 282 of file qquick3dtexture.cpp.
|
signal |
|
overrideprotectedvirtual |
Reimplemented from QQuick3DObject.
Definition at line 1397 of file qquick3dtexture.cpp.
References QQuick3DObject::markAllDirty().
Referenced by updateSpatialNode().
QQuick3DTexture::Filter QQuick3DTexture::minFilter | ( | ) | const |
\qmlproperty enumeration QtQuick3D::Texture::minFilter
This property determines how the texture is sampled when a texel covers more than one pixel.
The default value is {Texture.Linear}.
\value Texture.Nearest uses the value of the closest texel. \value Texture.Linear takes the four closest texels and bilinearly interpolates them.
Texture.None
here will default to Texture.Linear
instead.Definition at line 527 of file qquick3dtexture.cpp.
|
signal |
QQuick3DTexture::Filter QQuick3DTexture::mipFilter | ( | ) | const |
\qmlproperty enumeration QtQuick3D::Texture::mipFilter
This property determines how the texture mipmaps are sampled when a texel covers less than one pixel.
The default value is {Texture.None}.
\value Texture.None disables the usage of mipmap sampling. \value Texture.Nearest uses mipmapping and samples the value of the closest texel. \value Texture.Linear uses mipmapping and interpolates between multiple texel values.
Definition at line 548 of file qquick3dtexture.cpp.
|
signal |
float QQuick3DTexture::pivotU | ( | ) | const |
\qmlproperty float QtQuick3D::Texture::pivotU
This property sets the pivot U position which is used when applying a \l{QtQuick3D::Texture::rotationUV}{rotationUV}.
The default is 0.0.
Definition at line 409 of file qquick3dtexture.cpp.
|
signal |
float QQuick3DTexture::pivotV | ( | ) | const |
\qmlproperty float QtQuick3D::Texture::pivotV
This property sets the pivot V position which is used when applying a \l{QtQuick3D::Texture::rotationUV}{rotationUV}.
The default is 0.0.
Definition at line 431 of file qquick3dtexture.cpp.
|
signal |
float QQuick3DTexture::positionU | ( | ) | const |
\qmlproperty float QtQuick3D::Texture::positionU
This property offsets the U coordinate mapping from left to right.
The default is 0.0.
Definition at line 362 of file qquick3dtexture.cpp.
|
signal |
float QQuick3DTexture::positionV | ( | ) | const |
\qmlproperty float QtQuick3D::Texture::positionV
This property offsets the V coordinate mapping from bottom to top.
The default is 0.0.
{(0, 0)} is therefore referring to the bottom-left corner of the image data.Definition at line 387 of file qquick3dtexture.cpp.
|
signal |
float QQuick3DTexture::rotationUV | ( | ) | const |
\qmlproperty float QtQuick3D::Texture::rotationUV
This property rotates the texture around the pivot point. This is defined using euler angles and for a positive value rotation is clockwise.
The default is 0.0.
Definition at line 341 of file qquick3dtexture.cpp.
|
signal |
float QQuick3DTexture::scaleU | ( | ) | const |
\qmlproperty float QtQuick3D::Texture::scaleU
This property defines how to scale the U texture coordinate when mapping to a mesh's UV coordinates.
Scaling the U value when using horizontal tiling will define how many times the texture is repeated from left to right.
The default is 1.0.
Definition at line 230 of file qquick3dtexture.cpp.
|
signal |
float QQuick3DTexture::scaleV | ( | ) | const |
\qmlproperty float QtQuick3D::Texture::scaleV
This property defines how to scale the V texture coordinate when mapping to a mesh's UV coordinates.
Scaling the V value when using vertical tiling will define how many times a texture is repeated from bottom to top.
The default is 1.0.
Definition at line 255 of file qquick3dtexture.cpp.
|
signal |
|
slot |
Definition at line 909 of file qquick3dtexture.cpp.
References autoOrientation, autoOrientationChanged(), emit, and QQuick3DObject::update().
|
slot |
Definition at line 833 of file qquick3dtexture.cpp.
References emit, flipU, flipUChanged(), and QQuick3DObject::update().
|
slot |
Definition at line 844 of file qquick3dtexture.cpp.
References emit, flipV, flipVChanged(), and QQuick3DObject::update().
|
slot |
Definition at line 898 of file qquick3dtexture.cpp.
References emit, generateMipmaps, generateMipmapsChanged(), and QQuick3DObject::update().
Referenced by setTextureProperties().
|
slot |
Definition at line 758 of file qquick3dtexture.cpp.
References emit, horizontalTilingChanged(), tilingModeHorizontal, and QQuick3DObject::update().
Referenced by setTextureProperties().
|
slot |
Definition at line 855 of file qquick3dtexture.cpp.
References emit, indexUV, indexUVChanged(), and QQuick3DObject::update().
Referenced by setTextureProperties().
|
slot |
Definition at line 920 of file qquick3dtexture.cpp.
References emit, magFilter, magFilterChanged(), and QQuick3DObject::update().
Referenced by setTextureProperties().
|
slot |
Definition at line 748 of file qquick3dtexture.cpp.
References emit, mappingMode, mappingModeChanged(), and QQuick3DObject::update().
Referenced by setTextureProperties().
|
slot |
Definition at line 931 of file qquick3dtexture.cpp.
References emit, minFilter, minFilterChanged(), and QQuick3DObject::update().
Referenced by setTextureProperties().
|
slot |
Definition at line 942 of file qquick3dtexture.cpp.
References emit, mipFilter, mipFilterChanged(), and QQuick3DObject::update().
Referenced by setTextureProperties().
|
slot |
Definition at line 811 of file qquick3dtexture.cpp.
References emit, pivotU, pivotUChanged(), qFuzzyCompare(), and QQuick3DObject::update().
|
slot |
Definition at line 822 of file qquick3dtexture.cpp.
References emit, pivotV, pivotVChanged(), qFuzzyCompare(), and QQuick3DObject::update().
Referenced by setTextureProperties().
|
slot |
Definition at line 789 of file qquick3dtexture.cpp.
References emit, positionU, positionUChanged(), qFuzzyCompare(), and QQuick3DObject::update().
Referenced by setTextureProperties().
|
slot |
Definition at line 800 of file qquick3dtexture.cpp.
References emit, positionV, positionVChanged(), qFuzzyCompare(), and QQuick3DObject::update().
Referenced by setTextureProperties().
|
slot |
Definition at line 778 of file qquick3dtexture.cpp.
References emit, qFuzzyCompare(), rotationUV, rotationUVChanged(), and QQuick3DObject::update().
Referenced by setTextureProperties().
|
slot |
Definition at line 726 of file qquick3dtexture.cpp.
References emit, qFuzzyCompare(), scaleU, scaleUChanged(), and QQuick3DObject::update().
Referenced by setTextureProperties().
|
slot |
Definition at line 737 of file qquick3dtexture.cpp.
References emit, qFuzzyCompare(), scaleV, scaleVChanged(), and QQuick3DObject::update().
Referenced by setTextureProperties().
Definition at line 633 of file qquick3dtexture.cpp.
References emit, source, sourceChanged(), and QQuick3DObject::update().
Referenced by setMaterialProperties().
|
slot |
Definition at line 677 of file qquick3dtexture.cpp.
References QQuickItemPrivate::addItemChangeListener(), QObject::connect(), QQuickItemPrivate::derefFromEffectItem(), QObject::destroyed(), disconnect(), emit, QQuickItemPrivate::ensureSubsceneDeliveryAgent(), QQuickItemPrivate::Geometry, QQuick3DObjectPrivate::get(), QQuickItemPrivate::get(), hide(), manager, QQuickItemPrivate::removeItemChangeListener(), QQuick3DObjectPrivate::sceneManager, QQuickItem::setParentItem(), SIGNAL, SLOT, sourceItem, sourceItemChanged(), and QQuick3DObject::update().
|
slot |
Definition at line 872 of file qquick3dtexture.cpp.
References QQuick3DObjectPrivate::attachWatcher(), QObject::connect(), QObject::disconnect(), emit, setTextureData(), textureData, textureDataChanged(), QQuick3DTextureData::textureDataNodeDirty(), and QQuick3DObject::update().
Referenced by setMaterialProperties(), and setTextureData().
|
slot |
Definition at line 768 of file qquick3dtexture.cpp.
References emit, tilingModeVertical, QQuick3DObject::update(), and verticalTilingChanged().
Referenced by setTextureProperties().
QUrl QQuick3DTexture::source | ( | ) | const |
\qmlproperty url QtQuick3D::Texture::source
This property holds the location of an image or texture file containing the data used by the texture.
The property is a URL, with the same rules as other source properties, such as \l{Image::source}{Image.source}. With Texture, only the qrc
and file
schemes are supported. When no scheme is present and the value is a relative path, it is assumed to be relative to the component's (i.e. the {.qml} file's) location.
The source file can have any conventional image file format \l{QImageReader::supportedImageFormats()}{supported by Qt}. In addition, Texture supports the same \l [QtQuick]{Compressed Texture Files}{compressed texture file types} as QtQuick::Image.
Definition at line 156 of file qquick3dtexture.cpp.
|
signal |
QQuickItem * QQuick3DTexture::sourceItem | ( | ) | const |
\qmlproperty Item QtQuick3D::Texture::sourceItem
This property defines a Item to be used as the source of the texture. Using this property allows any 2D Qt Quick content to be used as a texture source by rendering that item as an offscreen layer.
If the item is a \l{QQuickItem::textureProvider()}{texture provider}, no additional texture is used.
If this property is set, then the value of \l source will be ignored. A Texture should use one method to provide image data, and set only one of source, \l sourceItem, or \l textureData.
basic
render loop of Qt Quick is used instead of the default threaded
one. See \l{Qt Quick Scene Graph} on more information about the Qt Quick render loops.Definition at line 205 of file qquick3dtexture.cpp.
|
signal |
QQuick3DTextureData * QQuick3DTexture::textureData | ( | ) | const |
\qmlproperty TextureData QtQuick3D::Texture::textureData
This property holds a reference to a \l TextureData component which defines the contents and properties of raw texture data.
If this property is used, then the value of \l source will be ignored. A Texture should use one method to provide image data, and set only one of source, \l sourceItem, or \l textureData.
Definition at line 566 of file qquick3dtexture.cpp.
|
signal |
|
overrideprotectedvirtual |
Reimplemented from QQuick3DObject.
Definition at line 1020 of file qquick3dtexture.cpp.
References Qt::AutoConnection, QObject::connect(), context, QSGContext::createLayer(), QThread::currentThread(), QObject::destroyed(), Qt::DirectConnection, QSSGRenderImage::Dirty, disconnect(), QQuick3DObjectPrivate::get(), QQuickItemPrivate::get(), QRectF::height(), QSize::height(), QQuickItem::height, if(), QMetaMethod::invoke(), QUrl::isEmpty(), QSSGRenderImage::m_flags, QSSGRenderImage::m_flipU, QSSGRenderImage::m_generateMipmaps, QSSGRenderImage::m_horizontalTilingMode, QSSGRenderImage::m_imagePath, QSSGRenderImage::m_indexUV, QSSGRenderImage::m_magFilterType, QSSGRenderImage::m_mappingMode, QSSGRenderImage::m_minFilterType, QSSGRenderImage::m_mipFilterType, QSSGRenderImage::m_pivot, QSSGRenderImage::m_position, QSSGRenderImage::m_qsgTexture, QSSGRenderImage::m_rawTextureData, QSSGRenderImage::m_rotation, QSSGRenderImage::m_scale, QSSGRenderImage::m_verticalTilingMode, manager, markAllDirty(), minTextureSize, Q_ASSERT, qAbs(), qCeil(), qFuzzyIsNull(), qmlContext(), qUpdateIfNeeded(), qWarning, QQuickItemPrivate::refWindow(), resolveImagePath(), QSize::rheight(), QSize::rwidth(), QSGRenderContext::sceneGraphContext(), QQuickItemPrivate::sceneGraphRenderContext(), QQuick3DObjectPrivate::sceneManager, QRectF::setHeight(), QSGLayer::setItem(), QRectF::setWidth(), SIGNAL, QQuickItem::size(), SLOT, sourceItem, QQuick3DObjectPrivate::spatialNode, QSGTextureProvider::textureChanged(), QQuickItem::textureProvider(), QObject::thread(), QSSGRenderImage::TransformDirty, QQuick3DObject::update(), QQuick3DObject::updateSpatialNode(), QSGDynamicTexture::updateTexture(), QRectF::width(), QSize::width(), QQuickItem::width, window(), QQuickItem::window(), QQuickItemPrivate::window, and QQuick3DSceneManager::window().
QQuick3DTexture::TilingMode QQuick3DTexture::verticalTiling | ( | ) | const |
\qmlproperty enumeration QtQuick3D::Texture::tilingModeVertical
This property controls how the texture is mapped when the V scaling value is greater than 1.
By default, this property is set to {Texture.Repeat}.
\value Texture.ClampToEdge Texture is not tiled, but the value on the edge is used instead. \value Texture.MirroredRepeat Texture is repeated and mirrored over the Y axis. \value Texture.Repeat Texture is repeated over the Y axis.
Definition at line 319 of file qquick3dtexture.cpp.
Referenced by QQuick3DEffect::updateSpatialNode().
|
signal |
|
readwrite |
Definition at line 221 of file qquick3dtexture_p.h.
Referenced by setAutoOrientation().
|
readwrite |
Definition at line 221 of file qquick3dtexture_p.h.
Referenced by setFlipU().
|
readwrite |
Definition at line 221 of file qquick3dtexture_p.h.
Referenced by setFlipV().
|
readwrite |
Definition at line 221 of file qquick3dtexture_p.h.
Referenced by setGenerateMipmaps(), and QQuick3DEffect::updateSpatialNode().
|
readwrite |
Definition at line 221 of file qquick3dtexture_p.h.
Referenced by setIndexUV().
|
readwrite |
Definition at line 221 of file qquick3dtexture_p.h.
Referenced by setMagFilter(), and QQuick3DEffect::updateSpatialNode().
|
readwrite |
Definition at line 221 of file qquick3dtexture_p.h.
Referenced by setMappingMode().
|
readwrite |
Definition at line 221 of file qquick3dtexture_p.h.
Referenced by setMinFilter(), and QQuick3DEffect::updateSpatialNode().
|
readwrite |
Definition at line 221 of file qquick3dtexture_p.h.
Referenced by setMipFilter(), and QQuick3DEffect::updateSpatialNode().
|
readwrite |
Definition at line 221 of file qquick3dtexture_p.h.
Referenced by setPivotU().
|
readwrite |
Definition at line 221 of file qquick3dtexture_p.h.
Referenced by setPivotV().
|
readwrite |
Definition at line 221 of file qquick3dtexture_p.h.
Referenced by setPositionU().
|
readwrite |
Definition at line 221 of file qquick3dtexture_p.h.
Referenced by setPositionV().
|
readwrite |
Definition at line 221 of file qquick3dtexture_p.h.
Referenced by setRotationUV().
|
readwrite |
Definition at line 221 of file qquick3dtexture_p.h.
Referenced by setScaleU().
|
readwrite |
Definition at line 221 of file qquick3dtexture_p.h.
Referenced by setScaleV().
|
readwrite |
Definition at line 221 of file qquick3dtexture_p.h.
Referenced by setSource().
|
readwrite |
Definition at line 221 of file qquick3dtexture_p.h.
Referenced by setSourceItem(), and updateSpatialNode().
|
readwrite |
Definition at line 221 of file qquick3dtexture_p.h.
Referenced by setTextureData(), and QQuick3DCustomMaterial::updateSpatialNode().
|
readwrite |
Definition at line 221 of file qquick3dtexture_p.h.
Referenced by setHorizontalTiling().
|
readwrite |
Definition at line 221 of file qquick3dtexture_p.h.
Referenced by setVerticalTiling().