BBox get(Dir dir) const { switch (dir) { case Dir::swd: return getSwd(); break; case Dir::sed: return getSed(); break; case Dir::nwd: return getNwd(); break; case Dir::ned: return getNed(); break; case Dir::swu: return getSwu(); break; case Dir::seu: return getSeu(); break; case Dir::nwu: return getNwu(); break; case Dir::neu: return getNeu(); break; } throw std::runtime_error( "Invalid Dir to BBox::get: " + std::to_string(static_cast<int>(dir))); }
Bounds get(Dir dir, bool force2d = false) const { if (force2d) dir = toDir(toIntegral(dir, true)); switch (dir) { case Dir::swd: return getSwd(force2d); break; case Dir::sed: return getSed(force2d); break; case Dir::nwd: return getNwd(force2d); break; case Dir::ned: return getNed(force2d); break; case Dir::swu: return getSwu(); break; case Dir::seu: return getSeu(); break; case Dir::nwu: return getNwu(); break; case Dir::neu: return getNeu(); break; } throw std::runtime_error( "Invalid Dir to Bounds::get: " + std::to_string(toIntegral(dir))); }