resolve_geometry_finishes

Function resolve_geometry_finishes 

Source
pub fn resolve_geometry_finishes(
    styled_items: &[Span],
    decoder: &mut EntityDecoder<'_>,
) -> FxHashMap<u32, SpecularMaterial>
Expand description

IFC-authored metallic/roughness per styled geometry item (#5582), keyed exactly like the colour index resolve_styled_items_into builds: the FIRST styled item (file order) that yields a style claims its geometry id, and the finish comes from that same chosen rendering style, so a mesh never pairs one style’s colour with another’s finish. A claim whose style authors no specular evidence is kept as an empty SpecularMaterial (it encodes to [NAN, NAN]), so a first-wins merge of sharded results cannot take a later item’s finish for it. Orphan (null-item) styled items are skipped, as they colour materials, not geometry. Fed to crate::prepass::flat_styles_with_finishes.

A separate pass instead of a field on GeometryStyleInfo / ResolvedPrepass so this crate’s public structs stay unchanged (semver-additive, #5582).