pub fn slice_hex(
vertices: [Vec3; 8],
plane_origin: Vec3,
plane_normal: Vec3,
) -> CellSliceResultExpand description
Slice a hexahedron by decomposing into 5 tetrahedra.
Hexahedra are sliced by treating them as 5 tetrahedra (using the standard symmetric decomposition), then merging the resulting polygons.
§Arguments
vertices- The 8 vertices of the hexahedron in standard orderingplane_origin- A point on the planeplane_normal- The plane normal (points toward kept geometry)
§Returns
A CellSliceResult containing 0, 3-6 vertices depending on the intersection.