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
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
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PhotometricWeb
impl Debug for PhotometricWeb
Auto Trait Implementations§
impl Freeze for PhotometricWeb
impl RefUnwindSafe for PhotometricWeb
impl Send for PhotometricWeb
impl Sync for PhotometricWeb
impl Unpin for PhotometricWeb
impl UnwindSafe for PhotometricWeb
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more