Wildmeshing Toolkit
get_attributes.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <wmtk/Mesh.hpp>
4 
5 #include <nlohmann/json.hpp>
6 
7 namespace wmtk::components::utils {
8 
17 attribute::MeshAttributeHandle get_attribute(const Mesh& m, const std::string& name);
18 
19 attribute::MeshAttributeHandle get_attribute(const Mesh& m, const nlohmann::json& attribute);
20 
21 std::vector<attribute::MeshAttributeHandle> get_attributes(
22  const Mesh& m,
23  const nlohmann::json& attribute_names);
24 
25 } // namespace wmtk::components::utils
attribute::MeshAttributeHandle get_attribute(const Mesh &m, const std::string &name)
Get an attribute handle only by name.
std::vector< attribute::MeshAttributeHandle > get_attributes(const Mesh &m, const nlohmann::json &attribute_names)
nlohmann::json json
Definition: input.cpp:9