How to rotate about arbitrary axis?

If I specify a rotation as follows…

[java]Quaternion q = new Quaternion();

q.fromAngleAxis(FastMath.PI/4f, new Vector3f(0,1,0));


… and suppose the geometry is just the unit cube about the origin, then it rotates about the y-axis as expected.

But what if I want to rotate the cube at one of its edges, and not the middle? In other words, it is as if the origin is moved to the edge of the cube that I want to rotate.

Hope this makes sense.

D’oh, I suppose this is the answer:[]=rotation