def _create_rays(self, camera: PinholeCamera) -> Ray:
        """Create rays for a given camera.

        Args:
            camera: camera for image rendering: PinholeCamera.

        """
        height, width = self._image_size

        # convert to rays
        origin = camera.extrinsics[..., :3, -1]  # 1x3
        origin = origin.repeat(height * width, 1)  # (H*W)x3

        destination = camera.unproject(self._pixels_grid, self._ones)  # (H*W)x3

        return Ray.through(origin, destination)
Create rays for a given camera.

        Args:
            camera: camera for image rendering: PinholeCamera.

        
kornia/nerf/nerf_model.py