Skip to main content

parse_obj

Function parse_obj 

Source
pub fn parse_obj(
    content: &str,
) -> Result<(Vec<[f32; 3]>, Vec<[f32; 3]>, Vec<u32>), String>
Expand description

Parse a Wavefront OBJ string.

Returns (positions, normals, indices). Only v, vn, and f records are processed. Face records must use the v//vn or v/vt/vn format; bare v faces use vertex index as normal index.