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. QT3D how to get the mesh from QCuboidMesh?
Qt 6.11 is out! See what's new in the release blog

QT3D how to get the mesh from QCuboidMesh?

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 429 Views
  • 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.
  • J Offline
    J Offline
    jimfar
    wrote on last edited by
    #1

    for (auto &a : m3dentity->components())
    {
    auto b1 = dynamic_cast< Qt3DRender::QGeometryRenderer*>(a);
    if (b1)
    {
    Qt3DExtras::QCuboidMesh b = (Qt3DExtras::QCuboidMesh)b1;
    auto c=b->geometry();
    for (auto d : c->attributes())
    {
    QString str = d->name();
    if (str == Qt3DRender::QAttribute::defaultPositionAttributeName()) {
    num = d->count();
    auto buf = d->buffer();
    buf->setAccessType(buf->ReadWrite);
    auto ba = buf->data();

    				break;
    				 
    			}
    		 }
    		 
    	}
    

    }
    but ba is valid

    1 Reply Last reply
    0

    • Login

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