Lots more raytracing infrastructure for hqz