pub struct Geometry<VR: VertexRef, SS: StringStorage> { /* private fields */ }Expand description
A stored geometry.
Covers all eight CityJSON geometry types. Use Geometry::type_geometry to determine
the type, then access boundaries, semantics, materials, and textures through the
corresponding methods.
Boundaries are stored in flat offset-encoded form. Use boundary.to_nested_* to get
nested arrays compatible with the JSON representation.
Implementations§
Source§impl<VR: VertexRef, SS: StringStorage> Geometry<VR, SS>
impl<VR: VertexRef, SS: StringStorage> Geometry<VR, SS>
pub fn from_stored_parts(parts: StoredGeometryParts<VR, SS>) -> Self
pub fn type_geometry(&self) -> &GeometryType
pub fn lod(&self) -> Option<&LoD>
pub fn boundaries(&self) -> Option<&Boundary<VR>>
pub fn coordinates<'a, V: Coordinate>( &'a self, vertices: &'a Vertices<VR, V>, ) -> Option<BoundaryCoordinates<'a, VR, V>>
pub fn unique_vertex_indices<'a>( &'a self, scratch: &'a mut Vec<VertexIndex<VR>>, ) -> Option<&'a [VertexIndex<VR>]>
pub fn unique_coordinates<'a, V: Coordinate>( &'a self, vertices: &'a Vertices<VR, V>, scratch: &'a mut Vec<VertexIndex<VR>>, ) -> Option<BoundaryUniqueCoordinates<'a, VR, V>>
pub fn semantics(&self) -> Option<SemanticMapView<'_, VR>>
pub fn materials(&self) -> Option<MaterialThemesView<'_, VR, SS>>
pub fn textures(&self) -> Option<TextureThemesView<'_, VR, SS>>
pub fn instance(&self) -> Option<GeometryInstanceView<'_, VR>>
Trait Implementations§
Auto Trait Implementations§
impl<VR, SS> Freeze for Geometry<VR, SS>where
VR: Freeze,
impl<VR, SS> RefUnwindSafe for Geometry<VR, SS>
impl<VR, SS> Send for Geometry<VR, SS>
impl<VR, SS> Sync for Geometry<VR, SS>
impl<VR, SS> Unpin for Geometry<VR, SS>
impl<VR, SS> UnsafeUnpin for Geometry<VR, SS>where
VR: UnsafeUnpin,
impl<VR, SS> UnwindSafe for Geometry<VR, SS>
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
Mutably borrows from an owned value. Read more