pub enum MeshFrame {
SiteLocal {
translation: (f64, f64, f64),
},
ModelRtc {
anchor: (f64, f64, f64),
},
RawIfc,
}Expand description
The frame a pipeline meshes into, with the translation it subtracts.
Both pipelines build it with MeshFrame::select. The offset, the
needs-shift bit and the wire tag are read off the one value, so they
cannot disagree with each other.
Variants§
SiteLocal
IfcSite has a non-identity translation: subtract it. Vertices land
relative to the site origin, small floats in a relatable frame. The
native pipeline also removes the site rotation
(convert_mesh_to_site_local) for this tier.
ModelRtc
IfcSite is identity or missing but the sampled geometry lives at
large world coordinates: subtract the detected anchor so f32 keeps its
precision. No rotation is removed.
RawIfc
Neither anchor applies: subtract nothing.
Implementations§
Source§impl MeshFrame
impl MeshFrame
Sourcepub fn select(
site_translation: Option<(f64, f64, f64)>,
detected: Option<RtcVerdict>,
) -> Self
pub fn select( site_translation: Option<(f64, f64, f64)>, detected: Option<RtcVerdict>, ) -> Self
The three-tier selection.
site_translation: theIfcSiteplacement’s translation (metres),Nonewhen the pipeline has no site tier (the browser pre-pass and the appearance authoring path mesh in world axes and passNonedeliberately: seestream_meta::resolve_stream_meta).detected: the RTC detector’s verdict (seeGeometryRouter::detect_rtc_offset_with_fallback). ALargeverdict is honoured whatever its anchor’s own magnitude: the placement-bounds fallback decides on the bbox corners and anchors on the centre, which can be inside 10 km while the coordinates are not. Only an anchor at the origin (nothing to subtract) falls through toRawIfc.
Sourcepub fn for_overlay(
router: &GeometryRouter,
content: &[u8],
decoder: &mut EntityDecoder<'_>,
) -> Self
pub fn for_overlay( router: &GeometryRouter, content: &[u8], decoder: &mut EntityDecoder<'_>, ) -> Self
The frame for a consumer that parses the file itself and has no job list: the symbolic, grid and alignment overlays (#4665). It runs the browser pre-pass selection (the bounds-fallback ladder, no site tier) with every geometry entity of the file as the jobs. The pre-passes sample a narrower job window, so a model with widely spread elements can still get a different median anchor (#4611), and the native site tier is not applied (#4706).
Sourcepub fn rtc_offset(self) -> (f64, f64, f64)
pub fn rtc_offset(self) -> (f64, f64, f64)
The translation the router subtracts from every world vertex before
the f32 cast; (0,0,0) for MeshFrame::RawIfc.
Sourcepub fn needs_shift(self) -> bool
pub fn needs_shift(self) -> bool
True when the frame subtracts anything at all.
Sourcepub fn coordinate_space(self) -> MeshCoordinateSpace
pub fn coordinate_space(self) -> MeshCoordinateSpace
The wire tag for this frame.
Trait Implementations§
impl Copy for MeshFrame
impl StructuralPartialEq for MeshFrame
Auto Trait Implementations§
impl Freeze for MeshFrame
impl RefUnwindSafe for MeshFrame
impl Send for MeshFrame
impl Sync for MeshFrame
impl Unpin for MeshFrame
impl UnsafeUnpin for MeshFrame
impl UnwindSafe for MeshFrame
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§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).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.