# Object Space

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

## Recommended Posts

Hey, I've recently been playing around with DirectX for a school assignment and I've got a nice mesh and texture loaded and rotating, translating and scaling. I'm trying to focus on the 3D math involved and I noticed that the order of Matrix Multiplications is very important. For a rotation it should be done as MatZ * MatX * MatY for basic Yaw, Pitch and Roll but I'm wondering why that changes depending on the order you multiply. I'm going to play around a bit more but has anyone got any references explaining that sort of thing? Also how would I go about drawing the Objects Local axis and displaying them as lines sort of thing? Thanks your help is much appreciated [smile] Jemburula

##### Share on other sites
Quote:
 but I'm wondering why that changes depending on the order you multiply

Take a look at the concatenating Matrices in the DirectX SDK Documentation.

"The order in which the matrix multiplication is performed is crucial. The preceding formula reflects the left-to-right rule of matrix concatenation. That is, the visible effects of the matrices that you use to create a composite matrix occur in left-to-right order. A typical world matrix is shown in the following example. Imagine that you are creating the world matrix for a stereotypical flying saucer. You would probably want to spin the flying saucer around its center - the y-axis of model space - and translate it to some other location in your scene. To accomplish this effect, you first create a rotation matrix, and then multiply it by a translation matrix, as shown in the following formula."

Quote:
 Also how would I go about drawing the Objects Local axis and displaying them as lines sort of thing?

That you could do using LineLists. You could in object space define the little axii and then just render them using Line Lists.

I hope this helps.
Take care.

1. 1
Rutin
46
2. 2
3. 3
4. 4
5. 5
JoeJ
19

• 11
• 15
• 9
• 10
• 13
• ### Forum Statistics

• Total Topics
633004
• Total Posts
3009836
• ### Who's Online (See full list)

There are no registered users currently online

×