Open3d has transformation capabilities. As does boost's geometry among many other libraries.
A camera viewpoint can be expressed as a transformation. You consider an axis (often z) to be the depth after applying the viewpoint. The translation part accounts for the position of the camera while the rotation portions account for the direction it looks.