transformation question - scaling -
I am Using the D3DXMatrixTransformation2D function
I call it like this
D3DXMatrixTransformation2D(&mat,&Scenter,0.0,&scaling,NULL,NULL,&trans);
scaling = (2,2)
trans = (0,0)
Scenter = (0,0)
then when i call my draw calls.. it seems that every thing i send it is scaled by 2 .. including positions... is this true...
also... If i just wanted to scale the quad that i draw by a say 2 and i use the top left as it orientation, I should set scaling center to (0,0) -right?
also what is scaling rotaion center..?
--- ;P
Quote:Original post by MTclip
then when i call my draw calls.. it seems that every thing i send it is scaled by 2 .. including positions... is this true...
If you configure the transform to have a scaling factor (as you seem to) and then configure the device to use that transform, then yes - everything you'll render will be affected.
The primary reason is to manipulate the positions - so I'm not sure why you seem "surprised" (?) that they're changing [smile]
Quote:Original post by MTclip
If i just wanted to scale the quad that i draw by a say 2 and i use the top left as it orientation, I should set scaling center to (0,0) -right?
It depends on your geometry - if it was created such that (0,0) is the top left then yes, but if your geometry was created about the origin (a better idea), then you might end up using (-1,-1) for top left...
Quote:Original post by MTclip
also what is scaling rotaion center..?
Matrix maths is quite a complex area - rotation always occurs around the mathematical origin... but if your object's center is *not* the origin then it might appear that your object is "orbitting" around an arbitrary point in space. For scaling, it's less obvious - but you can see your object appear to move if you don't scale about the center.
Hence the "scaling rotation center" allows you to get around this by specifying somewhere other than the mathematical operation.
hth
Jack
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement