(It might not seem like it at first, but I promise this is a mathematics question, not programming.) Hi, I'm writing a 3D software renderer in C++. I'm projecting objects from the 3D world onto a 2D plane using a camera matrix.
I've implemented a Camera object that has a position vector in space and 3 relative direction vectors.
For instance the world centre is (0,0,0) and it's x,y,z vectors are (1,0,0), (0,1,0), and (0,0,1). The camera position and relative directions can be (and is most likely) different to these.
So now we get to the conundrum I'm having. I know that the Camera matrix can be calculated as P = KR[ I|C]. What I'm not sure about is what is meant by R?
I know you get rotation matrices for rotating around an axis, as described here, but what if the vector has been rotated around multiple axes? Is there a general R?
Currently I've been working under the asssumption that you can construct the "R" you need by simply premultiplying some of the standard ones together, kindof like you're rotating about one axis, then the next, and so on... Is this correct?