本文整理汇总了Java中org.jbox2d.collision.broadphase.DynamicTree类的典型用法代码示例。如果您正苦于以下问题:Java DynamicTree类的具体用法?Java DynamicTree怎么用?Java DynamicTree使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DynamicTree类属于org.jbox2d.collision.broadphase包,在下文中一共展示了DynamicTree类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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");
}
示例6: World
import org.jbox2d.collision.broadphase.DynamicTree; //导入依赖的package包/类
/**
* Construct a world object.
*
* @param gravity the world gravity vector.
*/
public World(Vec2 gravity, IWorldPool pool) {
this(gravity, pool, new DynamicTree());
}
示例7: World
import org.jbox2d.collision.broadphase.DynamicTree; //导入依赖的package包/类
/**
* Construct a world object.
*
* @param gravity the world gravity vector.
*/
public World(Vector2 gravity, IWorldPool pool) {
this(gravity, pool, new DynamicTree());
}
示例8: ParticleWorld
import org.jbox2d.collision.broadphase.DynamicTree; //导入依赖的package包/类
/**
* Construct a world object.
*
* @param gravity the world gravity vector.
*/
public ParticleWorld(Vec2 gravity, IWorldPool pool) {
super(gravity, pool, new DynamicTree());
}