更新
This commit is contained in:
@@ -373,6 +373,11 @@ void Cesium_Graphics_Config::from_base_json(const Psc::JSON* that_json) {
|
||||
terrain_occlusion_enabled = read_optional_bool_field(that_json, "terrain_occlusion_enabled", terrain_occlusion_enabled);
|
||||
surface_navigation_reference_visible = read_optional_bool_field(that_json, "surface_navigation_reference_visible", surface_navigation_reference_visible);
|
||||
view_axes_visible = read_optional_bool_field(that_json, "view_axes_visible", view_axes_visible);
|
||||
performance_panel_x = std::max(0.0, read_optional_double_field(that_json, "performance_panel_x", performance_panel_x));
|
||||
performance_panel_y = std::max(0.0, read_optional_double_field(that_json, "performance_panel_y", performance_panel_y));
|
||||
view_axes_panel_x = read_optional_double_field(that_json, "view_axes_panel_x", view_axes_panel_x);
|
||||
view_axes_panel_y = std::max(0.0, read_optional_double_field(that_json, "view_axes_panel_y", view_axes_panel_y));
|
||||
view_axes_panel_size = std::clamp(read_optional_double_field(that_json, "view_axes_panel_size", view_axes_panel_size), 48.0, 240.0);
|
||||
occlusion_sample_spacing_meters = std::clamp(read_optional_double_field(that_json, "occlusion_sample_spacing_meters", occlusion_sample_spacing_meters), 10.0, 5000.0);
|
||||
occlusion_clearance_margin_meters = read_optional_double_field(that_json, "occlusion_clearance_margin_meters", occlusion_clearance_margin_meters);
|
||||
}
|
||||
@@ -397,6 +402,13 @@ Psc::JSON Cesium_Graphics_Config::to_base_json() const {
|
||||
ret.append({"terrain_occlusion_enabled", terrain_occlusion_enabled});
|
||||
ret.append({"surface_navigation_reference_visible", surface_navigation_reference_visible});
|
||||
ret.append({"view_axes_visible", view_axes_visible});
|
||||
ret.append({"performance_panel_x", performance_panel_x});
|
||||
ret.append({"performance_panel_y", performance_panel_y});
|
||||
if (view_axes_panel_x >= 0.0) {
|
||||
ret.append({"view_axes_panel_x", view_axes_panel_x});
|
||||
}
|
||||
ret.append({"view_axes_panel_y", view_axes_panel_y});
|
||||
ret.append({"view_axes_panel_size", view_axes_panel_size});
|
||||
ret.append({"occlusion_sample_spacing_meters", occlusion_sample_spacing_meters});
|
||||
ret.append({"occlusion_clearance_margin_meters", occlusion_clearance_margin_meters});
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user