oxedyne/fe2o3/fe2o3_geom/src/lib.rs
1.3 KiB, 15 runs
created by r1870400018:333, which is this file's identity for as long as the history lasts, whatever it is later renamed to
download · who wrote it · its history
| 1 | //! A geometry library: 2D layout and positioning, planar construction, and the sphere. |
| 2 | //! |
| 3 | //! On the sphere, `cell` is a global cell-index grid, `proj` holds map projections and a |
| 4 | //! viewport that draws clipped rings on a flat map or a globe, and `world` is an offline world |
| 5 | //! map with the simplifier that makes one. `tile` is the Web Mercator tile grid with a |
| 6 | //! PMTiles reader, and `mvt` decodes the vector tiles street maps arrive in. |
| 7 | //! |
| 8 | //! The layout types focus on rectangles with absolute and relative positioning support, |
| 9 | //! making them suitable for UI layout systems. Key features include: |
| 10 | //! |
| 11 | //! - Dimension types with saturating arithmetic for safe calculations |
| 12 | //! - Coordinate system with zero-based positioning |
| 13 | //! - Rectangle types supporting both absolute and relative positioning |
| 14 | //! - Flexible dimension system for fluid layouts |
| 15 | //! - Clipping and intersection support |
| 16 | //! - Position enums for common alignment scenarios (top-left, centre, etc.) |
| 17 | //! |
| 18 | //! The crate is particularly useful for: |
| 19 | //! - Terminal user interfaces |
| 20 | //! - Widget layout systems |
| 21 | //! - Window management |
| 22 | //! - Any application requiring 2D layout calculation |
| 23 | //! |
| 24 | #![forbid(unsafe_code)] |
| 25 | pub mod cell; |
| 26 | pub mod dim; |
| 27 | pub mod mvt; |
| 28 | pub mod planar; |
| 29 | pub mod proj; |
| 30 | pub mod rect; |
| 31 | pub mod rigid; |
| 32 | pub mod shape; |
| 33 | pub mod tile; |
| 34 | pub mod world; |