本文整理汇总了C++中Fixture::Synchronize方法的典型用法代码示例。如果您正苦于以下问题:C++ Fixture::Synchronize方法的具体用法?C++ Fixture::Synchronize怎么用?C++ Fixture::Synchronize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fixture
的用法示例。
在下文中一共展示了Fixture::Synchronize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SynchronizeFixtures
void Body::SynchronizeFixtures()
{
Transform2D xf1;
xf1.q.Set(m_sweep.a0);
xf1.p = m_sweep.c0 - Rotation2D::Mul(xf1.q, m_sweep.localCenter);
BroadPhase* broadPhase = &m_world->m_contactManager.m_broadPhase;
for (Fixture* f = m_fixtureList; f; f = f->m_next)
{
f->Synchronize(broadPhase, xf1, m_xf);
}
}
示例2:
void Body::SetTransform2D(const glm::vec2& position, real32 angle)
{
assert(m_world->IsLocked() == false);
if (m_world->IsLocked() == true)
{
return;
}
m_xf.q.Set(angle);
m_xf.p = position;
m_sweep.c = Transform2D::Mul(m_xf, m_sweep.localCenter);
m_sweep.a = angle;
m_sweep.c0 = m_sweep.c;
m_sweep.a0 = angle;
BroadPhase* broadPhase = &m_world->m_contactManager.m_broadPhase;
for (Fixture* f = m_fixtureList; f; f = f->m_next)
{
f->Synchronize(broadPhase, m_xf, m_xf);
}
}