Texture QML Type

Defines a texture for use in 3D scenes. More...

Import Statement: import QtQuick3D 1.0
Inherits:

Object3D

Properties

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.

ConstantDescription
Texture.UVThe 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.EnvironmentThe 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.LightProbeThe 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.

See also pivotU and pivotV.


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.

ConstantDescription
Texture.ClampToEdgeTexture is not tiled, but the value on the edge is used instead.
Texture.MirroredRepeatTexture is repeated and mirrored over the X axis.
Texture.RepeatTexture 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.

ConstantDescription
Texture.ClampToEdgeTexture is not tiled, but the value on the edge is used instead.
Texture.MirroredRepeatTexture is repeated and mirrored over the Y axis.
Texture.RepeatTexture is repeated over the Y axis.

See also scaleV.


© 2020 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.