# Converting coordinate systems

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

## Recommended Posts

Hey all,

Say I have two OBBs defined in terms of a center, 3 orthonormal axis vectors and 3 extents. I need to convert OBB B to OBB A's coordinate system. For the centers this is accomplished by subtracting OBB A's center from OBB B's center.

How can you change B's axes vectors to be in A's coordinate system? Sorry this may be a stupid question but this is stumping me.

Thanks for the help!

##### Share on other sites
Your coordinate system is defined by the 3 axis vectors and the centre vector which together produce a 4x4 matrix:

Image.

So you have two coordinate systems A and B.

To go from coordinate system B to coordinate system A, you would premultiply the point/vector with AB[sup]-1 [/sup]

Of course you can probably simplify the maths greatly, if your axis vectors form an orthonormal set of vectors, in which case the upper 3x3 part of the coordinate system basis is an orthogonal matrix, and so it's inverse is simply it's transpose and so to premultiply with B's inverse, you would just subtract the centre vector, then premultiply with the transposed upper 3x3 part.

##### Share on other sites
Perfect! Thanks so much for the help.

1. 1
Rutin
38
2. 2
3. 3
4. 4
5. 5

• 12
• 15
• 12
• 14
• 9
• ### Forum Statistics

• Total Topics
633354
• Total Posts
3011494
• ### Who's Online (See full list)

There are no registered users currently online

×