Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INativeDisposable and Triangle Filter #325

Open
Bodyclock-Games opened this issue Feb 8, 2025 · 1 comment
Open

INativeDisposable and Triangle Filter #325

Bodyclock-Games opened this issue Feb 8, 2025 · 1 comment

Comments

@Bodyclock-Games
Copy link

Bodyclock-Games commented Feb 8, 2025

Hi Andy, thanks very much for your work. I'm using BurstTriangulator as the foundation of procedural level system for Unity using a Node/Edge based Graph. All working great so far. Just a couple of thoughts I've had while working with it.
As I do a lot of post-processing and would like to chain the triangulator in the middle of a series of steps, I need to Dispose of it in the chain. So it would be very useful if it implemented INativeDisposable instead of just IDisposable. It's not difficult to implement so I've done it myself, but it would be good to have it in the base code.
The other point is : I use a set of initial points based on Poisson Disc Sampling. so the data is very clean but the narrow triangles created by the hull become problematic for my use case. I solved it by processing each triangle and halfedge and removing the ones that failed an angle threshold test. In my case if any triangle had any angle under 20 degrees it was removed. This obviously works for me because of regular spacing of the Poisson sampling. I wondered if it might be a useful addition to BurstTriangulator.
Thanks also for the Remove Safety Checks option, increased the performance by an order of magnitude.
Great job and thanks again.
Cheers
Chris

@andywiecko
Copy link
Owner

Hi @Bodyclock-Games
Thanks for the issue!

thanks very much for your work.

You're welcome! I'm glad the community is finding the package useful🙂

... So it would be very useful if it implemented INativeDisposable instead of just IDisposable. It's not difficult to implement so I've done it myself, but it would be good to have it in the base code.

Great idea! Would you be interested in opening a pull request with these changes? I've added this to the project board, and it will be included in a future release. Your requirement for INativeDisposable suggests to me that you're using the package for some custom logic. Are you familiar with the UnsafeTriangulator API?

The other point is : ...

I'm open to enhancing the package, but you may need to elaborate on this feature a bit more. We can discuss it further here.

Best,
Andrzej

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants