Skip to main content

shadow

Function shadow 

Source
pub fn shadow(mesh: &Triangulation, plane: &Plane) -> OgeomResult<Vec<Loop2>>
Expand description

The shadow of a mesh on a plane, seen along its normal.

The loops are in the plane’s own coordinates, along its frame’s x and y, with the shadow on their left: outer boundaries counter-clockwise, holes clockwise. Each round of tracing moves the boundary by at most a cell of the snapping grid, 2^-38 of the projected mesh’s extent rounded up to a power of two: within two cells of the exact union of the projected triangles, as the projection rounds them.

§Errors

OgeomError::Range if a triangle names a vertex the mesh does not have, and OgeomError::Numeric if a position or the plane’s origin is not finite.