Skip to content
Discussion options

You must be logged in to vote

Yes, EdgeHolder needs to hold a pointer only because there are 3 possible segment classes. An EdgeHolder cannot hold a pointer to the same edge as another EdgeHolder. It is essentially a unique_ptr which also allows copying by performing a deep copy. Yes, it could be replaced by a union of the three types. (At one point I benchmarked this optimization and the performance difference was too small to justify breaking API compatibility since EdgeHolder is publicly exposed to users of MSDFgen as a library.)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gabe-lee
Comment options

Answer selected by gabe-lee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants