pub struct ProximityEvidence { /* private fields */ }Expand description
How close two bodies come and how far they overlap.
Implementations§
Source§impl ProximityEvidence
impl ProximityEvidence
Sourcepub fn try_new(
request: ProximityRequest,
separation_metres: f64,
penetration_metres: Option<f64>,
plan_overlap_square_metres: f64,
containment: Option<BodyContainment>,
fidelity: GeometryFidelity,
evidence: Evidence,
) -> Result<Self, ProximityError>
pub fn try_new( request: ProximityRequest, separation_metres: f64, penetration_metres: Option<f64>, plan_overlap_square_metres: f64, containment: Option<BodyContainment>, fidelity: GeometryFidelity, evidence: Evidence, ) -> Result<Self, ProximityError>
Rejects incoherent measurements and evidence whose exactness does not match the geometry it was measured on.
separation_metres: shortest distance between the two surfaces.penetration_metres: depth of the deepest witnessed point of either body inside the other;Nonewhen neither body is a closed solid.plan_overlap_square_metres: area of the two footprints’ overlap.
Sourcepub fn with_overlap_extents(
self,
extents: OverlapExtents,
) -> Result<Self, ProximityError>
pub fn with_overlap_extents( self, extents: OverlapExtents, ) -> Result<Self, ProximityError>
Adds the extents of the bodies’ intersection along each axis.
Refused when no penetration was measured (two open surfaces share no volume), and when bodies apart at the surface and not contained in one another claim a non-empty intersection.
Sourcepub fn with_hausdorff(
self,
interval: LengthInterval,
) -> Result<Self, ProximityError>
pub fn with_hausdorff( self, interval: LengthInterval, ) -> Result<Self, ProximityError>
Adds the Hausdorff distance between the two surfaces: the farthest any point of either surface lies from the other surface.
It is never smaller than the separation, so an interval lying wholly below the separation’s own interval is refused.
Sourcepub fn with_intersection_volume(
self,
volume: IntersectionVolume,
) -> Result<Self, ProximityError>
pub fn with_intersection_volume( self, volume: IntersectionVolume, ) -> Result<Self, ProximityError>
Adds the certified volume the two bodies share, with their own volumes.
Refused when no penetration was measured (open surfaces enclose no volume), when bodies apart at the surface and not contained in one another claim a shared volume, and when a body said to lie inside the other cannot share its whole volume with it.
pub fn request(&self) -> &ProximityRequest
Sourcepub fn separation_metres(&self) -> f64
pub fn separation_metres(&self) -> f64
Shortest distance between the measured surfaces.
Sourcepub fn separation_interval_metres(&self) -> (f64, f64)
pub fn separation_interval_metres(&self) -> (f64, f64)
The separation the true surfaces may have, given the fidelity.
(lower, upper); both equal the measured separation for exact geometry.
Sourcepub fn penetration_metres(&self) -> Option<f64>
pub fn penetration_metres(&self) -> Option<f64>
Witnessed interpenetration depth, a lower bound on the true depth.
pub fn plan_overlap_square_metres(&self) -> f64
pub fn containment(&self) -> Option<BodyContainment>
Sourcepub fn overlap_extents(&self) -> Option<OverlapExtents>
pub fn overlap_extents(&self) -> Option<OverlapExtents>
Extents of the intersection along each axis; None when the service
did not measure them or neither body is a closed solid.
Sourcepub fn hausdorff_interval_metres(&self) -> Option<LengthInterval>
pub fn hausdorff_interval_metres(&self) -> Option<LengthInterval>
Hausdorff distance between the two surfaces; None when the service
did not measure it. Zero exactly when the surfaces coincide, so it is
what tells a duplicate from a mere overlap.
Sourcepub fn intersection_volume(&self) -> Option<IntersectionVolume>
pub fn intersection_volume(&self) -> Option<IntersectionVolume>
The certified volume the bodies share and their own volumes; None
when the service did not measure it or a body is not a closed solid.