pub struct RetainedGeometry { /* private fields */ }Expand description
A geometry document of display meshes plus the complete canonical processing result it was admitted from.
Owns both. Texture, appearance, source attribution, instance records and
crate::MeshFrame remain authoritative in processed(); the document
holds display approximations only, never authored geometry, and makes no
claim that their source geometry is mathematically exact.
Implementations§
Source§impl RetainedGeometry
impl RetainedGeometry
Sourcepub fn try_from_processing(
processed: ProcessingResult,
) -> Result<Self, RetainedGeometryError>
pub fn try_from_processing( processed: ProcessingResult, ) -> Result<Self, RetainedGeometryError>
Admit an already-produced result. Runs no second load or geometry pipeline.
Copies positions, normals and indices for execution. The original result remains recoverable without reconstructed or dropped presentation fields. If processing was cancelled or filtered, this retains that same partial or filtered result: admission must not be interpreted as load completion.
Sourcepub fn processed(&self) -> &ProcessingResult
pub fn processed(&self) -> &ProcessingResult
Canonical geometry, presentation, placement, instances and diagnostics.
Sourcepub fn document(&self) -> &GeometryDocument
pub fn document(&self) -> &GeometryDocument
Immutable document view; nothing can replace an admitted display mesh.
Sourcepub fn records(&self) -> &[RetainedMeshRecord]
pub fn records(&self) -> &[RetainedMeshRecord]
One definition plus its own placed occurrence per processed mesh, in
ProcessingResult::meshes order.
Sourcepub fn instances(&self) -> &[RetainedInstanceRecord]
pub fn instances(&self) -> &[RetainedInstanceRecord]
Additional placed occurrences for every canonical instance/template mesh
pair. Appearance and source metadata remain in processed().instances.
Sourcepub fn into_processing_result(self) -> ProcessingResult
pub fn into_processing_result(self) -> ProcessingResult
Return every original record and metadata field without a lossy conversion.
Auto Trait Implementations§
impl Freeze for RetainedGeometry
impl RefUnwindSafe for RetainedGeometry
impl Send for RetainedGeometry
impl Sync for RetainedGeometry
impl Unpin for RetainedGeometry
impl UnwindSafe for RetainedGeometry
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
§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.