I need to be able to set the rotation of a matrix rather than add to it. I believe the only way to set the rotation is to know the current rotation of the matrix.
What you can do is call
getValues and cache the values. Later when you want them back just call
setValues on the matrix.
The rotation matrix and transform matrix relation well explained here