Commit graph

6 commits

Author SHA1 Message Date
Bruno BELANYI 05fb6601b2 library: use enum_dispatch on Object related trait
This allows for easier testing (notable allowing for comparisons),
better performance (thanks to inlining instead of vtable indirection),
and should ease the deserialization of `Material`, `Shape`, and
`Texture` traits. This should allow `Object` to be deserialized easily.
2020-03-18 15:24:09 +01:00
Bruno BELANYI 803b34641d library: material: uniform: add deserialization 2020-03-18 14:38:17 +01:00
Bruno BELANYI 9dcce9218f library: material: uniform: fix float comparison 2020-03-18 14:34:37 +01:00
Bruno BELANYI d8f5f880ec library: material: add reflectivity
This necessitates adding it to the trait, and its implementations.
2020-03-18 00:08:23 +01:00
Bruno BELANYI 7112873715 library: replace super::super by crate import
Done with the following shell command:
`sed -e 's/super::super/crate/' -i $(git grep -l super::super)`.

Followed by a `cargo fmt --all`.
2020-03-17 20:49:30 +01:00
Bruno BELANYI d785800bfe library: material: split Material into trait
The former `Material` type is now `UniformMaterial` and implements the
`Material` trait.
2020-03-17 19:29:05 +01:00