4 #define CLEARANCE_UTILS_AVAILABLE 1
5 #define MED_AXIS_AVAILABLE 1
6 #define POINT_CONSTRUCTION_AVAILABLE 1
7 #define REACHABILITY_UTIL_AVAILABLE 1
8 #define SAFE_INTERVAL_TOOL_AVAILABLE 1
9 #define SKELETON_CLEARANCE_AVAILABLE 1
10 #define TOPOLOGICAL_MAP_AVAILABLE 1
11 #define TET_GEN_DECOMP_AVAILABLE 1
12 #define REEB_GRAPH_AVAILABLE 1
13 #define MEAN_CURVE_SKEL_AVAILABLE 1
14 #define WRENCH_ACCESS_TOOL_AVAILABLE 1
17 #include <unordered_map>
21 #ifdef CLEARANCE_UTILS_AVAILABLE
25 #ifdef MED_AXIS_AVAILABLE
29 #ifdef MEAN_CURVE_SKEL_AVAILABLE
33 #ifdef REEB_GRAPH_AVAILABLE
37 #ifdef SAFE_INTERVAL_TOOL_AVAILABLE
41 #ifdef SKELETON_CLEARANCE_AVAILABLE
45 #ifdef TET_GEN_DECOMP_AVAILABLE
50 #ifdef TOPOLOGICAL_MAP_AVAILABLE
54 #ifdef REACHABILITY_UTIL_AVAILABLE
58 #ifdef POINT_CONSTRUCTION_AVAILABLE
62 #ifdef WRENCH_ACCESS_TOOL_AVAILABLE
98 template <
typename Utility>
99 using LabelMap = std::unordered_map<std::string, Utility*>;
107 #ifdef CLEARANCE_UTILS_AVAILABLE
108 LabelMap<ClearanceUtility> m_clearanceUtils;
111 #ifdef MED_AXIS_AVAILABLE
112 LabelMap<MedialAxisUtility> m_medialAxisUtils;
115 #ifdef SKELETON_CLEARANCE_AVAILABLE
116 LabelMap<SkeletonClearanceUtility> m_skeletonUtils;
119 #ifdef TOPOLOGICAL_MAP_AVAILABLE
120 LabelMap<TopologicalMap> m_topologicalMaps;
123 #ifdef SAFE_INTERVAL_TOOL_AVAILABLE
124 LabelMap<SafeIntervalTool> m_safeIntervalTools;
127 #ifdef REACHABILITY_UTIL_AVAILABLE
128 LabelMap<ReachabilityUtil> m_reachabilityUtils;
131 #ifdef POINT_CONSTRUCTION_AVAILABLE
132 LabelMap<PointConstruction> m_pointConstruction;
135 #ifdef WRENCH_ACCESS_TOOL_AVAILABLE
136 LabelMap<WrenchAccessibilityTool> m_wrenchAccessibilityTools;
139 #ifdef TET_GEN_DECOMP_AVAILABLE
140 std::unordered_map<std::string, TetGenDecomposition> m_tetgens;
141 std::unordered_map<std::string, const WorkspaceDecomposition*> m_decompositions;
169 #ifdef CLEARANCE_UTILS_AVAILABLE
190 #ifdef MED_AXIS_AVAILABLE
211 #ifdef SKELETON_CLEARANCE_AVAILABLE
220 const std::string& _label)
const;
232 #ifdef TOPOLOGICAL_MAP_AVAILABLE
252 #ifdef SAFE_INTERVAL_TOOL_AVAILABLE
273 #ifdef TET_GEN_DECOMP_AVAILABLE
291 #ifdef REACHABILITY_UTIL_AVAILABLE
308 #ifdef POINT_CONSTRUCTION_AVAILABLE
325 #ifdef WRENCH_ACCESS_TOOL_AVAILABLE
353 template <
typename Utility>
354 Utility* GetUtility(
const std::string& _label,
355 const LabelMap<Utility>& _map)
const;
362 template <
typename Utility>
363 void SetUtility(
const std::string& _label, Utility* _utility,
364 LabelMap<Utility>& _map)
const;
372 template <
typename Utility>
376 GetUtility(
const std::string& _label,
const LabelMap<Utility>& _map)
const {
378 return _map.at(_label);
380 catch(
const std::out_of_range&) {
383 <<
" '" << _label <<
"' does not exist.";
385 catch(
const std::exception& _e) {
388 <<
" '" << _label <<
"': " << _e.what();
393 <<
" '" << _label <<
"': (unknown).";
398 template <
typename Utility>
401 SetUtility(
const std::string& _label, Utility* _utility,
402 LabelMap<Utility>& _map)
const {
404 _utility->SetMPLibrary(m_library);
407 auto iter = _map.find(_label);
408 const bool alreadyExists = iter != _map.end();
413 iter->second = _utility;
416 _map.insert({_label, _utility});
#define WHERE
Macro for retrieving info about file, function, and line number.
Definition: RuntimeUtils.h:32
Definition: ClearanceUtilities.h:48
Definition: MPLibrary.h:47
Definition: PointConstruction.h:7
Definition: ReachabilityUtil.h:19
Definition: SkeletonClearanceUtility.h:13
Definition: TopologicalMap.h:38
Definition: WorkspaceDecomposition.h:24
Definition: PMPLExceptions.h:62