Skip to main content

extent_along

Function extent_along 

Source
pub fn extent_along<M>(
    mesh: &M,
    triangles: &[usize],
    along: DVec3,
) -> Result<Option<Interval>, FaceSelectionError>
where M: TriangleMeshView + ?Sized,
Expand description

Extent of the listed triangles along along: the least and greatest of p . u over every corner, u = along / |along|, as start and end.

Duplicate and unordered triangle indices are fine. An empty list gives None. The triangles need not form a surface; only their corners are read.

ยงErrors

FaceSelectionError::InvalidDirection for an unusable along; FaceSelectionError::TriangleOutOfRange, FaceSelectionError::IndexOutOfRange or FaceSelectionError::NonFinitePosition naming the first offending listed triangle.