void parse (StringParser& p, Math::Vector3<T>& out) { size_t start = p.pos (); p.expect (typeid (Math::Vector3<T>), start, '('); parse (p, out.x ()); p.expect (typeid (Math::Vector3<T>), start, ','); parse (p, out.y ()); p.expect (typeid (Math::Vector3<T>), start, ','); parse (p, out.z ()); p.expect (typeid (Math::Vector3<T>), start, ')'); }
void parse (StringParser& p, Math::DiagMatrix3<T>& out) { size_t start = p.pos (); if (p.peek () == '(') { p.expect (typeid (Math::DiagMatrix3<T>), start, '('); parse (p, out.m11 ()); p.expect (typeid (Math::DiagMatrix3<T>), start, ','); parse (p, out.m22 ()); p.expect (typeid (Math::DiagMatrix3<T>), start, ','); parse (p, out.m33 ()); p.expect (typeid (Math::DiagMatrix3<T>), start, ')'); } else { T value; parse (p, value); out = Math::DiagMatrix3<T> (value, value, value); } }