class_docstr: Renders a novel synthesis view of a trained NeRF model for given camera.
docstr: Creates rays for a given camera.
  
  Args:
      camera: camera for image rendering: PinholeCamera.
docstr_tok: ["Creates","rays","for","a","given","camera",".","Args",":","camera",":","camera","for","image","rendering",":","PinholeCamera","."]
code: def _create_rays(self, camera: PinholeCamera) -> Ray:
      """Creates 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)
  
imports: from __future__ import annotations
  import torch
  from torch import nn
  from torch.nn import functional
  from kornia.core import Module, Tensor
  from kornia.geometry.camera import PinholeCamera
  from kornia.geometry.ray import Ray
  from kornia.nerf.positional_encoder import PositionalEncoder
  from kornia.nerf.samplers import sample_lengths, sample_ray_points
  from kornia.nerf.volume_renderer import IrregularRenderer, RegularRenderer
  from kornia.utils._compat import torch_inference_mode
  from kornia.utils.grid import create_meshgrid
label_desc: Use image node_id 4 for calling the NerfModelRenderer obj's underlying member method code with example usage: obj._create_rays(camera) and returns: Ray