PDA

View Full Version : pos in world space TO screen point2 value


hblan
06-24-2009, 03:29 PM
hi all :
i m in top view . actived . then i get a object`s pos , for example : [-100,11,11]
how to translate this pos value to screen point2 value ? it is a mouse pos 2d value . from topleft is [0,0] . all value should be + value .

eg : [-100,11,11] >>>> [20,30] in view .

thanks for help .

HuaMuLan
06-24-2009, 04:01 PM
gw.setTransform(Matrix3 1)
gw.wTransPoint $.transform.row4

I do not undertand gw very well . But this codes above works well for me.

Gravey
06-24-2009, 05:29 PM
see this post (http://forums.cgsociety.org/showpost.php?p=5353613&postcount=12) from i thread I started on the same topic some time ago. dont forget to use gw.setTransform (matrix3 1) before calling gw.wTranspoint()

hblan
06-25-2009, 01:59 AM
thanks . buddy . it works ! .
many thanks .

CGTalk Moderation
06-25-2009, 01:59 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.