Solved

# How to calculate an absolute position/rotation given a relative position/rotation and a parent position/rotation vector and vice versa?

Posted on 2006-06-23

I'm making an application where I need to be able to calculate an absolute position/rotation given a relative position/rotation and a parent position/rotation it is relative to. The order of rotation will be X, Y then Z. I also need to be able to go the opposite way. That is finding a relative position/rotation given an absolute position/rotation and a parent position/rotation. What is the most efficient and easiest way to integrate this in an application that uses position and rotation vectors (radians) to store object placements?

If I'm not too wrong I can rotate it by X by multiplying the relative position X with cos(rotation x) and relative position Y with cos(rotation x). Not sure about Y and Z rotation though. I'm thankful for any solution :).