[Bf-committers] Re: [Bf-blender-cvs] CVS commit: blender/source/blender/src editobject.c

Martin Poirier theeth at yahoo.com
Sat Oct 16 22:09:10 CEST 2004


--- joeedh <joeeagar at prodigy.net> wrote:

> Hi.  By the way, can someone here tell me where in
> transform() is the 
> code to get the screen coordinates of the
> transformation center?  I'm 
> helping theeth with his refactor, and I've almost
> finished the scaling 
> function (I also ported the make_trans_verts to the
> new code, splitting 
> it up into a bunch of new functions), but I'm having
> a little trouble 
> figuring it out.  Right now I'm using the method
> (but in C) that 
> LetterRip posted to bf-python to find vert screen
> coordinates.

You don't need the center's screen coordinate. All you
have to do is project the mouse pointer's 2D
coordinates (initial and current) in the 3D space,
calculate each distance from the center and then do
the ratio.

Without at least basic vectorial math knowledge,
you're going to hit walls like this all the time when
coding transformation. I was planning on doing those
myself anyway, this way it's more easier to
standardize the flow of each transformation's
function.

Martin

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the Bf-committers mailing list