| 491 | uv_map.clear(); |
| 492 | } |
| 493 | std::string SphericalProjection::PropertiesJSON(int64_t requested_frame) const |
| 494 | { |
| 495 | Json::Value root = BasePropertiesJSON(requested_frame); |
| 496 | |
| 497 | root["yaw"] = add_property_json("Yaw", yaw.GetValue(requested_frame), "float", "degrees", &yaw, -180, 180, false, requested_frame); |
| 498 | root["pitch"] = add_property_json("Pitch", pitch.GetValue(requested_frame), "float", "degrees", &pitch,-180, 180, false, requested_frame); |
| 499 | root["roll"] = add_property_json("Roll", roll.GetValue(requested_frame), "float", "degrees", &roll, -180, 180, false, requested_frame); |
| 500 | |
| 501 | root["fov"] = add_property_json("Out FOV", fov.GetValue(requested_frame), "float", "degrees", &fov, 0, 179, false, requested_frame); |
| 502 | root["in_fov"] = add_property_json("In FOV", in_fov.GetValue(requested_frame), "float", "degrees", &in_fov, 1, 360, false, requested_frame); |
| 503 | |
| 504 | root["projection_mode"] = add_property_json("Projection Mode", projection_mode, "int", "", nullptr, |
| 505 | (int)MODE_RECT_SPHERE, (int)MODE_FISHEYE_ORTHOGRAPHIC, false, requested_frame); |
| 506 | root["projection_mode"]["choices"].append(add_property_choice_json("Sphere", (int)MODE_RECT_SPHERE, projection_mode)); |
| 507 | root["projection_mode"]["choices"].append(add_property_choice_json("Hemisphere", (int)MODE_RECT_HEMISPHERE, projection_mode)); |
| 508 | root["projection_mode"]["choices"].append(add_property_choice_json("Fisheye: Equidistant", (int)MODE_FISHEYE_EQUIDISTANT, projection_mode)); |
| 509 | root["projection_mode"]["choices"].append(add_property_choice_json("Fisheye: Equisolid", (int)MODE_FISHEYE_EQUISOLID, projection_mode)); |
| 510 | root["projection_mode"]["choices"].append(add_property_choice_json("Fisheye: Stereographic", (int)MODE_FISHEYE_STEREOGRAPHIC,projection_mode)); |
| 511 | root["projection_mode"]["choices"].append(add_property_choice_json("Fisheye: Orthographic", (int)MODE_FISHEYE_ORTHOGRAPHIC, projection_mode)); |
| 512 | |
| 513 | root["invert"] = add_property_json("Invert View", invert, "int", "", nullptr, 0, 1, false, requested_frame); |
| 514 | root["invert"]["choices"].append(add_property_choice_json("Normal", 0, invert)); |
| 515 | root["invert"]["choices"].append(add_property_choice_json("Invert", 1, invert)); |
| 516 | |
| 517 | root["input_model"] = add_property_json("Input Model", input_model, "int", "", nullptr, INPUT_EQUIRECT, INPUT_FEQ_ORTHOGRAPHIC, false, requested_frame); |
| 518 | root["input_model"]["choices"].append(add_property_choice_json("Equirectangular (Panorama)", INPUT_EQUIRECT, input_model)); |
| 519 | root["input_model"]["choices"].append(add_property_choice_json("Fisheye: Equidistant", INPUT_FEQ_EQUIDISTANT, input_model)); |
| 520 | root["input_model"]["choices"].append(add_property_choice_json("Fisheye: Equisolid", INPUT_FEQ_EQUISOLID, input_model)); |
| 521 | root["input_model"]["choices"].append(add_property_choice_json("Fisheye: Stereographic", INPUT_FEQ_STEREOGRAPHIC, input_model)); |
| 522 | root["input_model"]["choices"].append(add_property_choice_json("Fisheye: Orthographic", INPUT_FEQ_ORTHOGRAPHIC, input_model)); |
| 523 | |
| 524 | root["interpolation"] = add_property_json("Interpolation", interpolation, "int", "", nullptr, 0, 3, false, requested_frame); |
| 525 | root["interpolation"]["choices"].append(add_property_choice_json("Nearest", 0, interpolation)); |
| 526 | root["interpolation"]["choices"].append(add_property_choice_json("Bilinear", 1, interpolation)); |
| 527 | root["interpolation"]["choices"].append(add_property_choice_json("Bicubic", 2, interpolation)); |
| 528 | root["interpolation"]["choices"].append(add_property_choice_json("Auto", 3, interpolation)); |
| 529 | |
| 530 | return root.toStyledString(); |
| 531 | } |