#pragma once #include /** * A 2D edge is defined by 3 implicit hyperplanes. The first end point is * the intersection of `prev_plane` and `curr_plane`. The second end point is * the intersection of `next_plane` and `curr_plane`. */ template struct Edge; template <> struct Edge<2> { uint32_t prev_plane, curr_plane, next_plane; }; template <> struct Edge<3> { uint32_t supporting_plane; uint32_t prev_plane, curr_plane, next_plane; }; template struct Face; template <> struct Face<3> { small_vector_mp edge_planes{}; uint32_t supporting_plane; }; template struct Cell; template <> struct Cell<2> { small_vector_mp edges{}; }; template <> struct Cell<3> { small_vector_mp faces{}; }; static constexpr auto INVALID_INDEX = std::numeric_limits::max();