Suppose I have a line segment in 3D-space, having end-points $(a,b)$.
I want to translate this segment by $w$ units in the direction specified by 3 angles $\alpha,\beta,\gamma$ with respect to $x,y,z$ axis.
So, I compute vector $\vec{u}=b-a$ and specify it as a homogeneous affine matrix $U=\begin{bmatrix}1 & 0 & 0 & u_x\\0 & 1 & 0 & u_y\\0 & 0 & 1 & u_z\\0 & 0 & 0 & 1\end{bmatrix}$.
Now I can rotate $\vec{u}$ around the origin with homogeneous affine transforms $R_\gamma R_\beta R_\alpha U$ to orient it in the specified direction.
What I am not clear is how to compute the translation transform $T_w$ ?