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 translation of an object

QT3d translation of an object

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 538 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
    sunil.nair
    wrote on last edited by
    #1

    Hi, I am new to QT. I am trying to move an object from one point to another in this function. But, rather than translating the object, QT creates a copy of the cube. How can I use translation.

    I want the cube to remain at position1 and then move to position2 after 1 second.
    @
    const QVector3D position1(1,1,1);
    const QVector3D position2(-1,0,-2);
    CubeView::CubeView(QWindow *parent)
    : QGLView(parent)
    {
    //! [1]
    QGLBuilder builder1;
    builder1 << QGL::Faceted;
    builder1 << QGLCube(2);
    cube = builder1.finalizedSceneNode();

    cube->setPosition(position1);
    Sleep(1000);
    cube->setPosition(position2);
    

    }@

    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