pub struct ThreeMfMesh {
pub object_id: u32,
pub beam_lattice: Option<ThreeMfBeamLattice>,
pub positions: Vec<f64>,
pub indices: Vec<u32>,
pub triangle_colors: Vec<Option<[u8; 3]>>,
pub triangle_appearance: Vec<Option<ThreeMfAppearance>>,
}Expand description
One <object>’s mesh, in millimetres and in the object’s own coordinates.
Shared: an object placed three times is ONE entry here and three
ThreeMfInstances.
Fields§
§object_id: u32The id of the <object> this mesh belongs to.
beam_lattice: Option<ThreeMfBeamLattice>Non-solid lattice data; named and placed through the mesh instances.
positions: Vec<f64>Vertex coordinates as xyz triples, millimetres.
indices: Vec<u32>Triangle corners, three indices into positions/3.
triangle_colors: Vec<Option<[u8; 3]>>One entry per triangle — the 8-bit sRGB colour its base material gives
it, or None — when at least one triangle of the mesh resolves to a
colour; EMPTY otherwise. See the module doc’s “Colours”.
triangle_appearance: Vec<Option<ThreeMfAppearance>>Lossless appearance parallel to triangles; empty when absent.
Implementations§
Source§impl ThreeMfMesh
impl ThreeMfMesh
pub fn vertex_count(&self) -> usize
pub fn triangle_count(&self) -> usize
Trait Implementations§
Source§impl Clone for ThreeMfMesh
impl Clone for ThreeMfMesh
Source§impl Debug for ThreeMfMesh
impl Debug for ThreeMfMesh
Source§impl Default for ThreeMfMesh
impl Default for ThreeMfMesh
Source§impl PartialEq for ThreeMfMesh
impl PartialEq for ThreeMfMesh
Source§impl Serialize for ThreeMfMesh
impl Serialize for ThreeMfMesh
impl StructuralPartialEq for ThreeMfMesh
Auto Trait Implementations§
impl Forget for ThreeMfMesh
impl Freeze for ThreeMfMesh
impl Move for ThreeMfMesh
impl RefUnwindSafe for ThreeMfMesh
impl Send for ThreeMfMesh
impl Sync for ThreeMfMesh
impl Unpin for ThreeMfMesh
impl UnsafeUnpin for ThreeMfMesh
impl UnwindSafe for ThreeMfMesh
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