本文整理了Java中org.jbox2d.dynamics.Body.getContactList()
方法的一些代码示例,展示了Body.getContactList()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Body.getContactList()
方法的具体详情如下:
包路径:org.jbox2d.dynamics.Body
类名称:Body
方法名:getContactList
[英]Get the list of all contacts attached to this body.
[中]获取附加到此正文的所有联系人的列表。
代码示例来源:origin: libgdx/libgdx
/**
* Call this if you want to establish collision that was previously disabled by
* ContactFilter::ShouldCollide.
*/
public void refilter() {
if (m_body == null) {
return;
}
// Flag associated contacts for filtering.
ContactEdge edge = m_body.getContactList();
while (edge != null) {
Contact contact = edge.contact;
Fixture fixtureA = contact.getFixtureA();
Fixture fixtureB = contact.getFixtureB();
if (fixtureA == this || fixtureB == this) {
contact.flagForFiltering();
}
edge = edge.next;
}
World world = m_body.getWorld();
if (world == null) {
return;
}
// Touch each proxy so that new pairs may be created
BroadPhase broadPhase = world.m_contactManager.m_broadPhase;
for (int i = 0; i < m_proxyCount; ++i) {
broadPhase.touchProxy(m_proxies[i].proxyId);
}
}
代码示例来源:origin: libgdx/libgdx
ContactEdge edge = bodyB.getContactList();
while (edge != null) {
if (edge.other == bodyA) {
代码示例来源:origin: libgdx/libgdx
ContactEdge edge = bodyB.getContactList();
while (edge != null) {
if (edge.other == bodyA) {
代码示例来源:origin: libgdx/libgdx
ContactEdge edge = bodyB.getContactList();
while (edge != null) {
if (edge.other == bodyA) {
代码示例来源:origin: jbox2d/jbox2d
/**
* Call this if you want to establish collision that was previously disabled by
* ContactFilter::ShouldCollide.
*/
public void refilter() {
if (m_body == null) {
return;
}
// Flag associated contacts for filtering.
ContactEdge edge = m_body.getContactList();
while (edge != null) {
Contact contact = edge.contact;
Fixture fixtureA = contact.getFixtureA();
Fixture fixtureB = contact.getFixtureB();
if (fixtureA == this || fixtureB == this) {
contact.flagForFiltering();
}
edge = edge.next;
}
World world = m_body.getWorld();
if (world == null) {
return;
}
// Touch each proxy so that new pairs may be created
BroadPhase broadPhase = world.m_contactManager.m_broadPhase;
for (int i = 0; i < m_proxyCount; ++i) {
broadPhase.touchProxy(m_proxies[i].proxyId);
}
}
代码示例来源:origin: jbox2d/jbox2d
ContactEdge edge = bodyB.getContactList();
while (edge != null) {
if (edge.other == bodyA) {
代码示例来源:origin: jbox2d/jbox2d
ContactEdge edge = bodyB.getContactList();
while (edge != null) {
if (edge.other == bodyA) {
代码示例来源:origin: jbox2d/jbox2d
ContactEdge edge = bodyB.getContactList();
while (edge != null) {
if (edge.other == bodyA) {
代码示例来源:origin: andmizi/MobikeTags
/**
* Call this if you want to establish collision that was previously disabled by
* ContactFilter::ShouldCollide.
*/
public void refilter() {
if (m_body == null) {
return;
}
// Flag associated contacts for filtering.
ContactEdge edge = m_body.getContactList();
while (edge != null) {
Contact contact = edge.contact;
Fixture fixtureA = contact.getFixtureA();
Fixture fixtureB = contact.getFixtureB();
if (fixtureA == this || fixtureB == this) {
contact.flagForFiltering();
}
edge = edge.next;
}
World world = m_body.getWorld();
if (world == null) {
return;
}
// Touch each proxy so that new pairs may be created
BroadPhase broadPhase = world.m_contactManager.m_broadPhase;
for (int i = 0; i < m_proxyCount; ++i) {
broadPhase.touchProxy(m_proxies[i].proxyId);
}
}
代码示例来源:origin: com.github.almasb/fxgl-physics
/**
* Call this if you want to establish collision that was previously disabled by
* ContactFilter::ShouldCollide.
*/
public void refilter() {
// Flag associated contacts for filtering.
ContactEdge edge = body.getContactList();
while (edge != null) {
Contact contact = edge.contact;
Fixture fixtureA = contact.getFixtureA();
Fixture fixtureB = contact.getFixtureB();
if (fixtureA == this || fixtureB == this) {
contact.flagForFiltering();
}
edge = edge.next;
}
World world = body.getWorld();
if (world == null) {
return;
}
// Touch each proxy so that new pairs may be created
BroadPhase broadPhase = world.m_contactManager.m_broadPhase;
for (int i = 0; i < proxyCount; ++i) {
broadPhase.touchProxy(m_proxies[i].proxyId);
}
}
代码示例来源:origin: org.jbox2d/jbox2d-library
/**
* Call this if you want to establish collision that was previously disabled by
* ContactFilter::ShouldCollide.
*/
public void refilter() {
if (m_body == null) {
return;
}
// Flag associated contacts for filtering.
ContactEdge edge = m_body.getContactList();
while (edge != null) {
Contact contact = edge.contact;
Fixture fixtureA = contact.getFixtureA();
Fixture fixtureB = contact.getFixtureB();
if (fixtureA == this || fixtureB == this) {
contact.flagForFiltering();
}
edge = edge.next;
}
World world = m_body.getWorld();
if (world == null) {
return;
}
// Touch each proxy so that new pairs may be created
BroadPhase broadPhase = world.m_contactManager.m_broadPhase;
for (int i = 0; i < m_proxyCount; ++i) {
broadPhase.touchProxy(m_proxies[i].proxyId);
}
}
代码示例来源:origin: com.github.almasb/fxgl-physics
ContactEdge edge = bodyB.getContactList();
while (edge != null) {
if (edge.other == bodyA) {
代码示例来源:origin: org.jbox2d/jbox2d-library
ContactEdge edge = bodyB.getContactList();
while (edge != null) {
if (edge.other == bodyA) {
代码示例来源:origin: andmizi/MobikeTags
ContactEdge edge = bodyB.getContactList();
while (edge != null) {
if (edge.other == bodyA) {
代码示例来源:origin: com.github.almasb/fxgl-physics
ContactEdge edge = bodyB.getContactList();
while (edge != null) {
if (edge.other == bodyA) {
代码示例来源:origin: org.jbox2d/jbox2d-library
ContactEdge edge = bodyB.getContactList();
while (edge != null) {
if (edge.other == bodyA) {
代码示例来源:origin: andmizi/MobikeTags
ContactEdge edge = bodyB.getContactList();
while (edge != null) {
if (edge.other == bodyA) {
代码示例来源:origin: andmizi/MobikeTags
ContactEdge edge = bodyB.getContactList();
while (edge != null) {
if (edge.other == bodyA) {
代码示例来源:origin: com.github.almasb/fxgl-physics
ContactEdge edge = bodyB.getContactList();
while (edge != null) {
if (edge.other == bodyA) {
代码示例来源:origin: org.jbox2d/jbox2d-library
ContactEdge edge = bodyB.getContactList();
while (edge != null) {
if (edge.other == bodyA) {
内容来源于网络,如有侵权,请联系作者删除!