pub struct StyleView<'m, 's> { /* private fields */ }Expand description
Entry point for strict presentation and annotation projections.
Implementations§
Source§impl<'m, 's> StyleView<'m, 's>
impl<'m, 's> StyleView<'m, 's>
Sourcepub fn resolve_item_style(&self, item: EntityId) -> StyleResult<ResolvedStyle>
pub fn resolve_item_style(&self, item: EntityId) -> StyleResult<ResolvedStyle>
Resolves the effective style for item by scanning every
IfcStyledItem and IfcPresentationLayerAssignment in the model.
A unique direct IfcStyledItem binding wins over any layer style.
Returns Err(StyleError::AmbiguousStyleAssignment) if more than one
direct IfcStyledItem targets the same item.
Source§impl<'m, 's> StyleView<'m, 's>
impl<'m, 's> StyleView<'m, 's>
Sourcepub fn new(model: &'m Model, schema: &'s Schema) -> Self
pub fn new(model: &'m Model, schema: &'s Schema) -> Self
Bind a schema-resolved view over model using schema’s attribute
layout and type hierarchy.
Sourcepub fn annotation(&self, id: EntityId) -> StyleResult<Annotation<'m, 's>>
pub fn annotation(&self, id: EntityId) -> StyleResult<Annotation<'m, 's>>
Project entity id as an IfcAnnotation.
Sourcepub fn text_literal(&self, id: EntityId) -> StyleResult<TextLiteral<'m, 's>>
pub fn text_literal(&self, id: EntityId) -> StyleResult<TextLiteral<'m, 's>>
Project entity id as an IfcTextLiteral.
Sourcepub fn text_literal_with_extent(
&self,
id: EntityId,
) -> StyleResult<TextLiteralWithExtent<'m, 's>>
pub fn text_literal_with_extent( &self, id: EntityId, ) -> StyleResult<TextLiteralWithExtent<'m, 's>>
Project entity id as an IfcTextLiteralWithExtent.
Sourcepub fn annotation_fill_area(
&self,
id: EntityId,
) -> StyleResult<AnnotationFillArea<'m, 's>>
pub fn annotation_fill_area( &self, id: EntityId, ) -> StyleResult<AnnotationFillArea<'m, 's>>
Project entity id as an IfcAnnotationFillArea.
Sourcepub fn colour_rgb(&self, id: EntityId) -> StyleResult<ColourRgb<'m, 's>>
pub fn colour_rgb(&self, id: EntityId) -> StyleResult<ColourRgb<'m, 's>>
Project entity id as an IfcColourRgb.
Sourcepub fn surface_style_shading(
&self,
id: EntityId,
) -> StyleResult<SurfaceStyleShading<'m, 's>>
pub fn surface_style_shading( &self, id: EntityId, ) -> StyleResult<SurfaceStyleShading<'m, 's>>
Project entity id as an IfcSurfaceStyleShading.
Sourcepub fn surface_style(&self, id: EntityId) -> StyleResult<SurfaceStyle<'m, 's>>
pub fn surface_style(&self, id: EntityId) -> StyleResult<SurfaceStyle<'m, 's>>
Project entity id as an IfcSurfaceStyle.
Sourcepub fn styled_item(&self, id: EntityId) -> StyleResult<StyledItem<'m, 's>>
pub fn styled_item(&self, id: EntityId) -> StyleResult<StyledItem<'m, 's>>
Project entity id as an IfcStyledItem.
Sourcepub fn presentation_layer(
&self,
id: EntityId,
) -> StyleResult<PresentationLayer<'m, 's>>
pub fn presentation_layer( &self, id: EntityId, ) -> StyleResult<PresentationLayer<'m, 's>>
Project entity id as an IfcPresentationLayerAssignment.
Sourcepub fn surface_style_rendering(
&self,
id: EntityId,
) -> StyleResult<SurfaceStyleRendering<'m, 's>>
pub fn surface_style_rendering( &self, id: EntityId, ) -> StyleResult<SurfaceStyleRendering<'m, 's>>
Project entity id as an IfcSurfaceStyleRendering.
Sourcepub fn curve_style(&self, id: EntityId) -> StyleResult<CurveStyle<'m, 's>>
pub fn curve_style(&self, id: EntityId) -> StyleResult<CurveStyle<'m, 's>>
Project entity id as an IfcCurveStyle.
Sourcepub fn fill_area_style(
&self,
id: EntityId,
) -> StyleResult<FillAreaStyle<'m, 's>>
pub fn fill_area_style( &self, id: EntityId, ) -> StyleResult<FillAreaStyle<'m, 's>>
Project entity id as an IfcFillAreaStyle.
Sourcepub fn fill_area_style_hatching(
&self,
id: EntityId,
) -> StyleResult<FillAreaStyleHatching<'m, 's>>
pub fn fill_area_style_hatching( &self, id: EntityId, ) -> StyleResult<FillAreaStyleHatching<'m, 's>>
Project entity id as an IfcFillAreaStyleHatching.
Sourcepub fn fill_area_style_tiles(
&self,
id: EntityId,
) -> StyleResult<FillAreaStyleTiles<'m, 's>>
pub fn fill_area_style_tiles( &self, id: EntityId, ) -> StyleResult<FillAreaStyleTiles<'m, 's>>
Project entity id as an IfcFillAreaStyleTiles.
Sourcepub fn surface_texture(
&self,
id: EntityId,
) -> StyleResult<SurfaceTexture<'m, 's>>
pub fn surface_texture( &self, id: EntityId, ) -> StyleResult<SurfaceTexture<'m, 's>>
Project entity id as an IfcSurfaceTexture.
Sourcepub fn image_texture(&self, id: EntityId) -> StyleResult<ImageTexture<'m, 's>>
pub fn image_texture(&self, id: EntityId) -> StyleResult<ImageTexture<'m, 's>>
Project entity id as an IfcImageTexture.
Sourcepub fn texture_coordinate(
&self,
id: EntityId,
) -> StyleResult<TextureCoordinate<'m, 's>>
pub fn texture_coordinate( &self, id: EntityId, ) -> StyleResult<TextureCoordinate<'m, 's>>
Project entity id as an IfcTextureCoordinate.
Sourcepub fn indexed_texture_map(
&self,
id: EntityId,
) -> StyleResult<IndexedTextureMap<'m, 's>>
pub fn indexed_texture_map( &self, id: EntityId, ) -> StyleResult<IndexedTextureMap<'m, 's>>
Project entity id as an IfcIndexedTextureMap.
Sourcepub fn text_style(&self, id: EntityId) -> StyleResult<TextStyle<'m, 's>>
pub fn text_style(&self, id: EntityId) -> StyleResult<TextStyle<'m, 's>>
Project entity id as an IfcTextStyle.
Sourcepub fn text_style_font_model(
&self,
id: EntityId,
) -> StyleResult<TextStyleFontModel<'m, 's>>
pub fn text_style_font_model( &self, id: EntityId, ) -> StyleResult<TextStyleFontModel<'m, 's>>
Project entity id as an IfcTextStyleFontModel.
Sourcepub fn presentation_style_assignment(
&self,
id: EntityId,
) -> StyleResult<PresentationStyleAssignment<'m, 's>>
pub fn presentation_style_assignment( &self, id: EntityId, ) -> StyleResult<PresentationStyleAssignment<'m, 's>>
Project entity id as an IFC2x3 IfcPresentationStyleAssignment.
Sourcepub fn surface_style_lighting(
&self,
id: EntityId,
) -> StyleResult<SurfaceStyleLighting<'m, 's>>
pub fn surface_style_lighting( &self, id: EntityId, ) -> StyleResult<SurfaceStyleLighting<'m, 's>>
Project entity id as an IfcSurfaceStyleLighting.
Sourcepub fn surface_style_refraction(
&self,
id: EntityId,
) -> StyleResult<SurfaceStyleRefraction<'m, 's>>
pub fn surface_style_refraction( &self, id: EntityId, ) -> StyleResult<SurfaceStyleRefraction<'m, 's>>
Project entity id as an IfcSurfaceStyleRefraction.
Sourcepub fn surface_style_with_textures(
&self,
id: EntityId,
) -> StyleResult<SurfaceStyleWithTextures<'m, 's>>
pub fn surface_style_with_textures( &self, id: EntityId, ) -> StyleResult<SurfaceStyleWithTextures<'m, 's>>
Project entity id as an IfcSurfaceStyleWithTextures.
Sourcepub fn curve_style_font(
&self,
id: EntityId,
) -> StyleResult<CurveStyleFont<'m, 's>>
pub fn curve_style_font( &self, id: EntityId, ) -> StyleResult<CurveStyleFont<'m, 's>>
Project entity id as an IfcCurveStyleFont.
Sourcepub fn curve_style_font_pattern(
&self,
id: EntityId,
) -> StyleResult<CurveStyleFontPattern<'m, 's>>
pub fn curve_style_font_pattern( &self, id: EntityId, ) -> StyleResult<CurveStyleFontPattern<'m, 's>>
Project entity id as an IfcCurveStyleFontPattern.
Sourcepub fn blob_texture(&self, id: EntityId) -> StyleResult<BlobTexture<'m, 's>>
pub fn blob_texture(&self, id: EntityId) -> StyleResult<BlobTexture<'m, 's>>
Project entity id as an IfcBlobTexture.
Sourcepub fn pixel_texture(&self, id: EntityId) -> StyleResult<PixelTexture<'m, 's>>
pub fn pixel_texture(&self, id: EntityId) -> StyleResult<PixelTexture<'m, 's>>
Project entity id as an IfcPixelTexture.
Sourcepub fn texture_vertex(&self, id: EntityId) -> StyleResult<TextureVertex<'m, 's>>
pub fn texture_vertex(&self, id: EntityId) -> StyleResult<TextureVertex<'m, 's>>
Project entity id as an IfcTextureVertex.
Sourcepub fn texture_vertex_list(
&self,
id: EntityId,
) -> StyleResult<TextureVertexList<'m, 's>>
pub fn texture_vertex_list( &self, id: EntityId, ) -> StyleResult<TextureVertexList<'m, 's>>
Project entity id as an IfcTextureVertexList.
Sourcepub fn light_source(&self, id: EntityId) -> StyleResult<LightSource<'m, 's>>
pub fn light_source(&self, id: EntityId) -> StyleResult<LightSource<'m, 's>>
Project entity id as an IfcLightSource, whatever its subtype.
Use this when only the shared colour/intensity attributes are needed;
call LightSource::kind to decide which concrete projection below
to reach for.
Sourcepub fn light_source_ambient(
&self,
id: EntityId,
) -> StyleResult<LightSourceAmbient<'m, 's>>
pub fn light_source_ambient( &self, id: EntityId, ) -> StyleResult<LightSourceAmbient<'m, 's>>
Project entity id as an IfcLightSourceAmbient.
Sourcepub fn light_source_directional(
&self,
id: EntityId,
) -> StyleResult<LightSourceDirectional<'m, 's>>
pub fn light_source_directional( &self, id: EntityId, ) -> StyleResult<LightSourceDirectional<'m, 's>>
Project entity id as an IfcLightSourceDirectional.
Sourcepub fn light_source_goniometric(
&self,
id: EntityId,
) -> StyleResult<LightSourceGoniometric<'m, 's>>
pub fn light_source_goniometric( &self, id: EntityId, ) -> StyleResult<LightSourceGoniometric<'m, 's>>
Project entity id as an IfcLightSourceGoniometric.
Sourcepub fn light_source_positional(
&self,
id: EntityId,
) -> StyleResult<LightSourcePositional<'m, 's>>
pub fn light_source_positional( &self, id: EntityId, ) -> StyleResult<LightSourcePositional<'m, 's>>
Project entity id as an IfcLightSourcePositional.
Accepts an IfcLightSourceSpot too, since a spot is a positional
light; use Self::light_source_spot to reach the cone attributes.
Sourcepub fn light_source_spot(
&self,
id: EntityId,
) -> StyleResult<LightSourceSpot<'m, 's>>
pub fn light_source_spot( &self, id: EntityId, ) -> StyleResult<LightSourceSpot<'m, 's>>
Project entity id as an IfcLightSourceSpot.
Sourcepub fn light_intensity_distribution(
&self,
id: EntityId,
) -> StyleResult<LightIntensityDistribution<'m, 's>>
pub fn light_intensity_distribution( &self, id: EntityId, ) -> StyleResult<LightIntensityDistribution<'m, 's>>
Project entity id as an IfcLightIntensityDistribution.
Sourcepub fn light_distribution_data(
&self,
id: EntityId,
) -> StyleResult<LightDistributionData<'m, 's>>
pub fn light_distribution_data( &self, id: EntityId, ) -> StyleResult<LightDistributionData<'m, 's>>
Project entity id as an IfcLightDistributionData.
Sourcepub fn planar_extent(&self, id: EntityId) -> StyleResult<PlanarExtent<'m, 's>>
pub fn planar_extent(&self, id: EntityId) -> StyleResult<PlanarExtent<'m, 's>>
Project entity id as an IfcPlanarExtent.
Accepts an IfcPlanarBox too, since a box is a planar extent; use
Self::planar_box to reach its placement.
Sourcepub fn planar_box(&self, id: EntityId) -> StyleResult<PlanarBox<'m, 's>>
pub fn planar_box(&self, id: EntityId) -> StyleResult<PlanarBox<'m, 's>>
Project entity id as an IfcPlanarBox.