# Help with matrix transformations

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

## Recommended Posts

Suppose i have a quad glTranslated at 0,0,-100 with the following vertices: -20, -20 20, -20 20, 20 -20, 20 Say i translate the quad and scale it, how do i calculate new vertices positions ?

##### Share on other sites
You are trying to compute object to world coordinates.

You should write your own matrix class.

WorldVertex = ScaleMatrix * RotationMatrix * Translation Matrix * Vertex;

##### Share on other sites
Do you know any tutorial for this specific subject ? Thanks

##### Share on other sites
lets say you have an object. inside of that object there is a matrix that defines the objects translation, orientation, and scale in 3d space. if you wanted to get a vert position in the world all you would have to do is multiply your vert position with your objects matrix, like WilyCoder said. if you arent too familiar with matrices you should pick up a linear algebra book. i think there are a few out there that focus on 3d graphics. in the mean time i found a pretty crappy linear algebra tutorial online here: matrix multiply

1. 1
2. 2
Rutin
25
3. 3
4. 4
JoeJ
18
5. 5
gaxio
11

• 14
• 22
• 11
• 11
• 9
• ### Forum Statistics

• Total Topics
631765
• Total Posts
3002213
×