void Dispatch()

in opensfm/src/geometry/camera_instances.h [190:226]


void Dispatch(const ProjectionType& type, IN&&... args) {
  switch (type) {
    case ProjectionType::PERSPECTIVE:
      FUNC::template Apply<PerspectiveCamera>(std::forward<IN>(args)...);
      break;
    case ProjectionType::BROWN:
      FUNC::template Apply<BrownCamera>(std::forward<IN>(args)...);
      break;
    case ProjectionType::FISHEYE:
      FUNC::template Apply<FisheyeCamera>(std::forward<IN>(args)...);
      break;
    case ProjectionType::FISHEYE_OPENCV:
      FUNC::template Apply<FisheyeOpencvCamera>(std::forward<IN>(args)...);
      break;
    case ProjectionType::FISHEYE62:
      FUNC::template Apply<Fisheye62Camera>(std::forward<IN>(args)...);
      break;
    case ProjectionType::FISHEYE624:
      FUNC::template Apply<Fisheye624Camera>(std::forward<IN>(args)...);
      break;
    case ProjectionType::RADIAL:
      FUNC::template Apply<RadialCamera>(std::forward<IN>(args)...);
      break;
    case ProjectionType::SIMPLE_RADIAL:
      FUNC::template Apply<SimpleRadialCamera>(std::forward<IN>(args)...);
      break;
    case ProjectionType::DUAL:
      FUNC::template Apply<DualCamera>(std::forward<IN>(args)...);
      break;
    case ProjectionType::SPHERICAL:
      FUNC::template Apply<SphericalCamera>(std::forward<IN>(args)...);
      break;
    case ProjectionType::NONE:
    default:
      throw std::runtime_error("Invalid ProjectionType");
  }
};