35 const std::vector<basis::ElementBases> &bases,
36 const std::vector<basis::ElementBases> &geom_bases,
37 const std::vector<mesh::LocalBoundary> &total_local_boundary,
41 Eigen::MatrixXd &proxy_vertices,
42 Eigen::MatrixXi &proxy_faces,
43 std::vector<Eigen::Triplet<double>> &displacement_map,
55 const std::vector<basis::ElementBases> &bases,
56 const std::vector<basis::ElementBases> &geom_bases,
57 const std::vector<mesh::LocalBoundary> &total_local_boundary,
60 const Eigen::MatrixXd &proxy_vertices,
62 std::vector<Eigen::Triplet<double>> &displacement_map);
75 const std::string &mesh_filename,
76 const std::string &weights_filename,
77 const Eigen::VectorXi &in_node_to_node,
78 const json &transformation,
79 Eigen::MatrixXd &vertices,
80 Eigen::VectorXi &codim_vertices,
81 Eigen::MatrixXi &edges,
82 Eigen::MatrixXi &
faces,
83 std::vector<Eigen::Triplet<double>> &displacement_map_entries);
93 const std::string &mesh_filename,
94 const json &transformation,
95 Eigen::MatrixXd &vertices,
96 Eigen::VectorXi &codim_vertices,
97 Eigen::MatrixXi &edges,
98 Eigen::MatrixXi &
faces);
105 const std::string &weights_filename,
106 const Eigen::VectorXi &in_node_to_node,
107 const size_t num_proxy_vertices,
108 std::vector<Eigen::Triplet<double>> &displacement_map_entries);
std::vector< Eigen::VectorXi > faces
void load_collision_proxy(const std::string &mesh_filename, const std::string &weights_filename, const Eigen::VectorXi &in_node_to_node, const json &transformation, Eigen::MatrixXd &vertices, Eigen::VectorXi &codim_vertices, Eigen::MatrixXi &edges, Eigen::MatrixXi &faces, std::vector< Eigen::Triplet< double > > &displacement_map_entries)
Load a collision proxy mesh and displacement map from files.
void build_collision_proxy(const std::vector< basis::ElementBases > &bases, const std::vector< basis::ElementBases > &geom_bases, const std::vector< LocalBoundary > &total_local_boundary, const int n_bases, const int dim, const double max_edge_length, Eigen::MatrixXd &proxy_vertices, Eigen::MatrixXi &proxy_faces, std::vector< Eigen::Triplet< double > > &displacement_map_entries, const CollisionProxyTessellation tessellation)
NLOHMANN_JSON_SERIALIZE_ENUM(CollisionProxyTessellation, {{CollisionProxyTessellation::REGULAR, "regular"}, {CollisionProxyTessellation::IRREGULAR, "irregular"}})
void build_collision_proxy_displacement_map(const std::vector< basis::ElementBases > &bases, const std::vector< basis::ElementBases > &geom_bases, const std::vector< mesh::LocalBoundary > &total_local_boundary, const int n_bases, const int dim, const Eigen::MatrixXd &proxy_vertices, std::vector< Eigen::Triplet< double > > &displacement_map_entries)
Build a collision proxy displacement map for a given mesh and proxy mesh.
void load_collision_proxy_mesh(const std::string &mesh_filename, const json &transformation, Eigen::MatrixXd &vertices, Eigen::VectorXi &codim_vertices, Eigen::MatrixXi &edges, Eigen::MatrixXi &faces)
Load a collision proxy mesh from a file.
double max_edge_length(const Eigen::MatrixXd &V, const Eigen::MatrixXi &F)
Compute the maximum edge length of a triangle mesh (V, F)
CollisionProxyTessellation
@ IRREGULAR
Irregular tessellation of the mesh (requires POLYFEM_WITH_TRIANGLE)
@ REGULAR
Regular tessellation of the mesh.
void load_collision_proxy_displacement_map(const std::string &weights_filename, const Eigen::VectorXi &in_node_to_node, const size_t num_proxy_vertices, std::vector< Eigen::Triplet< double > > &displacement_map_entries)
Load a collision proxy displacement map from files.