Dynamic generation of QEntity and QGeometry data

  • I started working on a little demo to do some traffic simulation, but I'm stuck at getting the entities to render properly (or at all). A previous version I had that just renders a bunch of Line primitives via a QBuffer worked just fine (but not indexed line strips for some odd reason... thats another story) but I've now changed to dynamically creating entities each with their own portion of the over all city "map". It's structured as a QuadTree, where each leaf quad gets its own entity. I've got it creating the entities, and it appears to properly generate the geometry via GeometryFactory's and QBufferDataGenerator's. But so far it hasn't actually rendered anything.

    I've got my current project up at https://github.com/Tomasu/CitySimDemo. it uses git-lfs for the data files which are a little big (100MB+) so if you were to attempt to build it, you'd need to install git-lfs. Other deps are cmake, Qt5 (currently building against 5.12.2), GDAL, and boost-graph.

    I'd appreciate any help.

  • I did manage to figure out my initial problems with doing dyamic generation of geometry and entity's themselves. I was actually not entirely finished implementing the QuadTree code.

  • Lifetime Qt Champion

    But no screenshots ? :)

  • @mrjj said in Dynamic generation of QEntity and QGeometry data:

    But no screenshots ? :)

    Haha, Nothing impressive at least. Just some debug output.


  • Lifetime Qt Champion

    Oh that looks cool.
    Like an infection zone chart from a horror movie. :)

  • @mrjj Haha, I suppose it does. I think if it were in circles or odd shapes it'd look more like it. hehe.


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