PhotometricWeb

Struct PhotometricWeb 

Source
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

Source

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.

Source

pub fn generate_ldc_vertices( &self, c_step: f64, g_step: f64, scale: f32, ) -> Vec<(f32, f32, f32)>

Generate just the vertex positions for the LDC solid.

Returns a vector of (x, y, z) tuples.

Source§

impl PhotometricWeb

Source

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.

Source

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

Source

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.

Source

pub fn max_intensity(&self) -> f64

Get the maximum intensity value.

Source

pub fn min_intensity(&self) -> f64

Get the minimum intensity value.

Source

pub fn symmetry(&self) -> Symmetry

Get the symmetry type.

Source

pub fn c_angles(&self) -> &[f64]

Get the stored C-plane angles.

Source

pub fn g_angles(&self) -> &[f64]

Get the stored gamma angles.

Trait Implementations§

Source§

impl Clone for PhotometricWeb

Source§

fn clone(&self) -> PhotometricWeb

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PhotometricWeb

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<&Eulumdat> for PhotometricWeb

Source§

fn from(ldt: &Eulumdat) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.