pub struct PhotometricWeb { /* private fields */ }Expand description
A photometric web representing the full 3D luminous intensity distribution.
This structure provides efficient sampling of intensity values at any C-plane and gamma angle, handling symmetry automatically.
Implementations§
Source§impl PhotometricWeb
impl PhotometricWeb
Sourcepub fn generate_ldc_mesh(&self, c_step: f64, g_step: f64, scale: f32) -> LdcMesh
pub fn generate_ldc_mesh(&self, c_step: f64, g_step: f64, scale: f32) -> LdcMesh
Generate LDC solid mesh vertices.
Convenience method that creates an LdcMesh.
Sourcepub fn generate_colored_ldc_mesh(
&self,
c_step: f64,
g_step: f64,
scale: f32,
color_mode: ColorMode,
) -> ColoredLdcMesh
pub fn generate_colored_ldc_mesh( &self, c_step: f64, g_step: f64, scale: f32, color_mode: ColorMode, ) -> ColoredLdcMesh
Generate a colored LDC solid mesh.
Convenience method that creates a ColoredLdcMesh with positions, normals, colors, and indices.
Source§impl PhotometricWeb
impl PhotometricWeb
Sourcepub fn new(
c_angles: Vec<f64>,
g_angles: Vec<f64>,
intensities: Vec<Vec<f64>>,
symmetry: Symmetry,
) -> Self
pub fn new( c_angles: Vec<f64>, g_angles: Vec<f64>, intensities: Vec<Vec<f64>>, symmetry: Symmetry, ) -> Self
Create a new PhotometricWeb from raw data.
Sourcepub fn sample(&self, c_angle: f64, g_angle: f64) -> f64
pub fn sample(&self, c_angle: f64, g_angle: f64) -> f64
Sample intensity at any C and G angle using bilinear interpolation.
Handles symmetry automatically - you can query any angle in the full 0-360° C range and 0-180° G range regardless of stored symmetry.
§Arguments
c_angle- C-plane angle in degrees (will be normalized to 0-360)g_angle- Gamma angle in degrees (will be clamped to 0-180)
§Returns
Intensity in cd/klm
Sourcepub fn sample_normalized(&self, c_angle: f64, g_angle: f64) -> f64
pub fn sample_normalized(&self, c_angle: f64, g_angle: f64) -> f64
Sample normalized intensity (0.0 to 1.0) at any C and G angle.
This is useful for mesh generation where you want distances scaled relative to the maximum intensity.
Sourcepub fn max_intensity(&self) -> f64
pub fn max_intensity(&self) -> f64
Get the maximum intensity value.
Sourcepub fn min_intensity(&self) -> f64
pub fn min_intensity(&self) -> f64
Get the minimum intensity value.
Trait Implementations§
Source§impl Clone for PhotometricWeb
impl Clone for PhotometricWeb
Source§fn clone(&self) -> PhotometricWeb
fn clone(&self) -> PhotometricWeb
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more