Skip to main content

write_mesh

Function write_mesh 

Source
pub fn write_mesh<W: Write>(
    data: &MeshData,
    format: Format,
    ascii: bool,
    out: &mut W,
) -> Result<()>
Expand description

Writes data as a whole file, dropping vertices no triangle uses. ascii picks the text form of a format that has both (Format::has_ascii_form) and is ignored by the others. STL, binary PLY and GLB hold 32-bit floats; OBJ and ASCII PLY keep the full double precision.

ยงErrors

When data has no triangles or an index past its vertices, when a coordinate or count does not fit the format, or when writing fails.