MCPcopy Create free account
hub / github.com/defold/defold / SetFilterData

Method SetFilterData

external/box2d_v2/Box2D/Dynamics/b2Fixture.cpp:212–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210}
211
212void b2Fixture::SetFilterData(const b2Filter& filter, int32 index)
213{
214 // Defold modifications. Added index
215 m_filters[index * m_shape->m_filterPerChild] = filter;
216
217 // Defold modifications. If the body is a grid,
218 // we skip updating the proxy list since that will
219 // potentially expand the movement buffer.
220 // Instead, we just flag the entire body for
221 // filtering, which is what the argument passed into
222 // the function is for.
223 Refilter(GetType() != b2Shape::e_grid);
224}
225
226void b2Fixture::Refilter(bool touchProxies)
227{

Callers 5

SetCollisionObjectFilterFunction · 0.80
SetGroup2DFunction · 0.80
SetMaskBit2DFunction · 0.80
ReplaceShape2DFunction · 0.80
Fixture_SetFilterDataFunction · 0.80

Calls 1

GetTypeFunction · 0.50

Tested by

no test coverage detected