Go to the documentation of this file.
16 #ifndef SURGSIM_COLLISION_ELEMENTCONTACTFILTER_H
17 #define SURGSIM_COLLISION_ELEMENTCONTACTFILTER_H
28 class PhysicsManagerState;
37 SURGSIM_STATIC_REGISTRATION(ElementContactFilter);
56 void setFilter(
const std::shared_ptr<Framework::Component>& other,
const std::vector<size_t>& indices);
61 const std::vector<size_t>&
getFilter(
const std::shared_ptr<Framework::Component>& other)
const;
65 void setRepresentation(
const std::shared_ptr<SurgSim::Framework::Component>& val);
72 typedef std::vector<std::pair<std::shared_ptr<SurgSim::Framework::Component>, std::vector<size_t>>>
FilterMapType;
79 const std::shared_ptr<Physics::PhysicsManagerState>& state,
80 const std::shared_ptr<CollisionPair>& pair)
override;
87 std::shared_ptr<SurgSim::Framework::Logger>
m_logger;
93 std::unordered_map<Framework::Component*, std::vector<size_t>>
m_writeBuffer;
95 std::unordered_map<Framework::Component*, std::vector<size_t>>
m_filters;
102 const std::shared_ptr<CollisionPair>& pair,
104 const std::vector<size_t>& filter);
114 const T&
pairAt(
const std::pair<T, T>& p,
size_t i)
116 SURGSIM_ASSERT(i == 0 || i == 1) <<
"Index for pair must be 0 or 1.";
117 return (i == 0) ? p.first : p.second;
129 SURGSIM_ASSERT(i == 0 || i == 1) <<
"Index for pair must be 0 or 1.";
130 return (i == 0) ? p.first : p.second;
#define SURGSIM_ASSERT(condition)
Assert that condition is true.
Definition: Assert.h:77
const T & pairAt(const std::pair< T, T > &p, size_t i)
Get member of pair data via indexed access, the members of the pair have to have the same type const ...
Definition: ElementContactFilter.h:114
Definition: CompoundShapeToGraphics.cpp:29