I don't know if this is the case here, but if you're trying to highlight subshapes..
SetSelectionStyle(highlightStyle)
is a shortcut for calling SetHighlightStyle(Prs3d_TypeOfHighlight_Selected, highlightStyle)
SetHighlightStyle(highlightStyle)
is shortcut for calling SetHighlightStyle(Prs3d_TypeOfHighlight_Dynamic, highlightStyle)
.
As per the docs @ https://dev.opencascade.org/doc/refman/html/_prs3d___type_of_highlight_8hxx.html
we have 4 interesting values:
Prs3d_TypeOfHighlight_Selected
: entire object is selected
Prs3d_TypeOfHighlight_Dynamic
: entire object is dynamically highlighted
Prs3d_TypeOfHighlight_LocalSelected
: part of the object is selected
Prs3d_TypeOfHighlight_LocalDynamic
: part of the object is dynamically highlighted
Therefore if you're trying to change the appearance of subshapes in objects, you need to call
Handle(Prs3d_Drawer) highlightStyle = new Prs3d_Drawer();
HighlightStyle->SetColor(Quantity_NOC_YELLOW);
m_Context->SetHighlightStyle(Prs3d_TypeOfHighlight_LocalSelected, highlightStyle);
m_Context->SetHighlightStyle(Prs3d_TypeOfHighlight_LocalDynamic, highlightStyle);