One contact manager per calling thread, all cloned from one configured prototype.
More...
template<typename ManagerT>
class tesseract::collision::PerThreadContactManager< ManagerT >
One contact manager per calling thread, all cloned from one configured prototype.
A contact manager is not thread safe: a contact test reads the transforms the last setCollisionObjectsTransform wrote. Code that may be called from several threads at once (a motion planner's collision evaluators, state validators, edge evaluators) holds one of these instead of a manager, and calls get() to obtain the calling thread's own manager.
- The prototype is configured once, before construction, and is never handed out or used for a contact test.
- A thread's manager is cloned from the prototype on that thread's first call to get(), keyed by std::thread::id.
- Managers live until this object is destroyed. A thread that is given the id of a thread that has exited reuses that thread's manager, which is safe because no two live threads share an id.
- A thread's manager keeps the state that thread left in it, such as object transforms. Callers set every transform they rely on before each contact test.
- Template Parameters
-