pub struct PlacementResolver { /* private fields */ }Expand description
Resolves placement chains to world transforms, with memoization.
§Why a resolver rather than a free function
Placement chains share their upper links: every element in a storey walks the same storey-building-site tail. Caching per placement turns repeated work into a lookup, which matters because this runs once per element in the file.
Implementations§
Source§impl PlacementResolver
impl PlacementResolver
Sourcepub fn world_transform(
&mut self,
model: &Model,
placement: EntityId,
) -> GeometryResult<Transform>
pub fn world_transform( &mut self, model: &Model, placement: EntityId, ) -> GeometryResult<Transform>
Resolve a placement to its world transform.
Walks PlacementRelTo to the root, then composes downward. Detects
cycles rather than overflowing the stack, and reports the entity where
the cycle closes so the file can be repaired.
Trait Implementations§
Source§impl Debug for PlacementResolver
impl Debug for PlacementResolver
Auto Trait Implementations§
impl Freeze for PlacementResolver
impl RefUnwindSafe for PlacementResolver
impl Send for PlacementResolver
impl Sync for PlacementResolver
impl Unpin for PlacementResolver
impl UnsafeUnpin for PlacementResolver
impl UnwindSafe for PlacementResolver
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