Results 1 to 2 of 2

Thread: Qwt3Dplot points(x,y,z)

  1. #1
    Join Date
    Jul 2014
    Posts
    2

    Default Qwt3Dplot points(x,y,z)

    Hi,

    I want to plot points defined as (x, y, z) coordinates using Qwt3Dplot libraries. I only found the way to plot using surfaces functions, but not raw data. I saw people asking this question before but they didn't have answer.

    Any suggestion?

    Thanks,
    Andrew

  2. #2
    Join Date
    Jul 2014
    Posts
    2

    Default Re: Qwt3Dplot points(x,y,z)

    Hi again,
    Finally i solved using volumeplot type, here i attach an example of the process:

    Qt Code:
    1. //Creating a widget and adding a VolumePlot inside:
    2. QWidget *wm3D = new QWidget(this);
    3. m3Dplot = new VolumePlot(wm3D);
    4.  
    5. //Function example of how to add data:
    6. void form::add_m3Ddata_point(double x, double y, double z){
    7. m3Ddata.push_back(Voxel(x,y,z,0,0,255,255)); // The last 4 numbers are for select the color in rgba format
    8. }
    9.  
    10. //Adding the data to the VolumePlot:
    11. m3Dplot->createDataset(m3Ddata,true);
    12. m3Dplot->updateData();
    13. m3Dplot->updateGL();
    To copy to clipboard, switch view to plain text mode 

    Thanks!

Similar Threads

  1. Replies: 2
    Last Post: 2nd May 2012, 09:49
  2. Connecting 2 points using QML
    By aya_lawliet in forum Qt Quick
    Replies: 0
    Last Post: 4th November 2011, 08:05
  3. int to QString with points?
    By realdarkman71 in forum Newbie
    Replies: 7
    Last Post: 19th May 2011, 23:19
  4. Replies: 1
    Last Post: 9th February 2011, 07:30
  5. QScrollArea with Qwt3dPlot
    By locke in forum Qt Programming
    Replies: 0
    Last Post: 16th March 2010, 10:30

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.