bfops / playform

Voxel sandbox project in Rust
http://playformdev.blogspot.ca/
MIT License
212 stars 24 forks source link

Rethink fields, mosaics, and brushes #154

Closed bfops closed 9 years ago

bfops commented 9 years ago

Fields, mosaics, and brushes are all closely related, and some sharing is done. But the distinctions between them seem foggy and a little artificial, and some operations (e.g. union, translation, and rotation) make sense for more than one of these things.

A brush should really just be a mosaic with attached bounds.

The only real reason to separate fields and mosaics right now is because of the intersection operation - it makes sense for fields, but not when there are materials involved. But we could just say that every field is a material field, and that intersection is ill-defined when the materials of the components differ.

bfops commented 9 years ago

9f97e9f33c7c924e55ef771c2063c65048370f95 adds some cleanups (in particular, a brush is a mosaic with bounds).

bfops commented 9 years ago

I think some functions (e.g. translate) might just need to be implemented for both mosaics and fields. Nothing wrong with that.

voxel::field::transformation would be excellent - it could stack repeated translations and rotations in finite space.