pub struct GeometryStyleInfo {
pub color: [f32; 4],
pub shading_color: Option<[f32; 4]>,
pub material_name: Option<String>,
}Expand description
Resolved appearance of one geometry item (the value side of the styled-item index keyed by geometry express id).
Lives here — not in processor.rs — because it is shared by the native
pipeline, the canonical per-element producer (crate::element), and the
browser wasm-bindings batch path, which lifts its flat (id, rgba8)
wire arrays into this richer form via GeometryStyleInfo::from_color.
Fields§
§color: [f32; 4]Apparent colour for rendering: IfcSurfaceStyleRendering.DiffuseColour when authored, otherwise the SurfaceColour. Matches what most IFC viewers display.
shading_color: Option<[f32; 4]>SurfaceColour, populated only when the file authored a distinct
DiffuseColour. Read by the WASM bridge’s parallel extractor so the
GLB exporter can offer “Shading” as a colour source; the
processing-crate MeshData doesn’t propagate it (server pipeline
has no GLB consumer yet).
material_name: Option<String>Implementations§
Source§impl GeometryStyleInfo
impl GeometryStyleInfo
Sourcepub fn from_color(color: [f32; 4]) -> Self
pub fn from_color(color: [f32; 4]) -> Self
Lift a bare RGBA colour (e.g. from the browser prepass’s flat
styleIds/styleColors wire arrays) into the rich form. No shading
colour, no material name — exactly the fidelity the wire carries.
Trait Implementations§
Source§impl Clone for GeometryStyleInfo
impl Clone for GeometryStyleInfo
Source§fn clone(&self) -> GeometryStyleInfo
fn clone(&self) -> GeometryStyleInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for GeometryStyleInfo
impl RefUnwindSafe for GeometryStyleInfo
impl Send for GeometryStyleInfo
impl Sync for GeometryStyleInfo
impl Unpin for GeometryStyleInfo
impl UnsafeUnpin for GeometryStyleInfo
impl UnwindSafe for GeometryStyleInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.