MCPcopy Index your code
hub / github.com/processing/processing / addMaterial

Method addMaterial

core/src/processing/core/PShapeOBJ.java:391–398  ·  view source on GitHub ↗
(String mtlname,
                                           ArrayList<OBJMaterial> materials,
                                           Map<String, Integer> materialsHash)

Source from the content-addressed store, hash-verified

389 }
390
391 protected static OBJMaterial addMaterial(String mtlname,
392 ArrayList<OBJMaterial> materials,
393 Map<String, Integer> materialsHash) {
394 OBJMaterial currentMtl = new OBJMaterial(mtlname);
395 materialsHash.put(mtlname, Integer.valueOf(materials.size()));
396 materials.add(currentMtl);
397 return currentMtl;
398 }
399
400 protected static int rgbaValue(PVector color) {
401 return 0xFF000000 | ((int)(color.x * 255) << 16) |

Callers 1

parseMTLMethod · 0.95

Calls 3

putMethod · 0.45
sizeMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected