Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt3D question for sub-entities of obj data file



  • I am loading an obj file, and I am trying to apply texture on it's parts or sub-entities but I am unsuccessful.

    Here's my code snippet

    Qt3DCore::QComponentVector m_components = m_root->components();

    I am trying to get components from the root entity, and from each of this components I am trying to get sub-entities as follows.

    for(int i=0; i<m_components.size(); i++)
    {
    QVector<Qt3DCore::QEntity *> vecEntities = m_components.at(i)->entities();
    }

    But my vecEntities having only one element and component also have one element.

    My file is a restaurent with sofa, table, chair, glasses etc and many more. How can I get individual objects as entities and apply texture on it.

    Please help me with your suggestions whether its doable or not.

    Thanks a lot in advance.


Log in to reply