pub struct ElementRecord {
pub global_id: GlobalId,
pub class: IfcClass,
pub name: Option<String>,
pub object_type: Option<String>,
pub placement: Placement,
pub container: Option<GlobalId>,
pub type_ref: Option<GlobalId>,
pub properties: PropertySets,
pub representation: Option<Representation>,
pub bounds: Option<BoundingBox>,
pub representation_revision: u64,
pub semantic_revision: u64,
}Expand description
One element in the model.
The two revision counters are what make incremental work possible: a rename bumps only
semantic_revision, so the renderer never rebuilds a mesh for it
(docs/ifc-semantics.md §5, “incremental invalidation”).
Fields§
§global_id: GlobalId§class: IfcClass§name: Option<String>§object_type: Option<String>§placement: Placement§container: Option<GlobalId>IfcRelContainedInSpatialStructure — the storey or space holding this element.
type_ref: Option<GlobalId>IfcRelDefinesByType — the family type this instance is defined by.
properties: PropertySets§representation: Option<Representation>Geometry in local space, evaluated from the family recipe. None for spatial
structure elements and for anything not yet flexed.
bounds: Option<BoundingBox>World-space bounds, once geometry has been evaluated.
representation_revision: u64Bumped when geometry must be rebuilt.
semantic_revision: u64Bumped when metadata changes but geometry does not.
Implementations§
Source§impl ElementRecord
impl ElementRecord
pub fn new(global_id: GlobalId, class: IfcClass) -> Self
pub fn with_name(self, name: impl Into<String>) -> Self
pub fn with_placement(self, placement: Placement) -> Self
pub fn with_container(self, container: GlobalId) -> Self
pub fn with_representation(self, representation: Representation) -> Self
Trait Implementations§
Source§impl Clone for ElementRecord
impl Clone for ElementRecord
Source§fn clone(&self) -> ElementRecord
fn clone(&self) -> ElementRecord
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ElementRecord
impl Debug for ElementRecord
Source§impl<'de> Deserialize<'de> for ElementRecord
impl<'de> Deserialize<'de> for ElementRecord
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ElementRecord
impl PartialEq for ElementRecord
Source§fn eq(&self, other: &ElementRecord) -> bool
fn eq(&self, other: &ElementRecord) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ElementRecord
impl Serialize for ElementRecord
impl StructuralPartialEq for ElementRecord
Auto Trait Implementations§
impl Freeze for ElementRecord
impl RefUnwindSafe for ElementRecord
impl Send for ElementRecord
impl Sync for ElementRecord
impl Unpin for ElementRecord
impl UnsafeUnpin for ElementRecord
impl UnwindSafe for ElementRecord
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