veloren/voxygen/src/hud
haslersn 1796c09ca1 common: Rework volume API
See the doc comments in `common/src/vol.rs` for more information on
the API itself.

The changes include:

* Consistent `Err`/`Error` naming.
  * Types are named `...Error`.
  * `enum` variants are named `...Err`.
* Rename `VolMap{2d, 3d}` -> `VolGrid{2d, 3d}`. This is in preparation
  to an upcoming change where a “map” in the game related sense will
  be added.
* Add volume iterators. There are two types of them:
  * _Position_ iterators obtained from the trait `IntoPosIterator`
    using the method
    `fn pos_iter(self, lower_bound: Vec3<i32>, upper_bound: Vec3<i32>) -> ...`
    which returns an iterator over `Vec3<i32>`.
  * _Volume_ iterators obtained from the trait `IntoVolIterator`
    using the method
    `fn vol_iter(self, lower_bound: Vec3<i32>, upper_bound: Vec3<i32>) -> ...`
    which returns an iterator over `(Vec3<i32>, &Self::Vox)`.
  Those traits will usually be implemented by references to volume
  types (i.e. `impl IntoVolIterator<'a> for &'a T` where `T` is some
  type which usually implements several volume traits, such as `Chunk`).
  * _Position_ iterators iterate over the positions valid for that
    volume.
  * _Volume_ iterators do the same but return not only the position
    but also the voxel at that position, in each iteration.
* Introduce trait `RectSizedVol` for the use case which we have with
  `Chonk`: A `Chonk` is sized only in x and y direction.
* Introduce traits `RasterableVol`, `RectRasterableVol`
  * `RasterableVol` represents a volume that is compile-time sized and has
    its lower bound at `(0, 0, 0)`. The name `RasterableVol` was chosen
    because such a volume can be used with `VolGrid3d`.
  * `RectRasterableVol` represents a volume that is compile-time sized at
    least in x and y direction and has its lower bound at `(0, 0, z)`.
    There's no requirement on he lower bound or size in z direction.
    The name `RectRasterableVol` was chosen because such a volume can be
    used with `VolGrid2d`.
2019-09-06 15:43:31 +02:00
..
bag.rs Rename activate_inventory_slot to use_inventory_slot 2019-08-30 22:46:45 +02:00
buttons.rs Part 1 of implementing the social window 2019-08-07 13:14:26 +00:00
character_window.rs Changed exp type from f64 to u32 and altered exp calculations and function signatures to adhere to the new types 2019-08-27 22:33:14 +00:00
chat.rs Don't add adjacent duplicates to the history 2019-09-02 01:07:16 -04:00
esc_menu.rs remove expects, warnings, code duplication 2019-07-07 16:16:06 +02:00
img_ids.rs Pixel art for axe and flying rod, shadow for zone names and death message 2019-09-05 17:28:33 +00:00
map.rs clean warnings from voxygen/hud 2019-07-02 21:25:07 +00:00
minimap.rs Pixel art for axe and flying rod, shadow for zone names and death message 2019-09-05 17:28:33 +00:00
mod.rs common: Rework volume API 2019-09-06 15:43:31 +02:00
quest.rs Part 1 of implementing the social window 2019-08-07 13:14:26 +00:00
settings_window.rs Revamp AudioFrontend 2019-09-05 03:08:09 -06:00
skillbar.rs Pixel art for axe and flying rod, shadow for zone names and death message 2019-09-05 17:28:33 +00:00
social.rs Part 1 of implementing the social window 2019-08-07 13:14:26 +00:00
spell.rs Part 1 of implementing the social window 2019-08-07 13:14:26 +00:00