I got arbitrary solid QMesh on my screen using examples. It's great. But I can to do nothing with it. mesh->children().count = 0, mesh->primitiveCount=0, mesh->geometry()=0 and so on. How to obtain internal contents of QMesh? Can I change QMesh vertices (geometry) programmatically, on the fly? The "setSource()" does not seems sufficient for all occasions.
Asked
Active
Viewed 1,675 times
1 Answers
0
Qt3DCore::QEntity * meshEntity = new Qt3DCore::QEntity( rootEntity );
Qt3DRender::QMesh * mesh = new Qt3DRender::QMesh();
QUrl url;
url.setScheme("file");
url.setPath("/tmp/trefoil.obj");
mesh->setSource( url );
// now i print some of properties.
qDebug() << mesh->geometry() << ", children nodes=" << mesh->childrenNodes().count();
// ... children... primitiveCount... and so on. I see only empty values.

UncleSal
- 41
- 4
-
I wonder something similar to mesh->getVertices(), mesh->getBones(), getFacets()... and so on. Any form of geometrical descriptions of the body (solid) within the mesh. – UncleSal Jul 31 '16 at 14:59
-
-
Unfortunately no. Instead of that, I used the assimp library and QOpenGLWindow-based visualization. – UncleSal Mar 22 '17 at 15:21
-