1 #ifndef PMPL_GRID_OVERLAY_H_
2 #define PMPL_GRID_OVERLAY_H_
6 #include "Transformation.h"
11 #include <unordered_set>
64 size_t Size() const noexcept;
69 size_t Size(const
size_t _i) const noexcept;
95 const
mathtool::Transformation& _transformation = {},
109 const Point3d& _max)
const;
142 Point3d
CellCenter(const
size_t _index) const noexcept;
158 const
bool _useCollisionDetection = false) const;
170 IndexSet Cell(const Point3d& _p) const noexcept;
173 size_t CellIndex(const
size_t _x, const
size_t _y, const
size_t _z) const
177 size_t CellIndex(const
IndexSet& _indexes) const noexcept;
180 size_t ZIndex(const
size_t _index) const noexcept;
183 size_t YIndex(const
size_t _index) const noexcept;
186 size_t XIndex(const
size_t _index) const noexcept;
191 bool InGrid(const
IndexSet& _indexes) const noexcept;
199 const
double m_length;
202 static constexpr
bool m_debug{
false};
204 mutable std::unique_ptr<GMSPolyhedron> m_polyhedron;
217 void Test(
const size_t _trials = 0)
const;
Definition: Boundary.h:30
Definition: GMSPolyhedron.h:42
Definition: GridOverlay.h:32
std::unordered_set< size_t > LocateFacetNeighbors(const size_t _index) const
Definition: GridOverlay.cpp:186
Point3d CellCenter(const size_t _index) const noexcept
Definition: GridOverlay.cpp:309
std::unordered_set< size_t > LocateBBXCells(const Boundary *const _b) const
Definition: GridOverlay.cpp:132
std::unordered_set< size_t > LocateCells(const Boundary *const _b, const CellSet _type=CellSet::Closure) const
Definition: GridOverlay.cpp:75
double CellLength() const noexcept
Get the length of the grid cells.
Definition: GridOverlay.cpp:302
std::unordered_set< size_t > LocateVertexNeighbors(const size_t _index) const
Definition: GridOverlay.cpp:248
size_t LocateCell(const Cfg &_cfg) const
Definition: GridOverlay.cpp:61
std::unordered_set< size_t > LocateEdgeNeighbors(const size_t _index) const
Definition: GridOverlay.cpp:214
std::array< size_t, 3 > IndexSet
A set of X, Y, Z indexes for a grid cell.
Definition: GridOverlay.h:43
GridOverlay(const Boundary *const _b, const double _length)
Definition: GridOverlay.cpp:19
std::vector< std::vector< const WorkspaceRegion * > > DecompositionMap
A mapping from a grid cell index to a set of workspace regions.
Definition: GridOverlay.h:40
std::unordered_set< size_t > LocateAllNeighbors(const size_t _index) const
Definition: GridOverlay.cpp:278
size_t Size() const noexcept
Get the number of cells in the grid.
Definition: GridOverlay.cpp:47
DecompositionMap ComputeDecompositionMap(const WorkspaceDecomposition *const _decomposition, const bool _useCollisionDetection=false) const
Definition: GridOverlay.cpp:333
void Test(const size_t _trials=0) const
Definition: GridOverlay.cpp:422
CellSet
The types of cell sets for use with LocateCells.
Definition: GridOverlay.h:46
A two or three dimensional bounding box in workspace.
Definition: WorkspaceBoundingBox.h:10
Definition: WorkspaceDecomposition.h:24
Definition: WorkspaceRegion.h:18