#[non_exhaustive]pub struct SurfaceStyleRenderingDraft {
pub surface_colour: EntityId,
pub transparency: Option<f64>,
pub diffuse: Option<ColourOrFactor>,
pub transmission: Option<ColourOrFactor>,
pub diffuse_transmission: Option<ColourOrFactor>,
pub reflection: Option<ColourOrFactor>,
pub specular: Option<ColourOrFactor>,
pub reflectance_method: &'static str,
}Expand description
Authored fields for an IfcSurfaceStyleRendering.
The rendering form extends the shading form with the parameters a
renderer needs. Every colour slot is an IfcColourOrFactor, so a
caller states either an explicit colour or a factor of the surface
colour – the two are not interchangeable and the schema keeps both.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.surface_colour: EntityIdSurfaceColour, an IfcColourRgb.
transparency: Option<f64>Transparency, a normalised ratio.
diffuse: Option<ColourOrFactor>DiffuseColour.
transmission: Option<ColourOrFactor>TransmissionColour.
diffuse_transmission: Option<ColourOrFactor>DiffuseTransmissionColour.
reflection: Option<ColourOrFactor>ReflectionColour.
specular: Option<ColourOrFactor>SpecularColour.
reflectance_method: &'static strReflectanceMethod, an IfcReflectanceMethodEnum token.
Implementations§
Source§impl SurfaceStyleRenderingDraft
impl SurfaceStyleRenderingDraft
Sourcepub fn new(surface_colour: EntityId, reflectance_method: &'static str) -> Self
pub fn new(surface_colour: EntityId, reflectance_method: &'static str) -> Self
Starts a draft from its required surface_colour, reflectance_method;
every other field is unset.
Sourcepub fn transparency(self, value: f64) -> Self
pub fn transparency(self, value: f64) -> Self
Sets transparency.
Transparency, a normalised ratio.
Sourcepub fn diffuse(self, value: ColourOrFactor) -> Self
pub fn diffuse(self, value: ColourOrFactor) -> Self
Sets diffuse.
DiffuseColour.
Sourcepub fn transmission(self, value: ColourOrFactor) -> Self
pub fn transmission(self, value: ColourOrFactor) -> Self
Sets transmission.
TransmissionColour.
Sourcepub fn diffuse_transmission(self, value: ColourOrFactor) -> Self
pub fn diffuse_transmission(self, value: ColourOrFactor) -> Self
Sets diffuse_transmission.
DiffuseTransmissionColour.
Sourcepub fn reflection(self, value: ColourOrFactor) -> Self
pub fn reflection(self, value: ColourOrFactor) -> Self
Sets reflection.
ReflectionColour.
Sourcepub fn specular(self, value: ColourOrFactor) -> Self
pub fn specular(self, value: ColourOrFactor) -> Self
Sets specular.
SpecularColour.
Trait Implementations§
Source§impl Clone for SurfaceStyleRenderingDraft
impl Clone for SurfaceStyleRenderingDraft
Source§fn clone(&self) -> SurfaceStyleRenderingDraft
fn clone(&self) -> SurfaceStyleRenderingDraft
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more