Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 
Share Thread:
Reddit Facebook Twitter
Viewport Y-offset - how to find it?
04-28-2013, 04:24 AM (This post was last modified: 04-28-2013 04:25 AM by micheus.)
Post: #2
RE: Viewport Y-offset - how to find it?
Well, after lot of tries I found it...

I added the call to global2local function:
Code:
find_vertex(Vs, X, Y, {_,_,{_,_,W,H}}=Trans) ->
    lists:map(fun(#vl{v=V}) ->
        {X0,Y0} = project_vertex(V, Trans),
        {Xs,Ys} = Pos = wings_wm:global2local(X0,Y0),  <<==
        Dx = X-Xs,
        Dy = Y-Ys,
        {Dx*Dx+Dy*Dy,Pos,V}
    end, Vs).
Now, both Y's values uses the same 75px offset.
Reply


Messages In This Thread
RE: Viewport Y-offset - how to find it? - micheus - 04-28-2013 04:24 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)