MCPcopy Create free account
hub / github.com/cinder/Cinder / Synchronize

Method Synchronize

blocks/Box2D/src/Box2D/Dynamics/b2Fixture.cpp:152–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152void b2Fixture::Synchronize(b2BroadPhase* broadPhase, const b2Transform& transform1, const b2Transform& transform2)
153{
154 if (m_proxyCount == 0)
155 {
156 return;
157 }
158
159 for (int32 i = 0; i < m_proxyCount; ++i)
160 {
161 b2FixtureProxy* proxy = m_proxies + i;
162
163 // Compute an AABB that covers the swept shape (may miss some rotation effect).
164 b2AABB aabb1, aabb2;
165 m_shape->ComputeAABB(&aabb1, transform1, proxy->childIndex);
166 m_shape->ComputeAABB(&aabb2, transform2, proxy->childIndex);
167
168 proxy->aabb.Combine(aabb1, aabb2);
169
170 b2Vec2 displacement = transform2.p - transform1.p;
171
172 broadPhase->MoveProxy(proxy->proxyId, proxy->aabb, displacement);
173 }
174}
175
176void b2Fixture::SetFilterData(const b2Filter& filter)
177{

Callers 2

SetTransformMethod · 0.80
SynchronizeFixturesMethod · 0.80

Calls 3

CombineMethod · 0.80
ComputeAABBMethod · 0.45
MoveProxyMethod · 0.45

Tested by

no test coverage detected