pub struct MeshDistance {
pub distance: f32,
pub point_a: [f32; 3],
pub point_b: [f32; 3],
pub triangle_a: TriangleId,
pub triangle_b: TriangleId,
}Expand description
The closest pair of points between two meshes, found by mesh_distance.
Both points are in mesh A’s local space: point_b is the point of B’s
triangle triangle_b as placed by the query’s Rigid transform, not a
point in B’s own coordinates. Map it back into B’s space with
Rigid::apply on Rigid::inverse; map B’s own points into A’s space
with Rigid::apply, the arithmetic the queries use.
Fields§
§distance: f32The distance between the two surfaces. 0 when they touch, intersect,
or are closer than f64 rounding resolves: a positive gap whose
computed distance rounds to 0 is reported as 0. See mesh_distance.
point_a: [f32; 3]The closest point on A’s triangle triangle_a, in A’s local space.
point_b: [f32; 3]The closest point on B’s triangle triangle_b, in A’s local space
(not B’s).
triangle_a: TriangleIdThe triangle of A that point_a lies on.
triangle_b: TriangleIdThe triangle of B that point_b lies on.
Trait Implementations§
Source§impl Clone for MeshDistance
impl Clone for MeshDistance
Source§fn clone(&self) -> MeshDistance
fn clone(&self) -> MeshDistance
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more