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

Function getMeasurementColor

source/MRViewer/MRRenderMeasurementObjects.cpp:12–23  ·  view source on GitHub ↗

Returns the UI color for the measurement `object`.

Source from the content-addressed store, hash-verified

10
11// Returns the UI color for the measurement `object`.
12static Color getMeasurementColor( const VisualObject& object, ViewportId viewport )
13{
14 // If our parent is a feature and we're not selected, copy its color.
15 if ( !object.isSelected() )
16 {
17 if ( auto feature = dynamic_cast<const FeatureObject*>( object.parent() ) )
18 return feature->getFrontColor( feature->isSelected(), viewport );
19 }
20
21 // Otherwise use our own color.
22 return object.getFrontColor( object.isSelected(), viewport );
23}
24
25MR_REGISTER_RENDER_OBJECT_IMPL( PointMeasurementObject, RenderPointObject )
26RenderPointObject::RenderPointObject( const VisualObject& object )

Callers 1

renderUiMethod · 0.85

Calls 2

isSelectedMethod · 0.80
parentMethod · 0.45

Tested by

no test coverage detected