本文整理汇总了C++中Fixture::Dump方法的典型用法代码示例。如果您正苦于以下问题:C++ Fixture::Dump方法的具体用法?C++ Fixture::Dump怎么用?C++ Fixture::Dump使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fixture
的用法示例。
在下文中一共展示了Fixture::Dump方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Dump
void Body::Dump()
{
s32 bodyIndex = m_islandIndex;
printf("{\n");
printf(" BodyDef bd;\n");
printf(" bd.type = BodyType(%d);\n", m_type);
printf(" bd.position.Set(%.15lef, %.15lef);\n", m_xf.p.x, m_xf.p.y);
printf(" bd.angle = %.15lef;\n", m_sweep.a);
printf(" bd.linearVelocity.Set(%.15lef, %.15lef);\n", m_linearVelocity.x, m_linearVelocity.y);
printf(" bd.angularVelocity = %.15lef;\n", m_angularVelocity);
printf(" bd.linearDamping = %.15lef;\n", m_linearDamping);
printf(" bd.angularDamping = %.15lef;\n", m_angularDamping);
printf(" bd.allowSleep = bool(%d);\n", m_flags & autoSleepFlag);
printf(" bd.awake = bool(%d);\n", m_flags & awakeFlag);
printf(" bd.fixedRotation = bool(%d);\n", m_flags & fixedRotationFlag);
printf(" bd.bullet = bool(%d);\n", m_flags & bulletFlag);
printf(" bd.active = bool(%d);\n", m_flags & activeFlag);
printf(" bd.gravityScale = %.15lef;\n", m_gravityScale);
printf(" bodies[%d] = m_world->CreateBody(&bd);\n", m_islandIndex);
printf("\n");
for (Fixture* f = m_fixtureList; f; f = f->m_next)
{
printf(" {\n");
f->Dump(bodyIndex);
printf(" }\n");
}
printf("}\n");
}