简体   繁体   中英

How to add 2D surface to a QML Scatter3D

I want to add a 2D surface of a static image to a 3DScatter graph as shown below.

在此处输入图像描述

I can achieve this using QCustom3DVolume . However my app uses OpenGL ES and QCustom3DVolume's documentation explicitly says that it does not support OpenGL ES environments.

I have also tried creating a simple cubic obj mesh file, load it using QCustom3DItem and set its textureFile property to my desired image. However there seems to be no way to scale the texture image to fit the item size as shown below.

在此处输入图像描述

original image:

在此处输入图像描述

mesh file:

# WaveFront *.obj file (generated by Autodesk ATF)

mtllib 5eb607c1-f53f-4cb4-b0b6-7d334249fcd3.mtl

g Body1

v 0.000000 0.000000 0.000000
v 0.000000 -1.000000 0.000000
v 0.000000 -1.000000 1.000000
v 0.000000 0.000000 1.000000
v 1.000000 0.000000 0.000000
v 1.000000 0.000000 1.000000
v 1.000000 -1.000000 0.000000
v 1.000000 -1.000000 1.000000
vt -0.000000 0.000000 0.000000
vt 0.100000 0.000000 0.000000
vt -0.000000 0.100000 0.000000
vt 0.100000 0.100000 0.000000
vt -0.000000 0.000000 0.000000
vt 0.100000 0.000000 0.000000
vt -0.000000 0.100000 0.000000
vt 0.100000 0.100000 0.000000
vt 0.000000 0.000000 0.000000
vt 0.100000 0.000000 0.000000
vt 0.000000 0.100000 0.000000
vt 0.100000 0.100000 0.000000
vt 0.000000 0.000000 0.000000
vt 0.100000 0.000000 0.000000
vt 0.000000 0.100000 0.000000
vt 0.100000 0.100000 0.000000
vt -0.050000 -0.050000 0.000000
vt 0.050000 -0.050000 0.000000
vt -0.050000 0.050000 0.000000
vt 0.050000 0.050000 0.000000
vt -0.050000 -0.050000 0.000000
vt 0.050000 -0.050000 0.000000
vt -0.050000 0.050000 0.000000
vt 0.050000 0.050000 0.000000
vn -0.100000 0.000000 0.000000
vn -0.100000 0.000000 0.000000
vn -0.100000 0.000000 0.000000
vn -0.100000 0.000000 0.000000
vn 0.000000 0.100000 0.000000
vn 0.000000 0.100000 0.000000
vn 0.000000 0.100000 0.000000
vn 0.000000 0.100000 0.000000
vn 0.100000 0.000000 0.000000
vn 0.100000 0.000000 0.000000
vn 0.100000 0.000000 0.000000
vn 0.100000 0.000000 0.000000
vn -0.000000 -0.100000 0.000000
vn -0.000000 -0.100000 0.000000
vn -0.000000 -0.100000 0.000000
vn -0.000000 -0.100000 0.000000
vn 0.000000 0.000000 0.100000
vn 0.000000 0.000000 0.100000
vn 0.000000 0.000000 0.100000
vn 0.000000 0.000000 0.100000
vn -0.000000 0.000000 -0.100000
vn -0.000000 0.000000 -0.100000
vn -0.000000 0.000000 -0.100000
vn -0.000000 0.000000 -0.100000
usemtl Steel_-_Satin
f 1/1/1 2/2/2 4/3/3
f 4/3/3 2/2/2 3/4/4
f 5/5/5 1/6/6 6/7/7
f 6/7/7 1/6/6 4/8/8
f 7/9/9 5/10/10 8/11/11
f 8/11/11 5/10/10 6/12/12
f 2/13/13 7/14/14 3/15/15
f 3/15/15 7/14/14 8/16/16
f 3/17/17 8/18/18 4/19/19
f 4/19/19 8/18/18 6/20/20
f 7/21/21 2/22/22 5/23/23
f 5/23/23 2/22/22 1/24/24

# 8 vertices
# 24 texture params
# 24 normals
# 12 facets

# 1 groups

Is there any other way to achieve this?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM