pub struct ThreeMfInstance {
pub object_id: u32,
pub mesh: usize,
pub transform: [f64; 12],
pub first_vertex: usize,
pub vertex_count: usize,
pub first_triangle: usize,
pub triangle_count: usize,
}Expand description
One placement of one mesh: a <build><item>, or a <component> reached
through one, with the transforms from the item down composed.
Fields§
§object_id: u32The mesh-bearing object placed (not the item’s objectid when the item
pointed at a <components> object).
mesh: usizeIndex into ThreeMfReadResult::meshes.
transform: [f64; 12]The composed 3x4 row-vector transform, in 3MF attribute order
(m00 m01 m02 m10 m11 m12 m20 m21 m22 m30 m31 m32), translation in mm.
first_vertex: usizeWhere this instance’s geometry sits in the flattened buffers: its
vertices are positions[first_vertex * 3 ..][.. vertex_count * 3] and
its triangles indices[first_triangle * 3 ..][.. triangle_count * 3].
Instances are laid out in order and never share a vertex, which is what
lets a consumer take one body out without re-flattening the build.
vertex_count: usize§first_triangle: usize§triangle_count: usizeImplementations§
Trait Implementations§
Source§impl Clone for ThreeMfInstance
impl Clone for ThreeMfInstance
Source§impl Debug for ThreeMfInstance
impl Debug for ThreeMfInstance
Source§impl PartialEq for ThreeMfInstance
impl PartialEq for ThreeMfInstance
Source§impl Serialize for ThreeMfInstance
impl Serialize for ThreeMfInstance
impl StructuralPartialEq for ThreeMfInstance
Auto Trait Implementations§
impl Freeze for ThreeMfInstance
impl RefUnwindSafe for ThreeMfInstance
impl Send for ThreeMfInstance
impl Sync for ThreeMfInstance
impl Unpin for ThreeMfInstance
impl UnsafeUnpin for ThreeMfInstance
impl UnwindSafe for ThreeMfInstance
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