pub struct Terminal {
pub scope: Scope,
pub mesh_id: String,
pub face_profile: FaceProfile,
pub material: Option<Material>,
pub mass_properties: Option<MassProperties>,
pub label: Option<String>,
}Expand description
A fully-resolved terminal node in the shape model.
Represents a concrete mesh instance placed at the given scope.
The mesh_id identifies which asset to spawn (e.g. "Window", "Door", "Pillar").
face_profile describes the 2D cross-section shape of this terminal.
material: optional Material (id + density) set by Mat(...) operations.
mass_properties: derived volumetric properties when the material carries a density.
This is the “DOM” that Bevy (or any renderer) reads to spawn entities.
Fields§
§scope: Scope§mesh_id: String§face_profile: FaceProfile2D face profile describing the cross-sectional shape of this terminal.
Replaces the old taper: f64 field. Use FaceProfile::taper_coeff to
obtain a legacy taper coefficient for backward-compatible renderers.
material: Option<Material>Optional material stamped by a Mat("...", density?) operation.
mass_properties: Option<MassProperties>Volumetric mass properties (mass / centroid / inertia tensor), populated
when material carries a density. Always None otherwise.
label: Option<String>Occlusion label stamped by Label("...") — lets IfClear/IfOccluded
and friends test against one named class of terminals only.
Implementations§
Source§impl Terminal
impl Terminal
pub fn new(scope: Scope, mesh_id: impl Into<String>) -> Self
Sourcepub fn new_with_taper(
scope: Scope,
mesh_id: impl Into<String>,
taper: f64,
) -> Self
pub fn new_with_taper( scope: Scope, mesh_id: impl Into<String>, taper: f64, ) -> Self
Creates a terminal with a legacy taper factor (0 = box, 1 = pyramid).
Converts the taper into a FaceProfile automatically.
Sourcepub fn new_profiled(
scope: Scope,
mesh_id: impl Into<String>,
face_profile: FaceProfile,
material: Option<Material>,
) -> Self
pub fn new_profiled( scope: Scope, mesh_id: impl Into<String>, face_profile: FaceProfile, material: Option<Material>, ) -> Self
Creates a terminal with an explicit FaceProfile and optional material.
mass_properties is automatically computed when the material has a density.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Terminal
impl<'de> Deserialize<'de> for Terminal
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for Terminal
Auto Trait Implementations§
impl Freeze for Terminal
impl RefUnwindSafe for Terminal
impl Send for Terminal
impl Sync for Terminal
impl Unpin for Terminal
impl UnsafeUnpin for Terminal
impl UnwindSafe for Terminal
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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