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

Method apply

src/main/java/trace/util/TCB3.java:81–99  ·  view source on GitHub ↗
(Triple<Node, Node, Node> in)

Source from the content-addressed store, hash-verified

79 double b = ib;
80
81 @Override
82 public Void apply(Triple<Node, Node, Node> in) {
83
84 Vec3 d1 = in.third == null ? new Vec3() : (new Vec3(in.third.v).sub(in.second.v)).scale((float) ((1 - t) * (1 + c) * (1 - b)));
85 Vec3 d2 = in.first == null ? new Vec3() : (new Vec3(in.second.v).sub(in.first.v)).scale((float) ((1 - t) * (1 - c) * (1 + b)));
86
87 Vec3 e1 = in.third == null ? new Vec3() : (new Vec3(in.third.v).sub(in.second.v)).scale((float) ((1 - t) * (1 - c) * (1 - b)));
88 Vec3 e2 = in.first == null ? new Vec3() : (new Vec3(in.second.v).sub(in.first.v)).scale((float) ((1 - t) * (1 + c) * (1 + b)));
89
90 in.second.tI = (new Vec3(d1).add(d2)).scale(0.5f);
91 in.second.tO = (new Vec3(e1).add(e2)).scale(0.5f);
92
93 if (in.first != null && in.third != null)
94 in.second.tI.scale((float) (2 * (in.second.x - in.first.x) / (in.second.x - in.first.x + in.third.x - in.second.x)));
95 if (in.first != null && in.third != null)
96 in.second.tO.scale((float) (2 * (in.third.x - in.second.x) / (in.second.x - in.first.x + in.third.x - in.second.x)));
97
98 return null;
99 }
100 };
101 }
102

Callers

nothing calls this directly

Calls 3

scaleMethod · 0.45
subMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected