[Interest] Rendering simple QPainterPath with Qt3D

Ch'Gans chgans at gna.org
Mon Mar 14 04:50:32 CET 2016


Hi there,

I have an application that use heavily the Qt graphics view framework,
where each item represent a flat, solid object on a layer of material.
They all have a "simple" shape, that is they only use line and arcs
and have no windings/overlaps. Items represents a deposit of material
or a material cut-off.
The application uses several QGraphicsScene to manage items on a set
of "material layers", that are (in the real physical world) stacked on
top of each other to form a sort of sandwich.

I would like to have a 3D view of my "stack of 2D layers" world by
simply extruding vertically all my items by the thickness of the layer
they belong to, and displaying all the stacked layers in 3D.

I had a look at Qt 3D source code, especially the classes derived from
QMesh and QGeometry (Cuboid, Cylinder, Sphere, ...). And of course had
a look at all the Qt3D example.

By the look of it, it seems to me that I should create a custom
QMesh/QGeometry to render in 3D all my 2D items. I haven't try to code
anything, I'm just trying to see what could be done and what would be
the right approach.

Could anyone shed some light on how I could achieve this, like is the
custom QMEsh/Geometry the right approach for this kind of problems?

Note: I've never used the Qt 3D framegraph, and I'm not very familiar
with OpenGL

Thanks,
Chris



More information about the Interest mailing list