Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt 3D Qt3DExtras::Qt3DWindow::show() is slow.
Forum Updated to NodeBB v4.3 + New Features

Qt 3D Qt3DExtras::Qt3DWindow::show() is slow.

Scheduled Pinned Locked Moved Unsolved General and Desktop
qt3dqt3d scene3d
1 Posts 1 Posters 472 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    surajj4837
    wrote on 18 Apr 2021, 12:17 last edited by surajj4837
    #1

    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?

    1 Reply Last reply
    0

    1/1

    18 Apr 2021, 12:17

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved