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. 3d data visualization, draw lines

3d data visualization, draw lines

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 295 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.
  • L Offline
    L Offline
    Loc888
    wrote on last edited by
    #1

    I am trying to draw some triangles and lines in specified positions, in the 3d bar graph, but i can't see anything.

    I inherit from Q3DBars, then i add this function:

        glEnableVertexAttribArray(m_pos);
        glEnableVertexAttribArray(m_col);
    
        glVertexAttribPointer(m_pos, 2, GL_FLOAT, GL_FALSE, 0, vertices);
        glVertexAttribPointer(m_col, 3, GL_FLOAT, GL_FALSE, 0, colors);
        glDrawArrays(GL_TRIANGLES, 0, 3);
    

    I tried to call it in the constructor, but there's nothing in the scene, except for the empty axis. I can't find any virtual function like draw to replace. Both in the QAbstract3DGraph and QCustom3DItem, there's nothing useful to replace.

    I tried to find Q3DScene, but none of the objects contains it. Which object is the container for the scene objects? Where should i put that code to draw objects at custom positions? I was thinking to add a scatter series at the top of bar series, and maybe there i could put the objects in custom positions, but they both must be aligned.

    T 1 Reply Last reply
    0
    • L Loc888

      I am trying to draw some triangles and lines in specified positions, in the 3d bar graph, but i can't see anything.

      I inherit from Q3DBars, then i add this function:

          glEnableVertexAttribArray(m_pos);
          glEnableVertexAttribArray(m_col);
      
          glVertexAttribPointer(m_pos, 2, GL_FLOAT, GL_FALSE, 0, vertices);
          glVertexAttribPointer(m_col, 3, GL_FLOAT, GL_FALSE, 0, colors);
          glDrawArrays(GL_TRIANGLES, 0, 3);
      

      I tried to call it in the constructor, but there's nothing in the scene, except for the empty axis. I can't find any virtual function like draw to replace. Both in the QAbstract3DGraph and QCustom3DItem, there's nothing useful to replace.

      I tried to find Q3DScene, but none of the objects contains it. Which object is the container for the scene objects? Where should i put that code to draw objects at custom positions? I was thinking to add a scatter series at the top of bar series, and maybe there i could put the objects in custom positions, but they both must be aligned.

      T Offline
      T Offline
      tigerlfj
      wrote on last edited by tigerlfj
      #2

      @Loc888
      About draw 3d line via 3d data visualization problem. it is long time, qt didn't do any improve on it.

      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