MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / make_visualize_checkbox

Method make_visualize_checkbox

source/MRViewer/ImGuiMenu.cpp:2937–2952  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2935}
2936
2937bool ImGuiMenu::make_visualize_checkbox( std::vector<std::shared_ptr<VisualObject>> selectedVisualObjs, const char* label, AnyVisualizeMaskEnum type, MR::ViewportMask viewportid, bool invert /*= false*/ )
2938{
2939 auto realRes = getRealValue( selectedVisualObjs, type, viewportid, invert );
2940 bool checked = realRes.first;
2941 const bool res = UI::checkboxMixed( label, &checked, !realRes.second && realRes.first );
2942 if ( checked != realRes.first )
2943 {
2944 if ( invert )
2945 checked = !checked;
2946 for ( const auto& data : selectedVisualObjs )
2947 if ( data )
2948 data->setVisualizeProperty( checked, type, viewportid );
2949 }
2950
2951 return res;
2952}
2953
2954template<typename ObjectT>
2955void ImGuiMenu::make_color_selector( std::vector<std::shared_ptr<ObjectT>> selectedVisualObjs, const char* label,

Callers

nothing calls this directly

Calls 3

getRealValueFunction · 0.85
checkboxMixedFunction · 0.85
setVisualizePropertyMethod · 0.80

Tested by

no test coverage detected