This project is read-only.

Is there an easy way to highlight (paint in a different color) a specific point or edge within the mesh?

Sep 1, 2017 at 8:49 PM
Edited Sep 1, 2017 at 8:50 PM
Hello!

I was wondering if there's an easy way (without major code changes) to highlight (change its color, for example) a specific point or edge within the mesh. I'm trying to achieve this whenever the user selects a point or edge from a list in my app.

Thanks in advance!
Sep 1, 2017 at 10:02 PM
Edited Sep 1, 2017 at 10:13 PM
There's no support for rendering selected mesh objects.

The whole rendering stuff isn't too well thought out. But still it should be fairly easy to implement: add a "selected objects" manager to IRenderContext and add a layer to the LayerRenderer, that draws the selection on top of the other layers.

Though you'd have to find clever way to do this effeciently (redrawing only the parts of the mesh that change during selection and deselection).

EDIT: or write your own IRenderer (taking the LayerRenderer implementation as a reference) and inject it to the RenderManager.

EDIT 2: thinking about it, the IRenderer Render() method should be virtual, so one could directly derive from LayerRenderer and override.