Searching QPainter but for 3D purpose (lines in 3D)
-
@MaelleT A rectangle in 3D is a cube right? 😄 Is this what you’re looking for? https://doc.qt.io/qt-5/qt3dextras-qcuboidmesh.html
Or perhaps other building blocks like https://doc.qt.io/qt-5/qvector3d.html#details ?
-
-
@MaelleT Yeah I saw the change 😉 If you want you can pursue the Qt3D framework a bit and see if it fits your requirements. I saw one question earlier similar to yours: https://stackoverflow.com/questions/38067867/how-do-i-draw-a-simple-line-in-qt3d.
But it doesn’t really give you a simple answer.
Is it really lines in 3D you want? Or is it 3D coordinates projected to a 2D plane? If it’s the latter you can “just” project the points you have in the 3D world to 2D coordinates then use Qpainter as usual to draw the lines between the coordinates.
I have a rough example here if you want to have a quick look:
https://github.com/tobiasmarciszko/effect-playground/blob/master/projection.cpp