4

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.

UncleSal
  • 41
  • 4

1 Answers1

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