eulumdat_photweb/lib.rs
1//! # eulumdat-photweb
2//!
3//! Photometric web representation and sampling for EULUMDAT/IES photometric data.
4//!
5//! This crate provides a `PhotometricWeb` structure that represents the full 3D
6//! luminous intensity distribution of a light source. It supports:
7//!
8//! - **Sampling**: Get intensity at any C/G angle with bilinear interpolation
9//! - **Normalization**: Sample normalized (0.0-1.0) intensity values
10//! - **Symmetry handling**: Automatic expansion based on symmetry type
11//! - **Mesh generation**: Generate 3D LDC solid geometry (coming soon)
12//!
13//! ## Quick Start
14//!
15//! ```rust,no_run
16//! use eulumdat::Eulumdat;
17//! use eulumdat_photweb::PhotometricWeb;
18//!
19//! let ldt = Eulumdat::from_file("luminaire.ldt")?;
20//! let web = PhotometricWeb::from(&ldt);
21//!
22//! // Sample at any angle
23//! let intensity = web.sample(45.0, 30.0);
24//! let normalized = web.sample_normalized(45.0, 30.0);
25//!
26//! // Generate mesh vertices for 3D visualization
27//! let vertices = web.generate_ldc_vertices(5.0, 5.0, 1.0);
28//! # Ok::<(), Box<dyn std::error::Error>>(())
29//! ```
30
31mod mesh;
32mod photweb;
33
34pub use mesh::{hsl_to_rgb, Color, ColorMode, ColoredLdcMesh, LdcMesh, Vertex};
35pub use photweb::PhotometricWeb;