public float[] get( int argLength){ assert(argLength > 0); if(!map.containsKey(argLength)){ map.put(argLength, getInitializedArray(argLength)); } assert(map.get(argLength).length == argLength) : "Array not built of correct length"; return map.get(argLength); }
public int[] get( int argLength){ assert(argLength > 0); if(!map.containsKey(argLength)){ map.put(argLength, getInitializedArray(argLength)); } assert(map.get(argLength).length == argLength) : "Array not built of correct length"; return map.get(argLength); }
public Vec2[] get( int argLength){ assert(argLength > 0); if(!map.containsKey(argLength)){ map.put(argLength, getInitializedArray(argLength)); } assert(map.get(argLength).length == argLength) : "Array not built of correct length"; return map.get(argLength); }
public void drawAABB(AABB argAABB, Color3f color) { Vec2 vecs[] = vec2Array.get(4); argAABB.getVertices(vecs); drawPolygon(vecs, 4, color); }
@Override public void drawPolygon(Vec2[] vertices, int vertexCount, Color3f color) { Color s = cpool.getColor(color.x, color.y, color.z, 1f); Graphics2D g = getGraphics(); saveState(g); int[] xInts = xIntsPool.get(vertexCount); int[] yInts = yIntsPool.get(vertexCount); for (int i = 0; i < vertexCount; i++) { getWorldToScreenToOut(vertices[i], temp); xInts[i] = (int) temp.x; yInts[i] = (int) temp.y; } g.setStroke(stroke); g.setColor(s); g.drawPolygon(xInts, yInts, vertexCount); restoreState(g); }
public VoronoiDiagram.Generator[] get(int length) { assert (length > 0); if (!map.containsKey(length)) { map.put(length, getInitializedArray(length)); } assert (map.get(length).length == length) : "Array not built of correct length"; return map.get(length); }
int vertexCount = poly.m_count; assert (vertexCount <= Settings.maxPolygonVertices); Vec2[] vertices = tlvertices.get(Settings.maxPolygonVertices);
@Override public void drawSolidPolygon(Vec2[] vertices, int vertexCount, Color3f color) { Color f = cpool.getColor(color.x, color.y, color.z, .4f); Color s = cpool.getColor(color.x, color.y, color.z, 1f); Graphics2D g = getGraphics(); saveState(g); int[] xInts = xIntsPool.get(vertexCount); int[] yInts = yIntsPool.get(vertexCount); for (int i = 0; i < vertexCount; i++) { getWorldToScreenToOut(vertices[i], temp); xInts[i] = (int) temp.x; yInts[i] = (int) temp.y; } g.setStroke(stroke); g.setColor(f); g.fillPolygon(xInts, yInts, vertexCount); g.setColor(s); g.drawPolygon(xInts, yInts, vertexCount); restoreState(g); }
public float[] get( int argLength){ assert(argLength > 0); if(!map.containsKey(argLength)){ map.put(argLength, getInitializedArray(argLength)); } assert(map.get(argLength).length == argLength) : "Array not built of correct length"; return map.get(argLength); }
public Vec2[] get( int argLength){ assert(argLength > 0); if(!map.containsKey(argLength)){ map.put(argLength, getInitializedArray(argLength)); } assert(map.get(argLength).length == argLength) : "Array not built of correct length"; return map.get(argLength); }
public int[] get( int argLength){ assert(argLength > 0); if(!map.containsKey(argLength)){ map.put(argLength, getInitializedArray(argLength)); } assert(map.get(argLength).length == argLength) : "Array not built of correct length"; return map.get(argLength); }
public VoronoiDiagram.Generator[] get(int length) { assert (length > 0); if (!map.containsKey(length)) { map.put(length, getInitializedArray(length)); } assert (map.get(length).length == length) : "Array not built of correct length"; return map.get(length); }
AABB aabb = m_contactManager.m_broadPhase.getFatAABB(proxy.proxyId); if (aabb != null) { Vec2[] vs = avs.get(4); vs[0].set(aabb.lowerBound.x, aabb.lowerBound.y); vs[1].set(aabb.upperBound.x, aabb.lowerBound.y);
public float[] get( int argLength){ assert(argLength > 0); if(!map.containsKey(argLength)){ map.put(argLength, getInitializedArray(argLength)); } assert(map.get(argLength).length == argLength) : "Array not built of correct length"; return map.get(argLength); }
public Vec2[] get(int argLength) { assert (argLength > 0); if (!map.containsKey(argLength)) { map.put(argLength, getInitializedArray(argLength)); } assert (map.get(argLength).length == argLength) : "Array not built of correct length"; return map.get(argLength); }
int vertexCount = poly.m_count; assert (vertexCount <= Settings.maxPolygonVertices); Vec2[] vertices = tlvertices.get(Settings.maxPolygonVertices);
Vec2[] vecs = vecPool.get(4);
AABB aabb = m_contactManager.m_broadPhase.getFatAABB(proxy.proxyId); if (aabb != null) { Vec2[] vs = avs.get(4); vs[0].set(aabb.lowerBound.x, aabb.lowerBound.y); vs[1].set(aabb.upperBound.x, aabb.lowerBound.y);