skuep / GDS3D

Fork from https://sourceforge.net/projects/gds3d
GNU General Public License v2.0
65 stars 21 forks source link

navigation trouble #5

Open danmcmahill opened 5 years ago

danmcmahill commented 5 years ago

I've been really struggling with the UI. In particular, it is very easy for my entire layout to vanish off of the screen. As an example, I have a fairly small layout. Pressing r centers the layout and gives me a view looking straight down on it as if I had placed a wafer under a microscope. w and s are like turning the microscope zoom knob in and out respectively.

a and d however act like the following. Pretend the wafer is sitting on top of a very tall cylinder and I tip the cylinder left (d) or right (a). What I see is the tipping but only tipping by a small number of degrees causes the layout to leave the screen to the left or right and I can't seem to figure out how to pan (in my microscope analogy, slide the cylinder that the wafer is sitting on top of left or right) to get the image back on screen.

q and z have a similar problem as a and d but it is tipping forward/backward instead of left/right. But again, I only have to tip a little bit before the entire layout is off the screen.

So what it looks like is that the reference point for the rotation is much too deep into the screen so instead of seeing my layout rotate left/right/up/down, I see a large amount of motion that overshadows the rotation part.

Between not being a c++ programmer (C yes, C++ no) and having no GL experience at all, I'm struggling a bit to really understand the code. However the comment here jumped out at me a little as maybe relevant.

https://github.com/skuep/GDS3D/blob/5ef8d5b4e7ee856b3a17641c1f3ce4e2696a7704/gdsoglviewer/gdsparse_ogl.cpp#L406-L409

If only there were a key press that would slide the whole think back under my virtual microscope!

Any suggestions? This is so close to working for me but not just quite.