pub struct LightSource<'m, 's> { /* private fields */ }Expand description
Borrowed projection of IfcLightSource: the colour and intensity every
light shares, independent of how it is positioned or aimed.
AmbientIntensity and Intensity are both OPTIONAL in all three bundled
schemas. An absent value is reported as None, never defaulted to 1.0:
choosing a fallback is a renderer policy, and inventing one here would make
an unauthored file indistinguishable from one that authored full intensity.
Implementations§
Source§impl<'m, 's> LightSource<'m, 's>
impl<'m, 's> LightSource<'m, 's>
Sourcepub fn kind(&self) -> StyleResult<LightSourceKind>
pub fn kind(&self) -> StyleResult<LightSourceKind>
The concrete subtype this entity declares.
Sourcepub fn name(&self) -> StyleResult<Option<&'m str>>
pub fn name(&self) -> StyleResult<Option<&'m str>>
The Name attribute, when authored.
Sourcepub fn light_colour(&self) -> StyleResult<EntityId>
pub fn light_colour(&self) -> StyleResult<EntityId>
The LightColour attribute: a mandatory IfcColourRgb reference.
Sourcepub fn ambient_intensity(&self) -> StyleResult<Option<f64>>
pub fn ambient_intensity(&self) -> StyleResult<Option<f64>>
The AmbientIntensity attribute, normalized to [0, 1] when authored.
Sourcepub fn intensity(&self) -> StyleResult<Option<f64>>
pub fn intensity(&self) -> StyleResult<Option<f64>>
The Intensity attribute, normalized to [0, 1] when authored.
Trait Implementations§
Source§impl<'m, 's> Clone for LightSource<'m, 's>
impl<'m, 's> Clone for LightSource<'m, 's>
impl<'m, 's> Copy for LightSource<'m, 's>
Auto Trait Implementations§
impl<'m, 's> !RefUnwindSafe for LightSource<'m, 's>
impl<'m, 's> !UnwindSafe for LightSource<'m, 's>
impl<'m, 's> Freeze for LightSource<'m, 's>
impl<'m, 's> Send for LightSource<'m, 's>
impl<'m, 's> Sync for LightSource<'m, 's>
impl<'m, 's> Unpin for LightSource<'m, 's>
impl<'m, 's> UnsafeUnpin for LightSource<'m, 's>
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