public BitmapCharacterSet() { characters = new IntMap<IntMap<BitmapCharacter>>(); }
private static void noEnumArgs(String method, int... argSlots) { IntMap<Void> argSlotsMap = new IntMap<Void>(); for (int argSlot : argSlots) { argSlotsMap.put(argSlot, (Void) null); } nonEnumArgMap.put(method, argSlotsMap); }
private IntMap<Savable> intSavableMapFromKV(int[] keys, Savable[] values) { if(keys == null || values == null) { return null; } IntMap<Savable> map = new IntMap<Savable>(keys.length); for (int x = 0; x < keys.length; x++) map.put(keys[x], values[x]); return map; }
/** * Creates a new shader, {@link #initialize() } must be called * after this constructor for the shader to be usable. */ public Shader(){ super(); shaderSourceList = new ArrayList<>(); uniforms = new ListMap<>(); bufferBlocks = new ListMap<>(); attribs = new IntMap<>(); boundUniforms = new ArrayList<>(); }
private static IntMap<String> generateConstantMap(Class<?> ... classes) { IntMap<String> constMap = new IntMap<String>(); for (Class<?> clazz : classes) { for (Field field : clazz.getFields()) { if (field.getType() == int.class) { try { int val = field.getInt(null); String name = field.getName(); constMap.put(val, name); } catch (IllegalArgumentException ex) { } catch (IllegalAccessException ex) { } } } } // GL_ONE is more common than GL_TRUE (which is a boolean anyway..) constMap.put(1, "GL_ONE"); return constMap; }
public IntMap<? extends Savable> readIntSavableMap(String name, IntMap<? extends Savable> defVal) throws IOException { IntMap<Savable> ret = null; Element tempEl; if (name != null) { tempEl = findChildElement(currentElem, name); } else { tempEl = currentElem; } if (tempEl != null) { ret = new IntMap<Savable>(); NodeList nodes = tempEl.getChildNodes(); for (int i = 0; i < nodes.getLength(); i++) { Node n = nodes.item(i); if (n instanceof Element && n.getNodeName().equals("MapEntry")) { Element elem = (Element) n; currentElem = elem; int key = Integer.parseInt(currentElem.getAttribute("key")); Savable val = readSavable("Savable", null); ret.put(key, val); } } } else { return defVal; } currentElem = (Element) tempEl.getParentNode(); return ret; }
private IntMap<BitmapCharacter> readCharset(InputCapsule ic, int style) throws IOException { IntMap<BitmapCharacter> charset = new IntMap<BitmapCharacter>(); short[] indexes = ic.readShortArray("indexes"+style, null); Savable[] chars = ic.readSavableArray("chars"+style, null); for (int i = 0; i < indexes.length; i++){ int index = indexes[i] & 0xFFFF; BitmapCharacter chr = (BitmapCharacter) chars[i]; charset.put(index, chr); } return charset; }
private IntMap<BitmapCharacter> getCharacterSet(int style) { if (characters.size() == 0) { characters.put(style, new IntMap<BitmapCharacter>()); } return characters.get(style); }
IntMap<List<Integer>> indexBuffers = new IntMap<>(); for(int polygon = 0; polygon < materials.length; ++polygon) { int material = materials[polygon];
clone.buffers = new IntMap<>(); clone.buffersList = new SafeArrayList<>(VertexBuffer.class); for (VertexBuffer vb : buffersList.getArray()){
IntMap<Mesh> jmeMeshes = new IntMap<Mesh>(); for (IntMap.Entry<IrMesh> irMeshEntry : irMeshes) { Mesh jmeMesh = IrUtils.convertIrMeshToJmeMesh(irMeshEntry.getValue());
int numIndices = indexBuf.size(); IntMap<Integer> oldIndicesToNewIndices = new IntMap<>(numIndices); ArrayList<Integer> newIndicesToOldIndices = new ArrayList<>(); int newIndex = 0;
/** * Creates a new shader, {@link #initialize() } must be called * after this constructor for the shader to be usable. */ public Shader(){ super(); shaderSourceList = new ArrayList<ShaderSource>(); uniforms = new ListMap<String, Uniform>(); attribs = new IntMap<Attribute>(); boundUniforms = new ArrayList<Uniform>(); }
private static void noEnumArgs(String method, int... argSlots) { IntMap<Void> argSlotsMap = new IntMap<Void>(); for (int argSlot : argSlots) { argSlotsMap.put(argSlot, (Void) null); } nonEnumArgMap.put(method, argSlotsMap); }
private IntMap<Savable> intSavableMapFromKV(int[] keys, Savable[] values) { if(keys == null || values == null) { return null; } IntMap<Savable> map = new IntMap<Savable>(keys.length); for (int x = 0; x < keys.length; x++) map.put(keys[x], values[x]); return map; }
private IntMap<BitmapCharacter> readCharset(InputCapsule ic, int style) throws IOException { IntMap<BitmapCharacter> charset = new IntMap<BitmapCharacter>(); short[] indexes = ic.readShortArray("indexes"+style, null); Savable[] chars = ic.readSavableArray("chars"+style, null); for (int i = 0; i < indexes.length; i++){ int index = indexes[i] & 0xFFFF; BitmapCharacter chr = (BitmapCharacter) chars[i]; charset.put(index, chr); } return charset; }
private IntMap<BitmapCharacter> getCharacterSet(int style) { if (characters.size() == 0) { characters.put(style, new IntMap<BitmapCharacter>()); } return characters.get(style); }
private IntMap<BitmapCharacter> readCharset(InputCapsule ic, int style) throws IOException { IntMap<BitmapCharacter> charset = new IntMap<BitmapCharacter>(); short[] indexes = ic.readShortArray("indexes"+style, null); Savable[] chars = ic.readSavableArray("chars"+style, null); for (int i = 0; i < indexes.length; i++){ int index = indexes[i] & 0xFFFF; BitmapCharacter chr = (BitmapCharacter) chars[i]; charset.put(index, chr); } return charset; }
private IntMap<BitmapCharacter> getCharacterSet(int style) { if (characters.size() == 0) { characters.put(style, new IntMap<BitmapCharacter>()); } return characters.get(style); }