MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / auxMapFor

Method auxMapFor

src/main/java/field/graphics/MeshBuilder.java:718–743  ·  view source on GitHub ↗
(int vertex)

Source from the content-addressed store, hash-verified

716
717 Map<Integer, ArrayBuffer> b = target.buffers();
718 Iterator<Map.Entry<Integer, ArrayBuffer>> m = b.entrySet()
719 .iterator();
720
721 Map<Integer, float[]> q = new LinkedHashMap<>();
722 while (m.hasNext()) {
723 Map.Entry<Integer, ArrayBuffer> n = m.next();
724 if (n.getKey() == 0) continue;
725
726 float[] z = aux.get(n.getKey());
727 if (z == null) {
728 z = new float[n.getValue()
729 .getDimension()];
730 }
731
732 FloatBuffer fs = n.getValue()
733 .floats(true);
734 fs.position(z.length * (vertex - 1));
735 fs.get(z);
736 q.put(n.getKey(), z);
737 }
738
739 return q;
740 }
741
742
743 /**
744 * Adds a set of contours described by a list of lists of Vec3. These lists are tesselated into triangles by the GLU_TESS_WINDING_NONZERO tesselation rule
745 */
746 public MeshBuilder contours(List<List<Vec3>> contours) {

Callers 1

eMethod · 0.95

Calls 10

buffersMethod · 0.80
hasNextMethod · 0.65
nextMethod · 0.65
getMethod · 0.65
getDimensionMethod · 0.65
floatsMethod · 0.65
positionMethod · 0.65
iteratorMethod · 0.45
getValueMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected