binary_raster
Binary raster crate for efficient pixel-based collision detection.
Bits are packed in usizes (= u64 on most machines) to make binary rasters both lightweight and fast.
Collision checking on a 800x400 raster takes ~1 μs on a Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz.
Example
Code
There are also methods to add rasters to each other, check out wordcloud-rs for a complete usage example.