pub struct ResolvedMesh {
pub mesh: Mesh,
pub transform: Mat4,
pub object_type: ObjectType,
pub name: Option<String>,
pub unit: Unit,
}Expand description
A single resolved mesh instance with its accumulated world transform.
Produced by PartResolver::resolve_meshes. Each entry corresponds to one leaf
mesh object in the component hierarchy.
§Mesh ownership
The mesh is owned (not a reference). The borrow checker prevents returning &'a Mesh
because get_or_load_model() requires &mut self on PartResolver, which conflicts
with holding shared references into previously loaded model data. Cloning is the
standard pattern used throughout this codebase (see stats_impl.rs lines 237-260).
A future refactor to Rc<Model> inside PartResolver would enable zero-copy returns.
Fields§
§mesh: MeshThe actual mesh geometry (owned clone — see struct-level doc for rationale).
transform: Mat4Accumulated transform from the build item and component chain.
This is the product of all transforms from root to this leaf:
build_item.transform * comp1.transform * ... * compN.transform.
Transforms are NOT pre-applied to vertex positions.
object_type: ObjectTypeObject type from the source object (Model, Support, SolidSupport, Surface, Other).
name: Option<String>Human-readable name of the source object, if set.
unit: UnitUnit of measurement from the source model.
Not converted — the consumer uses Unit::convert to reach their target unit.
Trait Implementations§
Source§impl Clone for ResolvedMesh
impl Clone for ResolvedMesh
Source§fn clone(&self) -> ResolvedMesh
fn clone(&self) -> ResolvedMesh
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ResolvedMesh
impl RefUnwindSafe for ResolvedMesh
impl Send for ResolvedMesh
impl Sync for ResolvedMesh
impl Unpin for ResolvedMesh
impl UnsafeUnpin for ResolvedMesh
impl UnwindSafe for ResolvedMesh
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more