Is there something like React for C++ 3D programming?



  • I guess there isn't.

    I'm displaying a polygon in our inhouse built 3D engine. Vertices are represented as spheres and edges as tubes. The user can manipulate each vertex or add new ones.

    The polygon is represented first as a pure mathematical object, a list of vertices. Then we need to translate this to the 3D engine's scene graph representation. If I had to just delete and rebuild the polygon on every modification that would be easy. Unfortunately that would be expensive so on every user action I have to modify from the current state.

    Additional state has to be kept in sync based on given rules, such as: the currently user-selected vertex has to be a different color, if the polygon is uniplanar then we fill its area with another material, sometimes we need to highlight angles, but do right angles differently, some lines are dashed but not others, etc. And do everything right on every user modification.

    Now if the displaying technology was HTML, I'd write a unidirectional mapping from model to view, and let React or some other framework figure out the smart diffing so that there are no unnecessary rebuilds. Have you heard of anything similar for this usecase?



  • @marczellm


Log in to reply