PolyFEM
Loading...
Searching...
No Matches
MeshReader.hpp
Go to the documentation of this file.
1#pragma once
2
4
5#include <filesystem>
6#include <istream>
7
8namespace GEO
9{
10 class Mesh;
11}
12
13namespace polyfem::mesh
14{
16 {
17 public:
18 Eigen::MatrixXd vertices;
19 Eigen::VectorXi points;
20 Eigen::MatrixXi edges;
21 Eigen::MatrixXi faces;
22 };
23
26 {
27 public:
28 static MeshData read_msh(const std::filesystem::path &path);
29 static MeshData read_hybrid(std::istream &input, const std::string &description);
30 static MeshData read_geogram(const std::filesystem::path &path);
31 static MeshData from_geogram(GEO::Mesh &mesh);
32
33 static SurfaceMeshData read_msh_surface(const std::filesystem::path &path);
34 static SurfaceMeshData read_obj_surface(const std::filesystem::path &path);
35 static bool read_triangle_surface(const std::filesystem::path &path, SurfaceMeshData &result);
36 static SurfaceMeshData read_geogram_surface(const std::filesystem::path &path);
37 };
38} // namespace polyfem::mesh
Format-independent input used to construct a runtime Mesh.
Definition MeshData.hpp:12
Stateless format decoders used exclusively by MeshLoader and in-memory adapters.
static MeshData read_hybrid(std::istream &input, const std::string &description)
static MeshData read_msh(const std::filesystem::path &path)
static bool read_triangle_surface(const std::filesystem::path &path, SurfaceMeshData &result)
static SurfaceMeshData read_geogram_surface(const std::filesystem::path &path)
static SurfaceMeshData read_obj_surface(const std::filesystem::path &path)
static SurfaceMeshData read_msh_surface(const std::filesystem::path &path)
static MeshData read_geogram(const std::filesystem::path &path)
static MeshData from_geogram(GEO::Mesh &mesh)