boostvoronoi/
lib.rs

1#![deny(
2    rust_2018_compatibility,
3    rust_2018_idioms,
4    nonstandard_style,
5    unused,
6    future_incompatible,
7    non_camel_case_types,
8    unused_parens,
9    non_upper_case_globals,
10    unused_qualifications,
11    unused_results,
12    unused_imports,
13    unused_variables,
14    bare_trait_objects,
15    ellipsis_inclusive_range_patterns,
16    elided_lifetimes_in_paths
17)]
18#![doc(issue_tracker_base_url = "https://github.com/eadf/boostvoronoi.rs/issues")]
19
20//! The `boostvoronoi` Rust library provides functionality to construct a Voronoi diagram of a set
21//! of points and linear segments in 2D space with the following set of limitations:
22//!
23//! * Coordinates of the input points and endpoints of the input segments should have integral type.
24//!   The `i32` and `i64` data types are supported by the default implementation.
25//!
26//! * Input points and segments should not overlap except their endpoints.
27//!   This means that input point should not lie inside the input segment and input segments
28//!   should not intersect except their endpoints.
29//!
30//! This library is a port of the C++ boost voronoi implementation
31//! <https://www.boost.org/doc/libs/1_76_0/libs/polygon/doc/voronoi_main.htm>
32
33#[doc(hidden)]
34pub mod prelude {
35    pub use boostvoronoi_core::builder::Builder;
36    pub use boostvoronoi_core::diagram::{
37        Cell, CellIndex, ColorType, Diagram, Edge, EdgeIndex, Vertex, VertexIndex,
38    };
39    pub use boostvoronoi_core::geometry::*;
40    pub use boostvoronoi_core::{cast, try_cast, BvError, InputType, OutputType};
41}
42
43pub use boostvoronoi_core::builder::Builder;
44pub use boostvoronoi_core::diagram::{
45    Cell, CellIndex, ColorType, Diagram, Edge, EdgeIndex, SourceCategory, SourceIndex, Vertex,
46    VertexIndex,
47};
48pub use boostvoronoi_core::file_reader::{read_boost_input_buffer, read_boost_input_file};
49pub use boostvoronoi_core::geometry::*;
50pub use boostvoronoi_core::sync_diagram::SyncDiagram;
51pub use boostvoronoi_core::visual_utils::*;
52pub use boostvoronoi_core::{cast, try_cast, BvError, InputType, OutputType};
53
54#[cfg(feature = "cgmath")]
55// Allowing integration tests access to `cgmath` without needing to add `cgmath` to dev-dependencies.
56pub use boostvoronoi_core::cgmath;
57
58#[cfg(feature = "mint")]
59// Allowing integration tests access to `mint` without needing to add `mint` to dev-dependencies.
60pub use boostvoronoi_core::mint;
61
62#[cfg(feature = "geo")]
63// Allowing integration tests access to `geo` without needing to add `geo` to dev-dependencies.
64pub use boostvoronoi_core::geo;
65
66#[cfg(feature = "glam")]
67// Allowing integration tests access to `glam` without needing to add `glam` to dev-dependencies.
68pub use boostvoronoi_core::glam;