what is : w and h parameters in method " ItemAt (region) "of class GLViewWidget

11 views
Skip to first unread message

Landry Kotto

unread,
Jul 26, 2020, 1:35:27 PM7/26/20
to pyqtgraph

in the method ItemAt (region) of class GLViewWidget, I don't understand parameters w and h.

In the doc they say: " " "Return a list of the items displayed in the region (x, y, w, h) relative to the widget." " "

I know that x and y can be obtained as follows: self.mousePos.x () and self.mousePos.y (). What values must be entered in the parameters w and h? is it elevation and azimuth respectively?

Thans for advance.

Landry Kotto

unread,
Jul 27, 2020, 2:29:27 AM7/27/20
to pyqtgraph


Le dimanche 26 juillet 2020 19:35:27 UTC+2, Landry Kotto a écrit :

0

in the method ItemAt (region) of class GLViewWidget, I don't understand parameters w and h.

In the documentation they say: " " "Return a list of the items displayed in the region (x, y, w, h) relative to the widget." " "

I know that x and y can be obtained as follows: self.mousePos.x () and self.mousePos.y (). What values must be entered in the parameters w and h? is it elevation and azimuth respectively? I don't think.

Indeed, I would like to be able to pick a point with extremely precision in the 3D space in the GLViewWidget which contain as many GLScatterPlotItem as there are they points. by this way, I can get the region of the mouse using the method ItemAt(x,y,w,h). x, y can be obtained by : self.mousePos.x(), self.mousePos.y() and I don't now how to fix w and h to get an extremely precision of region point's region in the 3D Space. I would like to pick a point with very small size maybe. Any idea ?

Also, I would like to know the best way to select(or pick) a point in a 3S Space. I have thow options :

  1. create as many instance of GLScatterPlotItem for each point I wand to plot By this way each point is a GLScatterPlotItem and I it's easy to pick each. By this way the visuel is a bit slow.
  2. create one instance of GLScatterPlotItem which contains all my points. then add it in the GLViewWidget.
    By this way, the visuel is more rapid and fluent but I don't know how i can't distinguish a specific point in a 3D Space. Any idea ?

Thans for advance.

Reply all
Reply to author
Forward
0 new messages