Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Searching QPainter but for 3D purpose (lines in 3D)

Searching QPainter but for 3D purpose (lines in 3D)

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
4 Posts 2 Posters 799 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.
  • MaelleTM Offline
    MaelleTM Offline
    MaelleT
    wrote on last edited by MaelleT
    #1

    Hi,
    I am looking for a Qt library similar to QPainter but for 3D purpose.
    I want to draw "lines" but in 3D dimension.

    I am coding in C++.

    Thank you for your help!

    tobias_mT 1 Reply Last reply
    0
    • MaelleTM MaelleT

      Hi,
      I am looking for a Qt library similar to QPainter but for 3D purpose.
      I want to draw "lines" but in 3D dimension.

      I am coding in C++.

      Thank you for your help!

      tobias_mT Offline
      tobias_mT Offline
      tobias_m
      wrote on last edited by
      #2

      @MaelleT A rectangle in 3D is a cube right? 😄 Is this what you’re looking for? https://doc.qt.io/qt-5/qt3dextras-qcuboidmesh.html

      Or perhaps other building blocks like https://doc.qt.io/qt-5/qvector3d.html#details ?

      MaelleTM 1 Reply Last reply
      0
      • tobias_mT tobias_m

        @MaelleT A rectangle in 3D is a cube right? 😄 Is this what you’re looking for? https://doc.qt.io/qt-5/qt3dextras-qcuboidmesh.html

        Or perhaps other building blocks like https://doc.qt.io/qt-5/qvector3d.html#details ?

        MaelleTM Offline
        MaelleTM Offline
        MaelleT
        wrote on last edited by MaelleT
        #3

        @tobias_m Hi! Thank you for you response but I have juste changed my post a few minutes ago XD
        Now I am searching how to draw a "line" in 3D.
        But thank you for your response by the way! (and yes qcuboidmesh looks great to do cubes)

        tobias_mT 1 Reply Last reply
        0
        • MaelleTM MaelleT

          @tobias_m Hi! Thank you for you response but I have juste changed my post a few minutes ago XD
          Now I am searching how to draw a "line" in 3D.
          But thank you for your response by the way! (and yes qcuboidmesh looks great to do cubes)

          tobias_mT Offline
          tobias_mT Offline
          tobias_m
          wrote on last edited by
          #4

          @MaelleT Yeah I saw the change 😉 If you want you can pursue the Qt3D framework a bit and see if it fits your requirements. I saw one question earlier similar to yours: https://stackoverflow.com/questions/38067867/how-do-i-draw-a-simple-line-in-qt3d.

          But it doesn’t really give you a simple answer.

          Is it really lines in 3D you want? Or is it 3D coordinates projected to a 2D plane? If it’s the latter you can “just” project the points you have in the 3D world to 2D coordinates then use Qpainter as usual to draw the lines between the coordinates.

          I have a rough example here if you want to have a quick look:

          https://github.com/tobiasmarciszko/effect-playground/blob/master/projection.cpp

          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