checks the contents of this mesh for validity and prints out information
(String channel)
| 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() { |
nothing calls this directly
no test coverage detected