PistonDevelopers / geometry

A structure for storing and look up 3D geometry
MIT License
6 stars 2 forks source link

Generalize range hierarchy with a trait #3

Open bvssvni opened 9 years ago

bvssvni commented 9 years ago

The basic idea is that Vec<T> points to Vec<U> where T is a range. Could use https://github.com/pistondevelopers/range

To make it type safe, the Range struct can be wrapped in a type that implements a trait Parent with an associated type set to U. Generic algorithms can then be written to operate on the relationship between parent and children. This could be added to piston-range.