|
PolyFEM
|
The only non-legacy decoder from a logical resource path to mesh data. More...
#include <MeshLoader.hpp>
Public Member Functions | |
| MeshLoader (const io::ResourceIO &resources) | |
| std::unique_ptr< Mesh > | load_fem (const std::string &path, bool non_conforming=false) const |
| SurfaceMesh | load_surface (const std::string &path) const |
Private Member Functions | |
| void | validate_group (const std::string &group, const std::string &expected_type) const |
Private Attributes | |
| const io::ResourceIO & | resources_ |
The only non-legacy decoder from a logical resource path to mesh data.
Definition at line 15 of file MeshLoader.hpp.
|
inlineexplicit |
Definition at line 18 of file MeshLoader.hpp.
| std::unique_ptr< Mesh > polyfem::mesh::MeshLoader::load_fem | ( | const std::string & | path, |
| bool | non_conforming = false |
||
| ) | const |
Definition at line 75 of file MeshLoader.cpp.
References polyfem::mesh::Mesh::create(), polyfem::io::ResourceIO::describe(), polyfem::io::ResourceIO::exists(), polyfem::io::ResourceIO::has_attribute(), polyfem::io::ResourceIO::is_group(), polyfem::log_and_throw_error(), polyfem::io::ResourceIO::materialize(), polyfem::io::ResourceIO::open(), polyfem::io::ResourceIO::read_double_vector(), polyfem::mesh::MeshReader::read_geogram(), polyfem::mesh::MeshReader::read_hybrid(), polyfem::io::ResourceIO::read_int_matrix(), polyfem::io::ResourceIO::read_int_vector(), polyfem::io::ResourceIO::read_integer_attribute(), polyfem::io::ResourceIO::read_long_vector(), polyfem::io::ResourceIO::read_matrix(), polyfem::mesh::MeshReader::read_msh(), resources_, and validate_group().
Referenced by polyfem::mesh::GeometryLoader::load_fem_entry(), and polyfem::io::CheckpointReader::read_mesh().
| SurfaceMesh polyfem::mesh::MeshLoader::load_surface | ( | const std::string & | path | ) | const |
Definition at line 221 of file MeshLoader.cpp.
References polyfem::io::ResourceIO::describe(), polyfem::mesh::SurfaceMeshData::edges, polyfem::io::ResourceIO::exists(), polyfem::mesh::SurfaceMeshData::faces, polyfem::io::ResourceIO::is_group(), polyfem::log_and_throw_error(), polyfem::io::ResourceIO::materialize(), polyfem::mesh::SurfaceMeshData::points, polyfem::mesh::MeshReader::read_geogram_surface(), polyfem::io::ResourceIO::read_int_matrix(), polyfem::io::ResourceIO::read_int_vector(), polyfem::io::ResourceIO::read_integer_attribute(), polyfem::io::ResourceIO::read_matrix(), polyfem::mesh::MeshReader::read_msh_surface(), polyfem::mesh::MeshReader::read_obj_surface(), polyfem::mesh::MeshReader::read_triangle_surface(), resources_, validate_group(), and polyfem::mesh::SurfaceMeshData::vertices.
Referenced by polyfem::from_json::build_form(), polyfem::mesh::load_collision_proxy_mesh(), and polyfem::mesh::GeometryLoader::load_surface().
|
private |
Definition at line 54 of file MeshLoader.cpp.
References polyfem::io::ResourceIO::describe(), polyfem::io::ResourceIO::exists(), polyfem::io::ResourceIO::has_attribute(), polyfem::log_and_throw_error(), polyfem::mesh::MESH_SCHEMA_VERSION, polyfem::io::ResourceIO::read_integer_attribute(), polyfem::io::ResourceIO::read_string_attribute(), and resources_.
Referenced by load_fem(), and load_surface().
|
private |
Definition at line 26 of file MeshLoader.hpp.
Referenced by load_fem(), load_surface(), and validate_group().