本文整理汇总了Java中org.jbox2d.collision.broadphase.DynamicTree.createProxy方法的典型用法代码示例。如果您正苦于以下问题:Java DynamicTree.createProxy方法的具体用法?Java DynamicTree.createProxy怎么用?Java DynamicTree.createProxy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jbox2d.collision.broadphase.DynamicTree
的用法示例。
在下文中一共展示了DynamicTree.createProxy方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initTest
import org.jbox2d.collision.broadphase.DynamicTree; //导入方法依赖的package包/类
/**
* @see org.jbox2d.testbed.framework.TestbedTest#initTest()
*/
@Override
public void initTest() {
worldExtent = 15.0f;
m_proxyExtent = 0.5f;
m_tree = new DynamicTree();
for (int i = 0; i < e_actorCount; ++i) {
Actor actor = m_actors[i] = new Actor();
GetRandomAABB(actor.aabb);
actor.proxyId = m_tree.createProxy(actor.aabb, actor);
}
m_stepCount = 0;
float h = worldExtent;
m_queryAABB = new AABB();
m_queryAABB.lowerBound.set(-3.0f, -4.0f + h);
m_queryAABB.upperBound.set(5.0f, 6.0f + h);
m_rayCastInput = new RayCastInput();
m_rayCastInput.p1.set(-5.0f, 5.0f + h);
m_rayCastInput.p2.set(7.0f, -4.0f + h);
// m_rayCastInput.p1.set(0.0f, 2.0f + h);
// m_rayCastInput.p2.set(0.0f, -2.0f + h);
m_rayCastInput.maxFraction = 1.0f;
m_rayCastOutput = new RayCastOutput();
m_automated = false;
}
示例2: initTest
import org.jbox2d.collision.broadphase.DynamicTree; //导入方法依赖的package包/类
@Override
public void initTest(boolean argDeserialized) {
worldExtent = 15.0f;
m_proxyExtent = 0.5f;
m_tree = new DynamicTree();
for (int i = 0; i < e_actorCount; ++i) {
Actor actor = m_actors[i] = new Actor();
GetRandomAABB(actor.aabb);
actor.proxyId = m_tree.createProxy(actor.aabb, actor);
}
m_stepCount = 0;
float h = worldExtent;
m_queryAABB = new AABB();
m_queryAABB.lowerBound.set(-3.0f, -4.0f + h);
m_queryAABB.upperBound.set(5.0f, 6.0f + h);
m_rayCastInput = new RayCastInput();
m_rayCastInput.p1.set(-5.0f, 5.0f + h);
m_rayCastInput.p2.set(7.0f, -4.0f + h);
// m_rayCastInput.p1.set(0.0f, 2.0f + h);
// m_rayCastInput.p2.set(0.0f, -2.0f + h);
m_rayCastInput.maxFraction = 1.0f;
m_rayCastOutput = new RayCastOutput();
m_automated = false;
}
示例3: initTest
import org.jbox2d.collision.broadphase.DynamicTree; //导入方法依赖的package包/类
/**
* @see org.jbox2d.testbed.framework.TestbedTest#initTest()
*/
@Override
public void initTest() {
worldExtent = 15.0f;
m_proxyExtent = 0.5f;
m_tree = new DynamicTree();
for (int i = 0; i < e_actorCount; ++i)
{
Actor actor = m_actors[i] = new Actor();
GetRandomAABB(actor.aabb);
actor.proxyId = m_tree.createProxy(actor.aabb, actor);
}
m_stepCount = 0;
float h = worldExtent;
m_queryAABB = new AABB();
m_queryAABB.lowerBound.set(-3.0f, -4.0f + h);
m_queryAABB.upperBound.set(5.0f, 6.0f + h);
m_rayCastInput = new RayCastInput();
m_rayCastInput.p1.set(-5.0f, 5.0f + h);
m_rayCastInput.p2.set(7.0f, -4.0f + h);
//m_rayCastInput.p1.set(0.0f, 2.0f + h);
//m_rayCastInput.p2.set(0.0f, -2.0f + h);
m_rayCastInput.maxFraction = 1.0f;
m_rayCastOutput = new RayCastOutput();
m_automated = false;
}
示例4: initTest
import org.jbox2d.collision.broadphase.DynamicTree; //导入方法依赖的package包/类
/**
* @see org.jbox2d.testbed.framework.TestbedTest#initTest(boolean)
*/
@Override
public void initTest(boolean argDeserialized) {
worldExtent = 15.0f;
m_proxyExtent = 0.5f;
m_tree = new DynamicTree();
for (int i = 0; i < e_actorCount; ++i) {
Actor actor = m_actors[i] = new Actor();
GetRandomAABB(actor.aabb);
actor.proxyId = m_tree.createProxy(actor.aabb, actor);
}
m_stepCount = 0;
float h = worldExtent;
m_queryAABB = new AABB();
m_queryAABB.lowerBound.set(-3.0f, -4.0f + h);
m_queryAABB.upperBound.set(5.0f, 6.0f + h);
m_rayCastInput = new RayCastInput();
m_rayCastInput.p1.set(-5.0f, 5.0f + h);
m_rayCastInput.p2.set(7.0f, -4.0f + h);
// m_rayCastInput.p1.set(0.0f, 2.0f + h);
// m_rayCastInput.p2.set(0.0f, -2.0f + h);
m_rayCastInput.maxFraction = 1.0f;
m_rayCastOutput = new RayCastOutput();
m_automated = false;
}
示例5: testDynamicTree
import org.jbox2d.collision.broadphase.DynamicTree; //导入方法依赖的package包/类
@Test
public void testDynamicTree() {
DynamicTree theTree = new DynamicTree();
theTree.createProxy(new AABB(), "TEST");
}