mosra / magnum

Lightweight and modular C++11 graphics middleware for games and data visualization
https://magnum.graphics/
Other
4.8k stars 440 forks source link

[Feature Request] Signed Distance Field (SDF) primitives #398

Open ttnghia opened 4 years ago

ttnghia commented 4 years ago

@mosra, I think Signed Distance Field (SDF) primitives are very useful in graphics, so it is great if magnum has them.

I have implemented some classes for SDF, and used them here: https://ttnghia.github.io/portfolio/tool-particle-sampling-with-sph-relaxation/

The code is here and here.

If you can adopt my work, it's great. Otherwise, if you like, I can rework it and submit a MR sometime later.

mosra commented 4 years ago

Yay! If you want to contribute these, I'd be happy to have them. As I said on #399, this could happily live in the extras repository, but definitely needs docs and testing :)

ttnghia commented 4 years ago

Yah. Porting it to magnum is easy and fast, but doc and test are not 😄 I'll do that. There will be an associated example too. ETA is not predictable for now.