About Store Forum Documentation Contact



Post Reply 
Matrix setting
Author Message
Corrado Offline
Member

Post: #1
Matrix setting
Hello Grzeg,

how set contemporarily on a matrix the following :
angles, scale, positions ?

i try with this :
{
m.setRotateZ(z)).rotateXY(x, y)).scale(scale);
m.pos = Pos;
}
and others ...
but i don't succeed in getting all the 3 contemporarily on a matrix.

Tks and Bye,
Corrado
07-14-2009 12:22 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
Re: Matrix setting
Hi,

I think the codes that you're using are correct.

are you sure youre getting bad results? if so, then what would you like to achieve, and what are you achieving?
07-14-2009 06:18 PM
Find all posts by this user Quote this message in a reply
Corrado Offline
Member

Post: #3
Re: Matrix setting
...

if i set the angles and then the scale -> it seems that when i set the scale i lost the angles
and
if i set the scale and then the angles -> it seems that when i set the angles i lost the scale

Corrado
07-14-2009 08:04 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
Re: Matrix setting
Matrix m;
m.setRotateZ(z)).rotateXY(x, y));


now if you'd do 'setScale' then you'd lose the info about rotation
but you're using 'scale' which is fine

are you using exactly this code?
Code:
m.setRotateZ(z).rotateXY(x,y).scale(scale);
m.pos = Pos;
07-14-2009 08:13 PM
Find all posts by this user Quote this message in a reply
Corrado Offline
Member

Post: #5
Re: Matrix setting
yes i used the code that i sent you (my first choice was this code, then others, but with the same bad result).

Can you check if "scale" reset the angles values ?

(if scale is correct -> i have another error that I don't succeed in seeing in another part of the program)
07-14-2009 08:29 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
Re: Matrix setting
'scale' method doesn't reset the angles, it just applies a scaling factor
07-15-2009 08:30 PM
Find all posts by this user Quote this message in a reply
Post Reply