pub struct ThreeMfObject {
pub name: Option<String>,
pub object_type: ObjectType,
pub mesh: Triangulation,
pub colour: Option<[f64; 4]>,
pub role: ObjectRole,
pub colours: Option<MeshColours>,
pub volumes: Vec<ThreeMfVolume>,
}Expand description
One object of a package, placed as its build item places it.
Fields§
§name: Option<String>The object’s name, where it has one.
object_type: ObjectTypeWhat the object is for. Every type is read; the import’s warnings say when one is not a part.
mesh: TriangulationThe mesh in millimetres, components flattened into it and the build item’s transform applied.
colour: Option<[f64; 4]>The object’s colour as the file writes it (sRGB, RGBA in [0, 1]),
where every triangle carries the same one.
role: ObjectRoleWhat the object is for, as the metadata of the package names its
role; ObjectRole::Model where nothing does.
colours: Option<MeshColours>The colours of the mesh as the file writes them (sRGB, RGBA in
[0, 1]): from colour groups, base materials or textures sampled
at each corner’s coordinates. Given where every triangle has one.
volumes: Vec<ThreeMfVolume>The volumes the mesh is made of, in order, each a run of its
triangles: one per mesh the object’s components flatten, or per
triangle range the package’s metadata divides a mesh into. Together
they cover every triangle of ThreeMfObject::mesh.
Trait Implementations§
Source§impl Clone for ThreeMfObject
impl Clone for ThreeMfObject
Auto Trait Implementations§
impl Freeze for ThreeMfObject
impl RefUnwindSafe for ThreeMfObject
impl Send for ThreeMfObject
impl Sync for ThreeMfObject
impl Unpin for ThreeMfObject
impl UnsafeUnpin for ThreeMfObject
impl UnwindSafe for ThreeMfObject
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.