EliCDavis / polyform

Immutable mesh processing library
https://elicdavis.gitbook.io/polyform/
MIT License
79 stars 6 forks source link

Node-based Approach to Generator #20

Closed EliCDavis closed 8 months ago

EliCDavis commented 11 months ago

Right now, it's hard to define a generator hierarchy that doesn't lead to certain generators doing unneeded repetitive work when certain variables change.

To be as fine-grained as possible to avoid such rework, we need to swap to a node-based approach, where each node explicitly defines its inputs and outputs as pointer references to other nodes. Then changes to one input node can easily be propagated to the rest of the graph.

Also opens up the opportunity for the generator to automatically prune un-used nodes. I think all that would be defined on the app level would be the output nodes, then we'd recurse through their references to get everything needed.

Things to figure out:

EliCDavis commented 8 months ago

Completed