How to find the distance between two 3d points with angular movement(yaw,pitch,roll.

For simple 3d points use

sqrt((x1-x2)(x1-x2)+(y1-y2)(y1-y2)+(z1-z2)(z1-z2))

but how to find with yaw pitch roll involve in it.

-----------------------
wwww.ashscholar.com