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

Method debugContents

src/main/java/field/graphics/BaseMesh.java:452–477  ·  view source on GitHub ↗

checks the contents of this mesh for validity and prints out information

(String channel)

Source from the content-addressed store, hash-verified

450 * checks the contents of this mesh for validity and prints out information
451 */
452 public void debugContents(String channel) {
453 Log.log(channel, () -> "debugContents for mesh " + this);
454 int vl = getVertexLimit();
455 int el = getElementLimit();
456 Log.log(channel, () -> "VL :" + vl + " | " + el + " " + this.buffers[0].floats(true) + " / " + this.elements(true));
457 for (ArrayBuffer a : this.buffers) {
458 if (a == null) continue;
459 Log.log(channel, () -> "buffer " + a.getAttribute() + " " + a.getBinding() + " " + a.getDimension() + " " + a.getSize());
460 }
461
462
463 if (this.buffers[0] != null) {
464 Log.log(channel, () -> "checking elements " + this);
465 IntBuffer a = this.elements(true);
466 FloatBuffer f = this.buffers[0].floats();
467
468 int st = this.elements.getDimension();
469
470 for (int q = 0; q < el * st; q++) {
471 final int finalQ = q;
472 Log.log(channel, () -> (finalQ / st) + " | " + a.get(finalQ) + " -> " + (a.get(finalQ) < vl ? new Vec3((FloatBuffer) f.position(3 * a.get(finalQ))) : "ILLEGAL"));
473 if ((q + 1) % st == 0)
474 Log.log(channel, () -> ".");
475 }
476 }
477 }
478
479 @Override
480 public String toString() {

Callers

nothing calls this directly

Calls 11

logMethod · 0.95
getVertexLimitMethod · 0.95
getElementLimitMethod · 0.95
elementsMethod · 0.95
floatsMethod · 0.65
getAttributeMethod · 0.65
getBindingMethod · 0.65
getDimensionMethod · 0.65
getSizeMethod · 0.65
getMethod · 0.65
positionMethod · 0.65

Tested by

no test coverage detected