# transformation question - scaling -

This topic is 5196 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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

##### Share on other sites
Quote:
 Original post by MTclipthen 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 MTclipIf 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 MTclipalso 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

thanks for that!

• ### Game Developer Survey

We are looking for qualified game developers to participate in a 10-minute online survey. Qualified participants will be offered a \$15 incentive for your time and insights. Click here to start!

• 11
• 15
• 21
• 26
• 11