[Interest] Qt3D: Mesh, buffer and tangent

Ch'Gans chgans at gna.org
Tue Apr 11 00:46:24 CEST 2017


Hi there,

I'm writing some code to display 2D polygons as 3D polygonal plates,
my input being a 2D triangulated polygon.
As i'm pretty new to 3D/OpenGL, I had a look first at how the plane,
cylinder, cuboid, cone, and torus are doing this (from Qt3DExtra). I
can successfully display my polygonal plates and I think i got it
right.

But I have a question concerning the tangent attributes in the
Qt3DExtra geometry source code:
Could someone briefly explain (or points to online resources) why the
plane, the cuboid,  the sphere and the torus geometries use 4 floats
for the tangents (x, y, z, w),  but the cylinder and cone use none?
I have read some online tutorial on OpenGL (helpful to understand
where these QBuffer and QAttribute come from), and quite often they
refer to tangent and bitangent, both of them being Vector3D.
Again why the difference with Qt3D? Are they different use-cases where
i should use one or the other?

Thanks,
Chris



More information about the Interest mailing list