[Bf-committers] Changes to Mat3ToSize...

Ton Roosendaal ton at blender.org
Mon Mar 28 16:18:40 CEST 2005


Hi,

I thought that this resize matrix in Transform() had no rotation  
component?
Doesn't make the call Mat3ToSize better... should be like  
UnrotatedMat3ToSize. :)

Just was waiting for you to fix the other issue... try it; an object  
with 1 axis negative loses immediately the negative part on any scale  
attempt.

-Ton-

On 27 Mar, 2005, at 21:40, Martin Poirier wrote:

>
> --- Ton Roosendaal <ton at blender.org> wrote:
>> ton (Ton Roosendaal) 2005/03/27 20:17:48 CEST
>>
>>   Last one i need Martin P for! Note that I had to
>> change Mat3ToSize....
>>
>>   Revision  Changes    Path
>>   1.23      +4 -2
>> blender/source/blender/blenlib/intern/arithb.c
>>
> <http://projects.blender.org/viewcvs/viewcvs.cgi/blender/source/ 
> blender/blenlib/intern/arithb.c.diff?r1=1.22&r2=1.23&cvsroot=bf- 
> blender>
>
> The flipping part ("if(vec[0]<0.0) size[0]=
> -size[0];") assumes the matrix is aligned with global
> space while the rest clearly doesn't. Simply put, it
> won't work correctly for rotated size matrix.
>
> To solve this, you'd need to renormalise the matrix
> (to get just the rot matrix), invert it and multiply
> the original size matrix with it. This would give a
> matrix with mat[0][0] == size[0], mat[1][1] == size[1]
> and mat[2][2] == size[2].
>
> This isn't too fast though.
>
> Hopefully someone better in math (zr perhaps) has a
> better solution.
>
> Martin
>
>
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - Helps protect you from nasty viruses.
> http://promotions.yahoo.com/new_mail
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
>
>
------------------------------------------------------------------------ 
--
Ton Roosendaal  Blender Foundation ton at blender.org  
http://www.blender.org



More information about the Bf-committers mailing list