• Website
  • Search
  • Member List
  • Help
  • Old Forum
  • Social Media
    •   @Wings3dOfficial
    •   @Wings3dOfficial
    •   Wings3dOfficial
    •   Wings3dOfficial
  • Register
  • Login
  • Website
  • Search
  • Member List
  • Help
  • Old Forum
  • Register
  • Login
Wings 3D Development Forum Wings 3D Programming v
« Previous 1 2 3 4 Next »
Viewport Y-offset - how to find it?

 
  • 0 Vote(s) - 0 Average
Viewport Y-offset - how to find it?

micheus
Offline

Forum's Admin and Support | Bug fixer
Posts: 3,683
Threads: 185
Joined: Jun 2012
#2
04-28-2013, 04:24 AM (This post was last modified: 04-28-2013, 04:25 AM by micheus.)
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.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Messages In This Thread
Viewport Y-offset - how to find it? - by micheus - 04-27-2013, 09:41 AM
RE: Viewport Y-offset - how to find it? - by micheus - 04-28-2013, 04:24 AM
RE: Viewport Y-offset - how to find it? - by bmulder - 03-18-2014, 06:37 PM

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D - Powered by MyBB

Linear Mode
Threaded Mode