3 #include "combined/model/min_size_vector.h" 5 #include "core/cl/scene_structs.h" 6 #include "core/serialize/surface.h" 14 explicit material(std::string name =
"new material",
16 core::make_surface<core::simulation_bands>(0.05,
19 void set_name(std::string name);
20 std::string get_name()
const;
25 template <
typename Archive>
26 void serialize(Archive& archive) {
27 archive(name_, surface_);
30 NOTIFYING_COPY_ASSIGN_DECLARATION(
material)
32 void swap(
material& other) noexcept {
34 swap(name_, other.name_);
35 swap(surface_, other.surface_);
47 template <
size_t MinimumSize,
typename It>
48 auto materials_from_names(It b, It e) {
49 const auto distance = std::distance(b, e);
50 if (distance < MinimumSize) {
51 throw std::runtime_error{
52 "Range passed to 'materials_from_names' is shorter than the " 55 const auto extra = distance - MinimumSize;
59 for (
auto i = 0; b != e; ++b, ++i) {
Definition: capsule_base.h:9
A vector which must hold some minimum number of elements.
Definition: min_size_vector.h:11
Definition: material.h:12