I was working on a collision detection algorithms for an OBB algorithm and I've reached the point where it works but I am finding the lines equivalent in box space in a really ineffective way by means of some hacked away code (using Ogre3d nodes) but I would really like it to be done as easily as possible with some small algorithms.
Basically I have 2 points and a box (for simplicity purposes a 1 point solution can be used for each) and these two points make up a line. The box can be rotated any way it wants so I need to rotate the box so it is axis aligned. To do this I also need the points to rotate to the same axis aligned space. I was able to do this when I worked in 2 dimensions but I am having trouble finding a solution with 3d.
I understand the concept easily illustrated by thinking about sticking a pencil into a clay box then rotating the box to be axis aligned and then doing calculations of it being axis aligned making it much easier but the code behind getting the lines to rotate are giving me trouble. Any help would be appreciated :)