#[non_exhaustive]pub struct BodyDescription {
pub product: EntityId,
pub representation: EntityId,
pub purpose: RepresentationPurpose,
pub frame: Transform,
pub items: Vec<BodyItem>,
}Expand description
The representation of one product selected for a purpose (the Body by default), one entry per geometric item.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.product: EntityIdThe product described.
representation: EntityIdThe representation selected for Self::purpose
(crate::select_product_representation; for Body that is
crate::select_shape_representation).
purpose: RepresentationPurposeThe purpose the representation was selected for.
frame: TransformThe frame of the selected representation, in metres: the representation
context’s WorldCoordinateSystem and the product placement
(product_representation_frame’s answer for Self::purpose).
Every BodyItem::item_world is this frame composed with the item’s
mappings, and every BodyItemBounds is expressed in it.
items: Vec<BodyItem>One entry per geometric item, mapped items resolved, in authored order.
Implementations§
Source§impl BodyDescription
impl BodyDescription
Sourcepub fn sole_item(&self) -> Option<&BodyItem>
pub fn sole_item(&self) -> Option<&BodyItem>
The only item, when the body has exactly one.
None for an empty body and for a body of several items; a caller
that needs every item reads Self::items.
Trait Implementations§
Source§impl Clone for BodyDescription
impl Clone for BodyDescription
Source§fn clone(&self) -> BodyDescription
fn clone(&self) -> BodyDescription
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more