pub struct SubMeshCollection {
pub sub_meshes: Vec<SubMesh>,
pub ids_are_materials: bool,
}Expand description
Collection of sub-meshes from an element, preserving per-item identity
Fields§
§sub_meshes: Vec<SubMesh>§ids_are_materials: boolWhat SubMesh::geometry_id MEANS here: false (default) an
IfcRepresentationItem, true an IfcMaterial (only layers.rs builds
those). Uniform across the collection, which is why it lives on it.
Deliberately NOT geometry_class == GEOM_CLASS_LAYER_SLICE, which cannot
answer it: that class is stamped from is_material_layer_sliceable, a
static check made BEFORE the geometry runs, while
try_layered_sub_meshes can still return None and fall through to the
rep-item path — so rep-item ids can carry class 3 (#3199).
SCOPE: it decides only which FIELD emit_sub_meshes emits the id under —
five style lookups in element.rs still read geometry_id as a rep item
on BOTH paths, safe only by express-id uniqueness (#3211).
Implementations§
Source§impl SubMeshCollection
impl SubMeshCollection
Sourcepub fn of_materials() -> Self
pub fn of_materials() -> Self
geometry_ids are IfcMaterial ids. Only layers.rs builds these.
Sourcepub fn add_textured(
&mut self,
geometry_id: u32,
mesh: Mesh,
uvs: Vec<f32>,
texture: TextureAttachment,
)
pub fn add_textured( &mut self, geometry_id: u32, mesh: Mesh, uvs: Vec<f32>, texture: TextureAttachment, )
Add a textured sub-mesh (#1781).
Sourcepub fn into_combined_mesh(self) -> Mesh
pub fn into_combined_mesh(self) -> Mesh
Merge all sub-meshes into a single mesh (loses per-item identity)
Trait Implementations§
Source§impl Clone for SubMeshCollection
impl Clone for SubMeshCollection
Source§fn clone(&self) -> SubMeshCollection
fn clone(&self) -> SubMeshCollection
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SubMeshCollection
impl Debug for SubMeshCollection
Source§impl Default for SubMeshCollection
impl Default for SubMeshCollection
Source§fn default() -> SubMeshCollection
fn default() -> SubMeshCollection
Auto Trait Implementations§
impl Freeze for SubMeshCollection
impl RefUnwindSafe for SubMeshCollection
impl Send for SubMeshCollection
impl Sync for SubMeshCollection
impl Unpin for SubMeshCollection
impl UnwindSafe for SubMeshCollection
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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§impl<T> Pointable for T
impl<T> Pointable for T
§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.