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

Method unproject

src/main/java/field/linalg/Mat4.java:395–400  ·  view source on GitHub ↗

Unproject the given window coordinates (winX, winY, winZ) by the given view and projection matrices using the specified viewport. This method first converts the given window coordinates to normalized device coordinates in the range [-1..1] and then tra

(double winX, double winY, double winZ, Mat4 projection, Mat4 view, IntBuffer viewport, Mat4 inverseOut, Vec4 dest)

Source from the content-addressed store, hash-verified

393 * @see #unprojectInv(double, double, double, IntBuffer, Vec4)
394 */
395 public static void unproject(double winX, double winY, double winZ, Mat4 projection, Mat4 view, IntBuffer viewport, Mat4 inverseOut, Vec4 dest) {
396 inverseOut.set(projection)
397 .mul(view)
398 .invert()
399 .unprojectInv(winX, winY, winZ, viewport, dest);
400 }
401
402 /**
403 * Unproject the given window coordinates <code>winCoords</code> by the given <code>view</code> and <code>projection</code> matrices using the specified viewport.

Callers 1

Calls 4

invertMethod · 0.95
unprojectInvMethod · 0.80
setMethod · 0.65
mulMethod · 0.45

Tested by

no test coverage detected