From a142b8da33e6c6657a7aa529ddf0f1c0882ff0d5 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 20 Feb 2023 23:59:24 +0000 Subject: Accept a CSV for glm::vec data --- lib/persistence.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/persistence.h b/lib/persistence.h index e1f7605..01b2a7e 100644 --- a/lib/persistence.h +++ b/lib/persistence.h @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -187,6 +188,17 @@ namespace Persistence { }; using SelectionV::SelectionV; + using SelectionV::setValue; + + void + setValue(std::string && s) override + { + std::stringstream ss {std::move(s)}; + for (glm::length_t n = 0; n < L; n += 1) { + ss >> this->v[n]; + ss.get(); + } + } void beginArray(Stack & stk) override -- cgit v1.2.3