Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Brainstorm
  4. Simple 3d drawing
Qt 6.11 is out! See what's new in the release blog

Simple 3d drawing

Scheduled Pinned Locked Moved Solved Brainstorm
3d canvasopenglexampletesseract
2 Posts 1 Posters 2.6k 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.
  • J.HilkJ Offline
    J.HilkJ Offline
    J.Hilk
    Moderators
    wrote on last edited by
    #1

    Hi everyone,

    I've made a small program with Qt, that basically represents a 4d-Cube (aka Hypercube or Tesseract)

    A nice little exercise to get back into touch with matrices, rotations and projections.

    However, due to my complete lack of knowledge anything 3D rendering, I ended up projecting the 4d points all the way down to a 2d plane to than draw them in a QML canvas2d.

    It works, and if you're interested in the code, the project can be found here:

    But, I would like to draw it in 3D right away.

    Qt offers at least 3 different ways to draw in 3D - openglwidget, Canvas3D(QML) and Qt3d - has anyone any experience with one of these und would know how to draw a List/Vector of a container(QVector3d, QGenericmatrix, double[] etc.) representing 3d Coordinates of Points with connecting lines.

    I've gone through the docu, but all examples I found don't really fit and/or are very complicated. Like I said, next to no 3d experience, but I would like to know more. Or I've looked under the wrong keywords :-(

    If anyone could point me in the right direction or could point to an example of drawing simple 3D points in Qt, I would really appreciate it!!


    Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


    Q: What's that?
    A: It's blue light.
    Q: What does it do?
    A: It turns blue.

    1 Reply Last reply
    0
    • J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      Alright,
      with much time and an extensive amout of google search I managed to cobble a working QOpenGLWidget program together.

      I used this official Qt-Example as a basline:
      http://doc.qt.io/qt-5/qtopengl-cube-example.html

      here is the combination with my Tesseract code
      https://github.com/DeiVadder/Tesseract-Challenge-OpenGL

      It's working, yeah me!!, but I have the feeling that it's far from ideal. I'm just glad I managed to draw something in 3d.

      Anyway, closed and solved.


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      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