7#include "reusex/geometry/CoplanarPolygon.hpp"
55struct fmt::formatter<
reusex::geometry::BuildingComponent>
56 : fmt::formatter<std::string_view> {
58 format_context &ctx)
const -> format_context::iterator {
59 return fmt::format_to(ctx.out(),
"{} ({} vertices)", value.name,
60 value.boundary.vertices.size());
std::string_view to_string(ComponentType type)
ComponentType
Discriminator for building component types.
ComponentType component_type_from_string(std::string_view str)
void component_data_from_json(BuildingComponent &c, const std::string &json)
Deserialize JSON TEXT into the variant data on a BuildingComponent.
std::string component_data_to_json(const BuildingComponent &c)
Serialize the type-specific variant data to JSON TEXT.
A detected or manual building component (window, door, wall, ...).
std::variant< WindowData, DoorData, WallData > data
A closed 3D polygon whose vertices are coplanar.