Confusion over Matrix rotation I want to make a function in C++ that accepts an angle 'a', and a vector 'v' as arguments and returns a matrix. 'a' should represent the amount that is rotated around vector 'v', an arbitrary axis, and the matrix returned should contain values that will make the rotation  around v by certain degrees, possible.
However, I have no idea how matrices should end up looking, or if I do, how and why the values are assigned.
Here's an example.
values that are passed in..
a = 120, v = vector(1,1,1)

Magic happens
matrix data returned..
{ 0, 0, 1, 0
  1, 0, 0, 0
  0, 1, 0, 0
  0, 0, 0, 1
}

So the issue is, why are the 1's and 0's placed in such ways? What is the relationship between that specific matrix and a matrix that contains cosines, sins, -sins, or 1-cos? As far as I know, they're all rotation matrices
Thanks, in advance.

See Quaternion-derived rotation matrix here
$a=(a_x,a_y,a_z)$ is the axis, $c=\cos \theta$, $s=\sin \theta$ where $\theta$ is the angle of rotation.
