Texture QML Type
Defines a texture for use in 3D scenes. More...
Import Statement: | import QtQuick3D 1.14 |
Inherits: |
Properties
- flipV : bool
- mappingMode : enumeration
- pivotU : float
- pivotV : float
- positionU : float
- positionV : float
- rotationUV : float
- scaleU : float
- scaleV : float
- source : url
- sourceItem : Item
- tilingModeHorizontal : enumeration
- tilingModeVertical : enumeration
Detailed Description
Texture defines an image and how it is mapped to meshes in a 3d scene.
Texture components can use image data either from a file using the source property, or a Qt Quick item using the sourceItem property.
Property Documentation
flipV : bool
This property sets the use of the vertically flipped coordinates.
mappingMode : enumeration
This property defines which method of mapping to use when sampling this texture.
Constant | Description |
---|---|
Texture.UV |
The default for diffuse and opacity maps, this causes the image to be stuck to the mesh. The same portion of the image will always appear on the same vertex (unless the UV properties are animated). |
Texture.Environment |
The default for specular reflection, this causes the image to be ‘projected’ onto the material as though it is being reflected. Using Environmental Mapping for diffuse maps provides a mirror effect. |
Texture.LightProbe |
The default for HDRI sphere maps used by light probes. |
pivotU : float
This property sets the pivot U position.
See also rotationUV.
pivotV : float
This property sets the pivot V position.
See also rotationUV.
positionU : float
This property offsets the U coordinate mapping from left to right.
positionV : float
This property offsets the V coordinate mapping from bottom to top.
rotationUV : float
This property rotates the texture around the pivot point. This is defined using euler angles and for a positve value rotation is clockwise.
scaleU : float
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.
See also tilingModeHorizontal.
scaleV : float
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.
See also tilingModeVertical.
source : url
This property holds the location of an image file containing the data used by the texture.
See also sourceItem.
sourceItem : Item
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 renderind that item as an offscreen layer.
If this property is used, then the value of source will be ignored.
Note: Currently there is no way to forward input events to the Item used as a texture source.
See also source.
tilingModeHorizontal : enumeration
Controls how the texture is mapped when the U scaling value is greater than 1.
Constant | Description |
---|---|
Texture.ClampToEdge |
Texture is not tiled, but the value on the edge is used instead. |
Texture.MirroredRepeat |
Texture is repeated and mirrored over the X axis. |
Texture.Repeat |
Texture is repeated over the X axis. |
See also scaleU.
tilingModeVertical : enumeration
This property controls how the texture is mapped when the V scaling value is greater than 1.
Constant | Description |
---|---|
Texture.ClampToEdge |
Texture is not tiled, but the value on the edge is used instead. |
Texture.MirroredRepeat |
Texture is repeated and mirrored over the Y axis. |
Texture.Repeat |
Texture is repeated over the Y axis. |
See also scaleV.
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-5.14/qml-qtquick3d-texture.html