C++ code for applying 3-D rotation matrices to vectors.