mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 13:23:59 +00:00
committed by
Konstantin Pastbin
parent
c9cbb64f12
commit
76ffc99abd
23
libs/geometry/region2d/binary_operators.hpp
Normal file
23
libs/geometry/region2d/binary_operators.hpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "geometry/region2d.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace m2
|
||||
{
|
||||
using MultiRegionI = std::vector<RegionI>;
|
||||
|
||||
/// @name Next functions work in _append_ mode to the result.
|
||||
/// @{
|
||||
void IntersectRegions(RegionI const & r1, RegionI const & r2, MultiRegionI & res);
|
||||
void DiffRegions(RegionI const & r1, RegionI const & r2, MultiRegionI & res);
|
||||
/// @}
|
||||
|
||||
MultiRegionI IntersectRegions(RegionI const & r1, MultiRegionI const & r2);
|
||||
|
||||
/// Union \a r with \a res and save to \a res.
|
||||
void AddRegion(RegionI const & r, MultiRegionI & res);
|
||||
|
||||
uint64_t Area(MultiRegionI const & rgn);
|
||||
} // namespace m2
|
||||
Reference in New Issue
Block a user