Open milibopp opened 9 years ago
It looks like this requires some kind of HKT, which (luckily) can be emulated with associated types. However, there is some issue resolving self-referential trait bounds, which are also required. I started working on this on a branch.
Note, that this can only be thought of as a workaround until Rust gains HKT and will therefore have to be changed at some point. It may be possible to do this backwards-compatibly, while deprecating the hacky bits of it.
Both the
Partition
trait and the structsTree
andPureTree
could benefit from not being specialized toVec
as a container type for subdivision/branching. Some obvious types to use are[T; 2]
,[T; 4]
and[T; 8]
. The cube map partition could use a specialized hybrid container type that can hold either six (dividing the top-level sphere) or four elements (the per-side quad trees). This would also enable using lazy structures such as iterators or any kind of lazily initialized container/sequence.