Some transforming is done here https://github.com/lucasw/vimjay/blob/eliminate_build_warnings/src/bin/camera_fov_plane_intersection.rs - the for loop is probably fine (thanks to compile time optimizations) but ideally could make a matrix of all the points in nalgebra and transform them in one step.
Make the transform and PointCloud2 conversion functions available externally.