Qt 3D Qt3DExtras::Qt3DWindow::show() is slow.
Unsolved
General and Desktop
-
I m using Qt 3D to visualise point cloud data. I have modified the example given here: simple-cpp example.
I have added the code to read a file containing 99477 points. Following code snippet shows how I m filling the Entity class with point cloud data.for (int i = 0; i < X.size(); i++) { Qt3DCore::QEntity *sphereEntity = new Qt3DCore::QEntity(rootEntity); Qt3DExtras::QSphereMesh *sphereMesh = new Qt3DExtras::QSphereMesh; sphereMesh->setRadius(0.05); Qt3DCore::QTransform *sphereTransform = new Qt3DCore::QTransform; sphereTransform->setTranslation(QVector3D(X[i], Y[i], Z[i])); sphereEntity->addComponent(sphereMesh); sphereEntity->addComponent(sphereTransform); sphereEntity->addComponent(material); }
The code is crashed after Qt3DExtras::Qt3DWindow::show() is called. The terminal output is as below:
17:53:33: Starting /home/suraj/Qt/Examples/Qt-5.15.2/qt3d/build-simple-cpp-Desktop_Qt_5_15_2_GCC_64bit-Release/simple-cpp ... Point cloud size: 99477 points. 18:00:06: The program has unexpectedly finished. 18:00:06: The process was ended forcefully. 18:00:06: /home/suraj/Qt/Examples/Qt-5.15.2/qt3d/build-simple-cpp-Desktop_Qt_5_15_2_GCC_64bit-Release/simple-cpp crashed.
So I decreased the number of points to ~18000, then it is able to load the scene but with some delay in seconds.
Can anyone guide me on this?