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

Method dataLines

src/main/java/field/graphics/FLine.java:599–604  ·  view source on GitHub ↗

This takes a list of "things" and successively transforms them into a list of (list of...) Vec3 or Vec2. Each of the transformation rules are tried in turn (and in order) and anything that returns non-null terminates the transformation for that "turn". Collections are understood. All exceptions are

(Collection<Object> input, Function<Object, Object>... transformation)

Source from the content-addressed store, hash-verified

597 }
598
599 private void doDataLines(Collection<Object> m) {
600 boolean first = true;
601 for (Object o : m) {
602 if (o instanceof Vec2) {
603 if (first) moveTo((Vec2) o);
604 else lineTo((Vec2) o);
605 first = false;
606 } else if (o instanceof Vec3) {
607 if (first) moveTo((Vec3) o);

Callers

nothing calls this directly

Calls 2

transformMethod · 0.95
doDataLinesMethod · 0.95

Tested by

no test coverage detected