pub fn simple_mesh_by_node<'a>(&'a self, node_ref: NodeRef<'a>) -> Result<Option<SimpleMesh>, String> {
        let mesh_index = match node_ref.mesh {
            Some(index) => index,
            None => { return Ok(None); }
        };
        
        let meshes = self.json.get("meshes")
            .and_then(|m| m.as_array())
            .ok_or("meshes array was not found in json".to_owned())?;
        
        let mesh = meshes.get(mesh_index);
        match mesh.map(|m| m.as_object().unwrap() ) {
            Some(mesh_obj) => 
                SimpleMesh::from_obj(mesh_obj)
                    .map(|mesh| Some(mesh)),
            None => Ok(None),
        }
    }
/// Find the mesh associated with the selected node. The mesh cannot have more than 1 primitive group
/// Returns an error if the meshes configuration of the GLB file is invalid
Find the mesh associated with the selected node. The mesh cannot have more than 1 primitive group
Returns an error if the meshes configuration of the GLB file is invalid
Find the mesh associated with the selected node . The mesh cannot have more than 1 primitive group Returns an error if the meshes configuration of the GLB file is invalid
pub fn simple_mesh_by_node<'a>(&'a self, node_ref: NodeRef<'a>) -> Result<Option<SimpleMesh>, String> {
        let mesh_index = match node_ref.mesh {
            Some(index) => index,
            None => { return Ok(None); }
        };
        let meshes = self.json.get("meshes")
            .and_then(|m| m.as_array())
            .ok_or("meshes array was not found in json".to_owned())?;
        let mesh = meshes.get(mesh_index);
        match mesh.map(|m| m.as_object().unwrap() ) {
            Some(mesh_obj) => 
                SimpleMesh::from_obj(mesh_obj)
                    .map(|mesh| Some(mesh)),
            None => Ok(None),
        }
    }
pub fn simple_mesh_by_node < ' a > ( & ' a self , node_ref : NodeRef < ' a > ) -> Result < Option < SimpleMesh > , String > { let mesh_index = match node_ref . mesh { Some ( index ) => index , None => { return Ok ( None ) ; } } ; let meshes = self . json . get ( " " ) . and_then ( | m | m . as_array ( ) ) . ok_or ( " " . to_owned ( ) ) ? ; let mesh = meshes . get ( mesh_index ) ; match mesh . map ( | m | m . as_object ( ) . unwrap ( ) ) { Some ( mesh_obj ) => SimpleMesh :: from_obj ( mesh_obj ) . map ( | mesh | Some ( mesh ) ) , None => Ok ( None ) , } }
Find the mesh associated with the selected node.
Find the mesh associated with the selected node .
&'a self
node_ref
NodeRef<'a>