Qt3D - loading a mesh



  • Basically what I am trying to do is load a mesh into a 3D scene. Specifically a .STL file.

    I have read all of the tutorials for glwidget, but there appears not to be a class for loading actual models.

    After searching around a bit a found references to something called Qt3D. Is this still used?

    The current list of QT modules does not list it:
    http://qt-project.org/doc/qt-5/qtmodules.html

    However forum posts like this:
    http://qt-project.org/wiki/Category:Developing_with_Qt::Qt3D

    And tutorials like this:
    http://doc-snapshot.qt-project.org/qt3d-1.0/qt3d-penguin.html

    @
    m_scene = QGLAbstractScene::loadScene(QLatin1String(":/penguin.3ds"));
    @

    Seems like such a nice syntax for loading a file. If it supports .STL I would be in heaven.

    Seem to suggest that it will do just what I want it to do with minimal fuss. However all of this dates back to 2012.

    Is Qt3D still used?
    Is there an equivalent functionality present in glwidget?

    Some have suggested I link to the assimp library. However, it is large, and slow, and I imagine that I would have to statically link it for distribution, which would bloat out my binary quite a bit.

    Or should I break down and parse the files into open GL myself? That doesn't sound very attractive at all.



  • So in order to explore qt3D I tried compiling it as the instructions here say I should:

    http://qt-project.org/wiki/Qt3D-Installation

    I got this error:
    @
    :\qt3d>mingw32-make -j 3 install
    d src/ && ( test -e Makefile || C:/Qt/5.1.1/mingw48_32/bin/qmake.exe C:/qt3d/src/src.pro -o Makefile ) && mingw32-make -f Makefile install
    ingw32-make[1]: Entering directory 'c:/qt3d/src'
    d threed/ && ( test -e Makefile || c:/Qt/5.1.1/mingw48_32/bin/qmake.exe C:/qt3d/src/threed/threed.pro -o Makefile ) && c:/Qt/Tools/mingw48_32/bin/mingw32-make
    f Makefile install
    usr/bin/sh: c:/Qt/Tools/mingw48_32/bin/mingw32-make: Invalid argument
    akefile:64: recipe for target 'sub-threed-install_subtargets-ordered' failed
    ingw32-make[1]: *** [sub-threed-install_subtargets-ordered] Error 126
    ingw32-make[1]: Leaving directory 'c:/qt3d/src'
    akefile:55: recipe for target 'sub-src-install_subtargets' failed
    ingw32-make: *** [sub-src-install_subtargets] Error 2
    @

    I also explained the problem slightly more thoroughly here:

    http://stackoverflow.com/questions/23138895/compiling-qt3d-under-windows7

    Any ideas what I am doing wrong?

    Note: I am using Windows 7.



  • OK

    So as it turns out I need to use the -r flag to make qmake to work properly. Think I should change this in the wiki?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.