Bevy-Rust-GPU / rust-gpu-sdf

Signed distance field library usable on both CPU and GPU.
Apache License 2.0
12 stars 1 forks source link

Investigate `Box<dyn Trait>` impls for traits #19

Closed Shfty closed 1 year ago

Shfty commented 1 year ago

In theory, this should enable easier runtime editing of SDFs by allowing inner types to be swapped out for another Box<dyn Trait>.

Shfty commented 1 year ago

Done, though the result will be restricted to swapping between Box<dyn Trait>s that share type parameters.

Will have to see how this works out, since the trait params in question are input / output types, which may even be helpful. If more generality is needed, may need to look into type erasure via wrappers.