|
| 1 | +//! # honeycomb |
| 2 | +//! |
| 3 | +//! Honeycomb aims to provide a safe, efficient and scalable implementation of combinatorial maps |
| 4 | +//! for meshing applications. More specifically, the goal is to converge towards a (or multiple) |
| 5 | +//! structure(s) adapted to algorithms exploiting GPU and many-core architectures. |
| 6 | +//! |
| 7 | +//! ## Structure |
| 8 | +//! |
| 9 | +//! This crate acts as the user-facing API, re-exporting components and items implemented in the |
| 10 | +//! following sub-crates: |
| 11 | +//! |
| 12 | +//! - `honeycomb_core` -- core structures implementations |
| 13 | +//! - `honeycomb_kernels` -- algorithm implementations |
| 14 | +//! - `honeycomb_render` -- visual debugging tool |
| 15 | +//! |
| 16 | +//! ## Features |
| 17 | +//! |
| 18 | +//! Two features can be enabled to control which implementations are exposed: |
| 19 | +//! |
| 20 | +//! - `kernels` -- content from the `honeycomb_kernels` crate |
| 21 | +//! - `render` -- content from the `honeycomb_render` crate |
| 22 | +//! |
| 23 | +//! Note that: |
| 24 | +//! - the `kernels` feature is enabled by default since it does not require any more dependencies |
| 25 | +//! than the core crate. |
| 26 | +//! - the `render` feature is disabled by default; enabling it significantly lengthen the |
| 27 | +//! dependency tree as well as the compilation time. |
| 28 | +//! |
| 29 | +//! ## Quickstart |
| 30 | +//! |
| 31 | +//! For usage examples, refer to examples hosted in the repository; there also are documentation |
| 32 | +//! examples for important items: |
| 33 | +//! |
| 34 | +//! - [`CMap2`][honeycomb_core::cmap::CMap2] |
| 35 | +//! - [`CMapBuilder`][honeycomb_core::cmap::CMapBuilder] |
| 36 | +//! - [`grisubal`][`honeycomb_kernels::grisubal`] |
| 37 | +
|
| 38 | +// --- enable doc_auto_cfg feature if compiling in nightly |
| 39 | +#![allow(unexpected_cfgs)] |
| 40 | +#![cfg_attr(nightly, feature(doc_auto_cfg))] |
| 41 | + |
| 42 | +pub use honeycomb_core as core; |
| 43 | + |
| 44 | +#[cfg(feature = "kernels")] |
| 45 | +pub use honeycomb_kernels as kernels; |
| 46 | + |
| 47 | +#[cfg(feature = "render")] |
| 48 | +pub use honeycomb_render as render; |
| 49 | + |
| 50 | +/// commonly used items |
| 51 | +/// |
| 52 | +/// This module contains all items commonly used to write a program using combinatorial maps. |
| 53 | +/// These items are re-exported from their original crates for ease of use and should cover |
| 54 | +/// all basic use cases. |
| 55 | +pub mod prelude { |
| 56 | + // ------ CORE RE-EXPORTS |
| 57 | + |
| 58 | + pub use honeycomb_core::attributes::{AttributeBind, AttributeUpdate}; |
| 59 | + pub use honeycomb_core::cmap::{ |
| 60 | + BuilderError, CMap2, CMapBuilder, CMapError, DartIdentifier, EdgeIdentifier, |
| 61 | + FaceIdentifier, GridDescriptor, Orbit2, OrbitPolicy, VertexIdentifier, VolumeIdentifier, |
| 62 | + NULL_DART_ID, NULL_EDGE_ID, NULL_FACE_ID, NULL_VERTEX_ID, NULL_VOLUME_ID, |
| 63 | + }; |
| 64 | + pub use honeycomb_core::geometry::{CoordsError, CoordsFloat, Vector2, Vertex2}; |
| 65 | + |
| 66 | + // ------ KERNELS RE-EXPORTS |
| 67 | + |
| 68 | + #[cfg(feature = "kernels")] |
| 69 | + pub use honeycomb_kernels::grisubal; |
| 70 | + |
| 71 | + // ------ RENDER RE-EXPORTS |
| 72 | + |
| 73 | + #[cfg(feature = "render")] |
| 74 | + pub use honeycomb_render::App; |
| 75 | +} |
0 commit comments