www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: raft on March 12, 2010, 08:03:57 am

Title: rotation by matrix
Post by: raft on March 12, 2010, 08:03:57 am
i have a rotation matrix multiplied by a uniform scale matrix.

* SimpleVector.rotate(matrix) also applies scaling to vector, is this intentional ?
* how can i check rotation part (upper 3x3) of matrix has no scale information ?
* how can i clear scaling from matrix ? assuming i dont know scaling value

thanks
Title: Re: rotation by matrix
Post by: EgonOlsen on March 12, 2010, 08:28:33 am
Yes, that is intentional... ;D


Maybe this works (as long as the scaling is uniform):


Should work, but might not be the best or fastest way to do it...only a pragmatic way.
Title: Re: rotation by matrix
Post by: raft on March 12, 2010, 08:44:05 am
yes it works, thanks :)

so, assuming there is no translation in matrix, multiplying it with scalar is practically the same as multiplying with a uniform scale matrix. and of course less expensive. i didnt know this
Title: Re: rotation by matrix
Post by: EgonOlsen on March 12, 2010, 08:58:18 am
Just do it once on paper and you'll see... ;)