pub struct LightSourcePositional<'m, 's> { /* private fields */ }Expand description
Borrowed projection of IfcLightSourcePositional: a point light with a
quadratic distance-attenuation law.
The three attenuation coefficients are plain IfcReal in every bundled
schema – unbounded and unsigned – so they are returned verbatim. IFC
inherits the law from ISO/IEC 14772-1 (VRML): attenuation at distance d
is 1 / max(c + l*d + q*d*d, 1). This crate does not evaluate it; clamping
and unit policy belong to whatever renders the light.
Implementations§
Source§impl<'m, 's> LightSourcePositional<'m, 's>
impl<'m, 's> LightSourcePositional<'m, 's>
Sourcepub fn light_source(&self) -> LightSource<'m, 's>
pub fn light_source(&self) -> LightSource<'m, 's>
The inherited IfcLightSource colour and intensity attributes.
Sourcepub fn position(&self) -> StyleResult<EntityId>
pub fn position(&self) -> StyleResult<EntityId>
The Position attribute: a mandatory IfcCartesianPoint reference.
Note the asymmetry with IfcLightSourceGoniometric, which uses a full
IfcAxis2Placement3D: a positional light is rotationally symmetric, so
the schema gives it a bare point and no axes.
Sourcepub fn radius(&self) -> StyleResult<f64>
pub fn radius(&self) -> StyleResult<f64>
The Radius attribute, an IfcPositiveLengthMeasure.
Reported in the file’s own length unit. This crate does not resolve
IfcUnitAssignment; scaling is the caller’s job, as it is for every
other length this crate touches.
Sourcepub fn constant_attenuation(&self) -> StyleResult<f64>
pub fn constant_attenuation(&self) -> StyleResult<f64>
The ConstantAttenuation coefficient.
Sourcepub fn distance_attenuation(&self) -> StyleResult<f64>
pub fn distance_attenuation(&self) -> StyleResult<f64>
The DistanceAttenuation (linear) coefficient.
Sourcepub fn quadric_attenuation(&self) -> StyleResult<f64>
pub fn quadric_attenuation(&self) -> StyleResult<f64>
The QuadricAttenuation (quadratic) coefficient.