go to www.geomview.org home page
 
Home

Overview
FAQ
Documentation

Download

Mailing List

Geomview For Windows?

Support
Users
Development

Bug Reporting
Contributing
Contact Us

Sponsors

 

Site Search

 

Advanced
Search

 
About the software@geom archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

scenes and picking



This letter is part of a correspondence with tamara munzner, but as she
seems to be away I am sending it to the general software address.
I am having some trouble getting picking and scenes to work together.
First I will describe the program I am developing.
 
My program uses a parameter point in the x-y plane, which I will call P.
The point P is initialized to some value. Then the program sends
commands to geomview to draw some geometry in hyperbolic space; the
geometry drawn depends on the current value of P. It also sends commands
to geomview to draw a scene into a new window. In the scene, the
geometry is a list of two geometries: the point P drawn as a dot, and in
the background a mesh in the x-y plane with edges turned on.
 
The object of the program is to use picking in the scene window to
change the value of P. Then the picture in hyperbolic space (and the
picture in the coordinate plane) is updated to take account of the new
value of P.
 
To handle the picking, the program uses the lisp library and the "pick
parser" from nose.c, in particular the function Lpicked. I replaced the
function call to handle_pick with my own pick handler. My version of
handle_pick basically uses the coordinates of the point picked to change
the value of P.
 
How does it all perform?
 
First, when I turn off the picking, it works fine. I start up geomview
and select my program from the external modules window. The main camera
shows the correct picture in hyperbolic space, and the window opening
onto the scene shows the correct picture in the x-y plane, with a mesh
and a dot representing P overlying the mesh. One strange thing does
happen: when I click and drag the mouse in the scene window, it rotates
the picture in the main window, just as if I had clicked and dragged in
the main window.
 
When I turn on the picking, and run the program from geomview as an
external module, problems happen. However, I am pretty sure that my
program is working correctly. First let me tell you what happens when I
run the program from geomview, then I will tell you how I tested my
program to verify that it was working correctly.
 
When I start up geomview and select my program from the external modules
window, now with picking turned on, the main camera window still shows
the correct picture in hyperbolic space, but the scene window no longer
shows the correct picture in the x-y plane, instead showing the same as
the other window. It is as if the command for drawing the scene is
ignored completely (as you will see below, the command for drawing the
scene is being written correctly to stdout). Moreover, somehow the
program freezes at this point. Picking is completely non-operational,
even to rotate the picture in the main window. The buttons in geomview's
control window are not operational. I cannot even kill geomview by using
the lightening icon. I have to kill geomview with a control c from the
shell window where it was invoked, after which it gives a memory fault
and dumps core.
 
I also tried this procedure after altering my program so that it does
not send the commands to draw the picture in hyperbolic space. This
time, both windows are blank, and geomview freezes as before.
 
The way that I tested the program was to run it from a shell window.
Before the program asks for picking info, all of the geomview commands
written to stdout are exactly the same as when picking is turned off,
including the commands to draw the correct pictures into the main window
and the scene window. Then, at the time when the program expects a pick
string from the standard input, I literally type in the expected string
in the format expected from geomview. The program then processes all of
this information as it should, and all of the commands written to stdout
for geomview, to update the main window and the scene window, are as
they should be.
 
My guess is that somehow the presence of the "(scene ...)" command is
not compatible with picking, or is screwing up the pipe from geomview
stdout to my program's stdin. I have no guess, though, about why the
scene command is being ignored.
 
I also checked whether my program is ever getting anything from stdin.
My test as described above shows that this is so when it is run directly
from a shell window, but when run as a geomview external module nothing
is coming through stdin.
 
Any help will be greatly appreciated. Thanks. Lee


 
Home | Overview | FAQ | Documentation | Support | Download | Mailing List
Windows? | Development | Bug Reporting | Contributing | Contact Us | Sponsors
 
site hosted by
SourceForge Logo