pub fn parse(string: &str, options: Options) -> ResultExpand description
Directly parse a crate::geometry::mesh::Mesh from an off string.
§Examples
let off_string = r#"
OFF
3 1
1.0 0.0 0.0
0.0 1.0 0.0
0.0 0.0 1.0
4 0 1 2 3 1.0 0.0 0.0 1.0 # red
"#;
let mesh = off_rs::parse(
off_string,
Default::default(), // optional ParserOptions
);
println!("{:#?}", mesh);§Errors
Will return self::Error if an error occurs while parsing the off data.