/** * Determine if two generic shapes overlap. * * @param shapeA * @param shapeB * @param xfA * @param xfB * @return */ public final boolean testOverlap(Shape shapeA, int indexA, Shape shapeB, int indexB, Transform xfA, Transform xfB) { input.proxyA.set(shapeA, indexA); input.proxyB.set(shapeB, indexB); input.transformA.set(xfA); input.transformB.set(xfB); input.useRadii = true; cache.count = 0; pool.getDistance().distance(output, cache, input); // djm note: anything significant about 10.0f? return output.distance < 10.0f * Settings.EPSILON; }
particleDef.userData = groupDef.userData; Shape shape = groupDef.shape; transform.set(groupDef.position, groupDef.angle); AABB aabb = temp; int childCount = shape.getChildCount(); group.m_strength = groupDef.strength; group.m_userData = groupDef.userData; group.m_transform.set(transform); group.m_destroyAutomatically = groupDef.destroyAutomatically; group.m_prev = null;
@Override public void initTest(boolean argDeserialized) { input.transformA = new Transform(); input.transformB = new Transform(); { m_transformA = new Transform(); m_transformA.setIdentity(); m_transformA.p.set(0.0f, -0.2f); m_polygonA = new PolygonShape(); m_polygonA.setAsBox(10.0f, 0.2f); } { m_positionB = new Vec2(); m_positionB.set(12.017401f, 0.13678508f); m_angleB = -0.0109265f; m_transformB = new Transform(); m_transformB.set(m_positionB, m_angleB); m_polygonB = new PolygonShape(); m_polygonB.setAsBox(2.0f, 0.1f); } for (int i = 0; i < v.length; i++) { v[i] = new Vec2(); } }
m_transformB.set(m_positionB, m_angleB);
particleDef.userData = groupDef.userData; Shape shape = groupDef.shape; transform.set(groupDef.position, groupDef.angle); AABB aabb = temp; int childCount = shape.getChildCount(); group.m_strength = groupDef.strength; group.m_userData = groupDef.userData; group.m_transform.set(transform); group.m_destroyAutomatically = groupDef.destroyAutomatically; group.m_prev = null;
public class MyMotionState extends MotionState { private Transform worldTransform; public MyMotionState() { worldTransform = new Transform(); worldTransform.setIdentity(); } @Override public Transform getWorldTransform(Transform worldTrans) { worldTrans.set(worldTransform); return worldTrans; } @Override public void setWorldTransform(Transform worldTrans) { worldTransform.set(worldTrans); } }
/** * Determine if two generic shapes overlap. * * @param shapeA * @param shapeB * @param xfA * @param xfB * @return */ public final boolean testOverlap(Shape shapeA, int indexA, Shape shapeB, int indexB, Transform xfA, Transform xfB) { input.proxyA.set(shapeA, indexA); input.proxyB.set(shapeB, indexB); input.transformA.set(xfA); input.transformB.set(xfB); input.useRadii = true; cache.count = 0; pool.getDistance().distance(output, cache, input); // djm note: anything significant about 10.0f? return output.distance < 10.0f * Settings.EPSILON; }
@Override public void initTest(boolean argDeserialized) { input.transformA = new Transform(); input.transformB = new Transform(); { m_transformA = new Transform(); m_transformA.setIdentity(); m_transformA.p.set(0.0f, -0.2f); m_polygonA = new PolygonShape(); m_polygonA.setAsBox(10.0f, 0.2f); } { m_positionB = new Vec2(); m_positionB.set(12.017401f, 0.13678508f); m_angleB = -0.0109265f; m_transformB = new Transform(); m_transformB.set(m_positionB, m_angleB); m_polygonB = new PolygonShape(); m_polygonB.setAsBox(2.0f, 0.1f); } for (int i = 0; i < v.length; i++) { v[i] = new Vec2(); } }
b.m_xf0.set(b.m_xf);
m_transformB.set(m_positionB, m_angleB);
/** * Determine if two generic shapes overlap. * * @param shapeA * @param shapeB * @param xfA * @param xfB * @return */ public final boolean testOverlap(Shape shapeA, int indexA, Shape shapeB, int indexB, Transform xfA, Transform xfB) { input.proxyA.set(shapeA, indexA); input.proxyB.set(shapeB, indexB); input.transformA.set(xfA); input.transformB.set(xfB); input.useRadii = true; cache.count = 0; pool.getDistance().distance(output, cache, input); // djm note: anything significant about 10.0f? return output.distance < 10.0f * Settings.EPSILON; }
/** * Determine if two generic shapes overlap. * * @param shapeA * @param shapeB * @param xfA * @param xfB * @return */ public final boolean testOverlap(Shape shapeA, int indexA, Shape shapeB, int indexB, Transform xfA, Transform xfB) { input.proxyA.set(shapeA, indexA); input.proxyB.set(shapeB, indexB); input.transformA.set(xfA); input.transformB.set(xfB); input.useRadii = true; cache.count = 0; pool.getDistance().distance(output, cache, input); // djm note: anything significant about 10.0f? return output.distance < 10.0f * Settings.EPSILON; }
/** * Determine if two generic shapes overlap. * * @param shapeA * @param shapeB * @param xfA * @param xfB * @return */ public final boolean testOverlap(Shape shapeA, int indexA, Shape shapeB, int indexB, Transform xfA, Transform xfB) { input.proxyA.set(shapeA, indexA); input.proxyB.set(shapeB, indexB); input.transformA.set(xfA); input.transformB.set(xfB); input.useRadii = true; cache.count = 0; pool.getDistance().distance(output, cache, input); // djm note: anything significant about 10.0f? return output.distance < 10.0f * JBoxSettings.EPSILON; }
PolygonShape src = (PolygonShape) f.getShape(); Transform t = new Transform(); t.set(new Vec2(0,0), body.getAngle()); for (int i = 0; i < src.getVertexCount(); ++i) { Vec2 srcPt = Transform.mul(t, src.getVertex(i)); // build polygon up of these points and draw ...
b.m_xf0.set(b.m_xf);