extract explicit mesh with topology information from implicit surfaces with boolean operations, and do surface/volume integrating on them.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

35 lines
911 B

#pragma once
#include <implicit_arrangement.hpp>
struct plane_group_t {
plane_group_t() = default;
template <typename InputIt>
plane_group_t(InputIt first, InputIt last)
{
internal_planes = {
plane_t{1, 0, 0, 0},
plane_t{0, 1, 0, 0},
plane_t{0, 0, 1, 0},
plane_t{0, 0, 0, 1}
};
planes.insert(planes.end(), std::make_move_iterator(first), std::make_move_iterator(last));
}
template <typename Container>
plane_group_t(Container&& container)
: plane_group_t(std::begin(std::forward<Container>(container)), std::end(std::forward<Container>(container)))
{
}
auto get_plane(uint32_t index) const noexcept
{
if (index < 4) return internal_planes[index];
return planes[index - 4];
}
std::array<plane_t, 4> internal_planes{};
stl_vector_mp<plane_t> planes{};
};