本文整理汇总了Java中org.jbox2d.pooling.IDynamicStack类的典型用法代码示例。如果您正苦于以下问题:Java IDynamicStack类的具体用法?Java IDynamicStack怎么用?Java IDynamicStack使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IDynamicStack类属于org.jbox2d.pooling包,在下文中一共展示了IDynamicStack类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: addType
import org.jbox2d.pooling.IDynamicStack; //导入依赖的package包/类
private void addType(IDynamicStack<Contact> creator, ShapeType type1, ShapeType type2) {
ContactRegister register = new ContactRegister();
register.creator = creator;
register.primary = true;
contactStacks[type1.ordinal()][type2.ordinal()] = register;
if (type1 != type2) {
ContactRegister register2 = new ContactRegister();
register2.creator = creator;
register2.primary = false;
contactStacks[type2.ordinal()][type1.ordinal()] = register2;
}
}
开发者ID:jfcameron,项目名称:G2Dj,代码行数:14,代码来源:World.java
示例2: pushContact
import org.jbox2d.pooling.IDynamicStack; //导入依赖的package包/类
public void pushContact(Contact contact) {
Fixture fixtureA = contact.getFixtureA();
Fixture fixtureB = contact.getFixtureB();
if (contact.m_manifold.pointCount > 0 && !fixtureA.isSensor() && !fixtureB.isSensor()) {
fixtureA.getBody().setAwake(true);
fixtureB.getBody().setAwake(true);
}
ShapeType type1 = fixtureA.getType();
ShapeType type2 = fixtureB.getType();
IDynamicStack<Contact> creator = contactStacks[type1.ordinal()][type2.ordinal()].creator;
creator.push(contact);
}
开发者ID:jfcameron,项目名称:G2Dj,代码行数:16,代码来源:World.java
示例3: testCircleContactStack
import org.jbox2d.pooling.IDynamicStack; //导入依赖的package包/类
@Test
public void testCircleContactStack() {
System.out.println("A");
DefaultWorldPool thePool = new DefaultWorldPool(10, 10);
System.out.println("B");
IDynamicStack<Contact> theCircleStack = thePool.getCircleContactStack();
System.out.println("C");
Contact theContact = theCircleStack.pop();
System.out.println("D");
Assert.assertTrue(theContact instanceof CircleContact);
System.out.println("E");
}
开发者ID:mirkosertic,项目名称:Bytecoder,代码行数:13,代码来源:JBox2DTest.java
示例4: addType
import org.jbox2d.pooling.IDynamicStack; //导入依赖的package包/类
private void addType(IDynamicStack<Contact> creator, ShapeType type1,
ShapeType type2) {
ContactRegister register = new ContactRegister();
register.creator = creator;
register.primary = true;
contactStacks[type1.intValue][type2.intValue] = register;
if (type1 != type2) {
ContactRegister register2 = new ContactRegister();
register2.creator = creator;
register2.primary = false;
contactStacks[type2.intValue][type1.intValue] = register2;
}
}
开发者ID:mleoking,项目名称:PhET,代码行数:15,代码来源:World.java
示例5: pushContact
import org.jbox2d.pooling.IDynamicStack; //导入依赖的package包/类
public void pushContact(Contact contact) {
if (contact.m_manifold.pointCount > 0) {
contact.getFixtureA().getBody().setAwake(true);
contact.getFixtureB().getBody().setAwake(true);
}
ShapeType type1 = contact.getFixtureA().getType();
ShapeType type2 = contact.getFixtureB().getType();
IDynamicStack<Contact> creator = contactStacks[type1.intValue][type2.intValue].creator;
creator.push(contact);
}
开发者ID:mleoking,项目名称:PhET,代码行数:14,代码来源:World.java
示例6: pushContact
import org.jbox2d.pooling.IDynamicStack; //导入依赖的package包/类
public void pushContact(Contact contact) {
Fixture fixtureA = contact.getFixtureA();
Fixture fixtureB = contact.getFixtureB();
if (contact.m_manifold.pointCount > 0 && !fixtureA.isSensor() && !fixtureB.isSensor()) {
fixtureA.getBody().setAwake(true);
fixtureB.getBody().setAwake(true);
}
ShapeType type1 = fixtureA.getType();
ShapeType type2 = fixtureB.getType();
IDynamicStack<Contact> creator = contactStacks[type1.ordinal()][type2.ordinal()].creator;
creator.push(contact);
}
开发者ID:pianoman373,项目名称:Point-Engine,代码行数:16,代码来源:World.java
示例7: getPolyContactStack
import org.jbox2d.pooling.IDynamicStack; //导入依赖的package包/类
public final IDynamicStack<Contact> getPolyContactStack() {
return pcstack;
}
开发者ID:jfcameron,项目名称:G2Dj,代码行数:4,代码来源:DefaultWorldPool.java
示例8: getCircleContactStack
import org.jbox2d.pooling.IDynamicStack; //导入依赖的package包/类
public final IDynamicStack<Contact> getCircleContactStack() {
return ccstack;
}
开发者ID:jfcameron,项目名称:G2Dj,代码行数:4,代码来源:DefaultWorldPool.java
示例9: getPolyCircleContactStack
import org.jbox2d.pooling.IDynamicStack; //导入依赖的package包/类
public final IDynamicStack<Contact> getPolyCircleContactStack() {
return cpstack;
}
开发者ID:jfcameron,项目名称:G2Dj,代码行数:4,代码来源:DefaultWorldPool.java
示例10: getEdgeCircleContactStack
import org.jbox2d.pooling.IDynamicStack; //导入依赖的package包/类
@Override
public IDynamicStack<Contact> getEdgeCircleContactStack() {
return ecstack;
}
开发者ID:jfcameron,项目名称:G2Dj,代码行数:5,代码来源:DefaultWorldPool.java
示例11: getEdgePolyContactStack
import org.jbox2d.pooling.IDynamicStack; //导入依赖的package包/类
@Override
public IDynamicStack<Contact> getEdgePolyContactStack() {
return epstack;
}
开发者ID:jfcameron,项目名称:G2Dj,代码行数:5,代码来源:DefaultWorldPool.java
示例12: getChainCircleContactStack
import org.jbox2d.pooling.IDynamicStack; //导入依赖的package包/类
@Override
public IDynamicStack<Contact> getChainCircleContactStack() {
return chcstack;
}
开发者ID:jfcameron,项目名称:G2Dj,代码行数:5,代码来源:DefaultWorldPool.java
示例13: getChainPolyContactStack
import org.jbox2d.pooling.IDynamicStack; //导入依赖的package包/类
@Override
public IDynamicStack<Contact> getChainPolyContactStack() {
return chpstack;
}
开发者ID:jfcameron,项目名称:G2Dj,代码行数:5,代码来源:DefaultWorldPool.java
注:本文中的org.jbox2d.pooling.IDynamicStack类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论