当前位置: 首页>>代码示例>>Java>>正文


Java DynamicTree.createProxy方法代码示例

本文整理汇总了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;
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:35,代码来源:DynamicTreeTest.java

示例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;
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:32,代码来源:DynamicTreeTest.java

示例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;
}
 
开发者ID:dragome,项目名称:dragome-examples,代码行数:36,代码来源:DynamicTreeTest.java

示例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;
}
 
开发者ID:col726,项目名称:game-engine-CMZ,代码行数:35,代码来源:DynamicTreeTest.java

示例5: testDynamicTree

import org.jbox2d.collision.broadphase.DynamicTree; //导入方法依赖的package包/类
@Test
public void testDynamicTree() {
    DynamicTree theTree = new DynamicTree();
    theTree.createProxy(new AABB(), "TEST");
}
 
开发者ID:mirkosertic,项目名称:Bytecoder,代码行数:6,代码来源:JBox2DTest.java


注:本文中的org.jbox2d.collision.broadphase.DynamicTree.createProxy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。