Skip to main content

polyscope_structures/
lib.rs

1//! Structure implementations for polyscope-rs.
2//!
3//! This crate provides concrete implementations of geometric structures:
4//! - Point clouds
5//! - Surface meshes (triangles, polygons)
6//! - Curve networks
7//! - Volume meshes (tetrahedra, hexahedra)
8//! - Volume grids (implicit surfaces)
9//! - Camera views
10
11// Type casts in geometry code: Conversions between index types (u32, usize) and
12// coordinate types (f32, f64) are intentional. Mesh indices and vertex counts
13// will not exceed u32::MAX in practice for 3D visualization.
14#![allow(clippy::cast_possible_truncation)]
15#![allow(clippy::cast_sign_loss)]
16#![allow(clippy::cast_precision_loss)]
17#![allow(clippy::cast_possible_wrap)]
18// Documentation lints: Detailed error/panic docs will be added as the API stabilizes.
19#![allow(clippy::missing_errors_doc)]
20#![allow(clippy::missing_panics_doc)]
21// Method design: Some methods take &self for API consistency even when not using it.
22#![allow(clippy::unused_self)]
23// Struct design: Configuration structs may have many boolean fields.
24#![allow(clippy::struct_excessive_bools)]
25// Variable naming: In geometry code, similar variable names are common.
26#![allow(clippy::similar_names)]
27// Argument design: Some functions take ownership for API consistency.
28#![allow(clippy::needless_pass_by_value)]
29// Function signatures: Some geometry operations need many parameters.
30#![allow(clippy::too_many_arguments)]
31// Code style: Sometimes if-let-else is clearer than let-else.
32#![allow(clippy::option_if_let_else)]
33// Lifetimes: Some patterns require explicit lifetimes for clarity.
34#![allow(clippy::needless_lifetimes)]
35// Function length: Complex geometry operations are legitimately complex.
36#![allow(clippy::too_many_lines)]
37
38pub mod camera_view;
39pub mod curve_network;
40pub mod floating;
41pub mod point_cloud;
42pub mod surface_mesh;
43pub mod volume_grid;
44pub mod volume_mesh;
45
46pub use camera_view::{CameraExtrinsics, CameraIntrinsics, CameraParameters, CameraView};
47pub use curve_network::CurveNetwork;
48pub use floating::{
49    FloatingColorImage, FloatingColorRenderImage, FloatingDepthRenderImage, FloatingRawColorImage,
50    FloatingScalarImage, ImageOrigin,
51};
52pub use point_cloud::PointCloud;
53pub use surface_mesh::SurfaceMesh;
54pub use volume_grid::VolumeGrid;
55pub use volume_mesh::{VolumeCellType, VolumeMesh};