#pragma once #include "error.h" namespace saw { namespace impl { /** * */ template struct platonic_helper { static_assert(always_false, "Unsupported platonic body. Alternatively it's not a platonic body"); }; template struct platonic_helper { static constexpr surface_edges = 3u; /* static constexpr std::array, 4u> normals = { {0.0, 0.0, -1.0}, // 1 {}, // 2 {}, // 3 {} // 4 }; */ }; template struct platonic_helper { static constexpr surface_edges = 4u; static constexpr std::array, 6u> normals = { { 1.0, 0.0, 0.0}, // 1 {-1.0, 0.0, 0.0}, // 2 { 0.0, 1.0, 0.0}, // 3 { 0.0,-1.0, 0.0}, // 4 { 0.0, 0.0, 1.0}, // 5 { 0.0, 0.0,-1.0} // 6 }; }; template struct platonic_helper { static constexpr uint8_t surface_edges = 3u; /* static constexpr std::array, 20u> normals = { {}, // 1 {}, // 2 {}, // 3 {}, // 4 {}, // 5 {}, // 6 {}, // 7 {}, // 8 {}, // 9 {}, // 10 {}, // 11 {}, // 12 {}, // 13 {}, // 14 {}, // 15 {}, // 16 {}, // 17 {}, // 18 {}, // 19 {} // 20 }; */ }; } /** * Container for describing each platonic body with * helpers describing the orientation of each body. */ template class platonic { private: /** * Storage for the surfaces */ std::array surfaces_; public: constexpr uint8_t get_surface_edge_size() constexpr { return platonic_helper::surface_edges; } constexpr uint8_t get_surface_size() constexpr { return N; } T& at(uint8_t i){ return surface_.at(i); } const T& at(uint8_t i) const { return surface_.at(i); } constexpr std::array& get_surface_normal(size_t i) constexpr { } }; }