pub enum Source {
Isotropic {
position: Point3<f64>,
flux_lm: f64,
},
Lambertian {
position: Point3<f64>,
normal: Unit<Vector3<f64>>,
flux_lm: f64,
},
Led {
position: Point3<f64>,
direction: Unit<Vector3<f64>>,
half_angle_deg: f64,
flux_lm: f64,
},
LineSource {
start: Point3<f64>,
end: Point3<f64>,
normal: Unit<Vector3<f64>>,
half_angle_deg: f64,
flux_lm: f64,
},
AreaSource {
center: Point3<f64>,
normal: Unit<Vector3<f64>>,
u_axis: Unit<Vector3<f64>>,
half_width: f64,
half_height: f64,
flux_lm: f64,
},
FromLvk {
position: Point3<f64>,
orientation: Rotation3<f64>,
eulumdat: Box<Eulumdat>,
flux_lm: f64,
cdf: LvkCdf,
},
}Expand description
Light source types for photon emission.
Variants§
Isotropic
Uniform emission in all directions (4pi steradians).
Lambertian
Cosine-weighted hemisphere (ideal diffuse emitter).
Led
Directional LED with beam angle.
LineSource
Line source (LED strip) — samples random point along segment.
Fields
AreaSource
Rectangular diffuse area emitter (Lambertian).
Emits cosine-weighted into the hemisphere defined by normal.
Position is sampled uniformly over the rectangle.
Fields
FromLvk
Emit according to an existing LDT/IES distribution (for validation).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Source
impl RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnsafeUnpin for Source
impl UnwindSafe for Source
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.