window.pick function over sub-window
Hi,
I have a function that examines all the pixels of the MainWindow using the window.pick function. The problem is that when I use a sub-window instead of MainWindow, I get strange results. Specially, the window.pick command returns "no object" over the portion of the MainWindow that hasn't been occupied by the sub-window. My question is, does the window.pick function works with sub-windows? Best, Omid |
The window.pick function only works for that window. You will have to call the pick function for the specific window you are interested in. You can use the viz.window.select command to get the current sub-window located at the specified screen position. I just noticed that this command is currently undocumented, so here is some example code showing how to use it:
Code:
# Get the sub-window located at the current mouse position |
I think I didn't describe the problem clearly. Imagine I created a window:
Code:
UpperRightWindow = viz.addWindow() Code:
xres = 200 Am I doing anything wrong? Best, Omid Quote:
|
Are the coordinates you are passing to the pick function relative to the lower-left corner of the sub-window, or the lower-left corner of the graphics window? The pick function expects coordinates that are relative to the lower-left corner of the graphics window. Here is a simple script showing that picking does work with sub-windows:
Code:
import viz |
Thanks. Yes the problem was relativity to the graphics window.
|
All times are GMT -7. The time now is 08:48 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC