本文整理汇总了Java中org.jbox2d.collision.Distance类的典型用法代码示例。如果您正苦于以下问题:Java Distance类的具体用法?Java Distance怎么用?Java Distance使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Distance类属于org.jbox2d.collision包,在下文中一共展示了Distance类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DefaultWorldPool
import org.jbox2d.collision.Distance; //导入依赖的package包/类
public DefaultWorldPool(int argSize, int argContainerSize) {
vecs = new OrderedStack<Vec2>(argSize, argContainerSize) {
protected Vec2 newInstance() { return new Vec2(); }
};
vec3s = new OrderedStack<Vec3>(argSize, argContainerSize) {
protected Vec3 newInstance() { return new Vec3(); }
};
mats = new OrderedStack<Mat22>(argSize, argContainerSize) {
protected Mat22 newInstance() { return new Mat22(); }
};
aabbs = new OrderedStack<AABB>(argSize, argContainerSize) {
protected AABB newInstance() { return new AABB(); }
};
rots = new OrderedStack<Rot>(argSize, argContainerSize) {
protected Rot newInstance() { return new Rot(); }
};
mat33s = new OrderedStack<Mat33>(argSize, argContainerSize) {
protected Mat33 newInstance() { return new Mat33(); }
};
dist = new Distance();
collision = new Collision(this);
toi = new TimeOfImpact(this);
}
示例2: DefaultWorldPool
import org.jbox2d.collision.Distance; //导入依赖的package包/类
public DefaultWorldPool(int argSize, int argContainerSize) {
vecs = new OrderedStack<Vector2>(argSize, argContainerSize) {
protected Vector2 newInstance() { return new Vector2(); }
};
vec3s = new OrderedStack<Vector3>(argSize, argContainerSize) {
protected Vector3 newInstance() { return new Vector3(); }
};
mats = new OrderedStack<Mat22>(argSize, argContainerSize) {
protected Mat22 newInstance() { return new Mat22(); }
};
aabbs = new OrderedStack<AABB>(argSize, argContainerSize) {
protected AABB newInstance() { return new AABB(); }
};
rots = new OrderedStack<Rot>(argSize, argContainerSize) {
protected Rot newInstance() { return new Rot(); }
};
mat33s = new OrderedStack<Mat33>(argSize, argContainerSize) {
protected Mat33 newInstance() { return new Mat33(); }
};
dist = new Distance();
collision = new Collision(this);
toi = new TimeOfImpact(this);
}
示例3: launch
import org.jbox2d.collision.Distance; //导入依赖的package包/类
public void launch() {
m_body.setTransform(new Vec2(0.0f, 4.0f), 0.0f);
m_body.setLinearVelocity(new Vec2());
m_body.setAngularVelocity(0.0f);
m_x = MathUtils.randomFloat(-1.0f, 1.0f);
m_bullet.setTransform(new Vec2(m_x, 10.0f), 0.0f);
m_bullet.setLinearVelocity(new Vec2(0.0f, -50.0f));
m_bullet.setAngularVelocity(0.0f);
Distance.GJK_CALLS = 0;
Distance.GJK_ITERS = 0;
Distance.GJK_MAX_ITERS = 0;
TimeOfImpact.toiCalls = 0;
TimeOfImpact.toiIters = 0;
TimeOfImpact.toiMaxIters = 0;
TimeOfImpact.toiRootIters = 0;
TimeOfImpact.toiMaxRootIters = 0;
}
示例4: step
import org.jbox2d.collision.Distance; //导入依赖的package包/类
@Override
public void step(TestbedSettings settings) {
super.step(settings);
if (Distance.GJK_CALLS > 0) {
addTextLine(String.format("gjk calls = %d, ave gjk iters = %3.1f, max gjk iters = %d",
Distance.GJK_CALLS, Distance.GJK_ITERS * 1.0 / (Distance.GJK_CALLS),
Distance.GJK_MAX_ITERS));
}
if (TimeOfImpact.toiCalls > 0) {
addTextLine(String.format("toi calls = %d, ave toi iters = %3.1f, max toi iters = %d",
TimeOfImpact.toiCalls, TimeOfImpact.toiIters * 1f / (TimeOfImpact.toiCalls),
TimeOfImpact.toiMaxRootIters));
addTextLine(String.format("ave toi root iters = %3.1f, max toi root iters = %d",
TimeOfImpact.toiRootIters * 1f / (TimeOfImpact.toiCalls), TimeOfImpact.toiMaxRootIters));
}
if (getStepCount() % 60 == 0) {
launch();
}
}
示例5: WorldPool
import org.jbox2d.collision.Distance; //导入依赖的package包/类
public WorldPool(int argSize, int argContainerSize){
vecs = new OrderedStack<Vec2>(Vec2.class, argSize, argContainerSize);
vec3s = new OrderedStack<Vec3>(Vec3.class, argSize, argContainerSize);
mats = new OrderedStack<Mat22>(Mat22.class, argSize, argContainerSize);
aabbs = new OrderedStack<AABB>(AABB.class, argSize, argContainerSize);
dist = new Distance();
collision = new Collision(this);
toi = new TimeOfImpact(this);
}
示例6: WorldPool
import org.jbox2d.collision.Distance; //导入依赖的package包/类
public WorldPool(int argSize){
vecs = new PoolingStackVec2(argSize);
vec3s = new PoolingStackVec3(argSize);
mats = new PoolingStackMat22(argSize);
aabbs = new PoolingStackAABB(argSize);
dist = new Distance();
collision = new Collision(this);
toi = new TimeOfImpact(this);
}
示例7: WorldPool
import org.jbox2d.collision.Distance; //导入依赖的package包/类
public WorldPool(int argSize)
{
vecs= new PoolingStackVec2(argSize);
vec3s= new PoolingStackVec3(argSize);
mats= new PoolingStackMat22(argSize);
aabbs= new PoolingStackAABB(argSize);
dist= new Distance();
collision= new Collision(this);
toi= new TimeOfImpact(this);
}
示例8: DefaultWorldPool
import org.jbox2d.collision.Distance; //导入依赖的package包/类
public DefaultWorldPool(int argSize, int argContainerSize) {
vecs = new OrderedStack<Vec2>(Vec2.class, argSize, argContainerSize);
vec3s = new OrderedStack<Vec3>(Vec3.class, argSize, argContainerSize);
mats = new OrderedStack<Mat22>(Mat22.class, argSize, argContainerSize);
aabbs = new OrderedStack<AABB>(AABB.class, argSize, argContainerSize);
dist = new Distance();
collision = new Collision(this);
toi = new TimeOfImpact(this);
}
示例9: getDistance
import org.jbox2d.collision.Distance; //导入依赖的package包/类
public final Distance getDistance() {
return dist;
}
示例10: testDistance
import org.jbox2d.collision.Distance; //导入依赖的package包/类
@Test
public void testDistance() {
Distance theDistance = new Distance();
}
示例11: getDistance
import org.jbox2d.collision.Distance; //导入依赖的package包/类
public final Distance getDistance(){
return dist;
}
示例12: getDistance
import org.jbox2d.collision.Distance; //导入依赖的package包/类
public Distance getDistance()
{
return dist;
}
示例13: getDistance
import org.jbox2d.collision.Distance; //导入依赖的package包/类
public Distance getDistance();