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

Method e

src/main/java/field/graphics/MeshBuilder.java:451–472  ·  view source on GitHub ↗

Adds a element of type "line with adjacency" to this MeshBuilder. Line with adjancey is an OpenGL element that is a line segment with two other associated vertices (typically the previous and next vertices, but shaders are free to interpret these however they'd like to) (vertex numbers are backw

(int v1, int v2, int v3, int v4)

Source from the content-addressed store, hash-verified

449 IntBuffer dest = ensureElementSize(4, elementCursor);
450 if (vertexCursor - 1 - v1 < 0)
451 throw new IllegalArgumentException(
452 " can't write line into vertexbuffer, trying to access a negative index with start " + v1 + " > " + (vertexCursor - 1));
453 if (vertexCursor - 1 - v2 < 0)
454 throw new IllegalArgumentException(
455 " can't write line into vertexbuffer, trying to access a negative index with middle1 " + v2 + " > " + (vertexCursor - 1));
456 if (vertexCursor - 1 - v3 < 0)
457 throw new IllegalArgumentException(
458 " can't write line into vertexbuffer, trying to access a negative index with middle2 " + v3 + " > " + (vertexCursor - 1));
459 if (vertexCursor - 1 - v4 < 0)
460 throw new IllegalArgumentException(
461 " can't write line into vertexbuffer, trying to access a negative index with end " + v3 + " > " + (vertexCursor - 1));
462 dest.put(vertexCursor - 1 - v1);
463 dest.put(vertexCursor - 1 - v2);
464 dest.put(vertexCursor - 1 - v3);
465 dest.put(vertexCursor - 1 - v4);
466
467 elementCursor++;
468 return this;
469 }
470
471 /**
472 * adds a "triangle with adjacency", that is the triangle v1,v2,v3 and the additional verts corresponding to the edges v12, v23, and v31
473 */
474 public MeshBuilder e(int v1, int v2, int v3, int v12, int v23, int v31) {
475 IntBuffer dest = ensureElementSize(6, elementCursor);

Callers 2

defaultMeshMethod · 0.95
addMeshMethod · 0.95

Calls 12

ensureElementSizeMethod · 0.95
getTessSupportMethod · 0.95
beginMethod · 0.95
beginContourMethod · 0.95
lineMethod · 0.95
auxMapForMethod · 0.95
endContourMethod · 0.95
endMethod · 0.95
getMethod · 0.65
putMethod · 0.45
sizeMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected