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

Method translateIn

src/main/java/field/graphics/Camera.java:236–248  ·  view source on GitHub ↗
(float r)

Source from the content-addressed store, hash-verified

234 return s;
235 }
236
237 public State translateIn(float r) {
238 State s = copy();
239 Vec3 left = ray();
240 left = left.normalize();
241 left.mul((float) position.distance(target));
242 s.position.x += left.x * r;
243 s.position.y += left.y * r;
244 s.position.z += left.z * r;
245 s.target.x += left.x * r;
246 s.target.y += left.y * r;
247 s.target.z += left.z * r;
248 return s;
249 }
250
251 public State dollyIn(float r) {

Callers 1

standardMapMethod · 0.45

Calls 5

copyMethod · 0.95
rayMethod · 0.95
normalizeMethod · 0.95
mulMethod · 0.95
distanceMethod · 0.45

Tested by

no test coverage detected