Skip to main content

polyscope_core/
lib.rs

1//! Core abstractions for polyscope-rs.
2//!
3//! This crate provides the fundamental traits and types used throughout polyscope-rs:
4//! - [`Structure`] trait for geometric objects (meshes, point clouds, etc.)
5//! - [`Quantity`] trait for data associated with structures (scalars, vectors, colors)
6//! - Global state management and structure registry
7//! - Configuration options and persistent values
8
9// Documentation lints: Detailed error/panic docs will be added as the API stabilizes.
10#![allow(clippy::missing_errors_doc)]
11#![allow(clippy::missing_panics_doc)]
12// Struct design: Options and configuration structs naturally have many boolean fields
13// and field names may include the struct name for clarity.
14#![allow(clippy::struct_excessive_bools)]
15#![allow(clippy::struct_field_names)]
16
17pub mod error;
18pub mod gizmo;
19pub mod ground_plane;
20pub mod group;
21pub mod marching_cubes;
22pub mod options;
23pub mod pick;
24pub mod quantity;
25pub mod registry;
26pub mod slice_plane;
27pub mod ssao;
28pub mod state;
29pub mod structure;
30pub mod tone_mapping;
31
32pub use error::{PolyscopeError, Result};
33pub use gizmo::{GizmoAxis, GizmoConfig, GizmoMode, GizmoSpace, GizmoUniforms, Transform};
34pub use ground_plane::{GroundPlaneConfig, GroundPlaneMode};
35pub use group::Group;
36pub use marching_cubes::{McmMesh, marching_cubes};
37pub use options::Options;
38pub use pick::{PickResult, Pickable};
39pub use quantity::{Quantity, QuantityKind};
40pub use registry::Registry;
41pub use slice_plane::{MAX_SLICE_PLANES, SlicePlane, SlicePlaneUniforms};
42pub use ssao::SsaoConfig;
43pub use state::{Context, MaterialLoadRequest, with_context, with_context_mut};
44pub use structure::{HasQuantities, Structure};
45pub use tone_mapping::ToneMappingConfig;
46
47// Re-export glam types for convenience
48pub use glam::{Mat4, Vec2, Vec3, Vec4};