![]() |
Viewport Y-offset - how to find it? - Printable Version +- Wings 3D Development Forum (https://www.wings3d.com/forum) +-- Forum: Wings 3D (https://www.wings3d.com/forum/forumdisplay.php?fid=1) +--- Forum: Programming (https://www.wings3d.com/forum/forumdisplay.php?fid=7) +--- Thread: Viewport Y-offset - how to find it? (/showthread.php?tid=298) |
Viewport Y-offset - how to find it? - micheus - 04-27-2013 I need to make my own "vertex select" routine for a new plugin. So, I create some functions based on those already existent in Wings. The find_vertex converts the 3D coordinate into 2D (viewport coordinates). The problem is that I'm always getting the Y coordinated with an offset of 75px. This is exactly the height used by title bar+menu bar+button bar by using only the default Geom window. ![]() I couldn't find the "magic" at Wings3d code. Can someone help me? Code: ... RE: Viewport Y-offset - how to find it? - micheus - 04-28-2013 Well, after lot of tries I found it... I added the call to global2local function: Code: find_vertex(Vs, X, Y, {_,_,{_,_,W,H}}=Trans) -> RE: Viewport Y-offset - how to find it? - bmulder - 03-18-2014 Viewport Y-offset Thanks guys.I went surfing the net blue for this information till a friend advised my to try wings3d.com. Will give code it a try a give feedback |