MCPcopy Index your code
hub / github.com/benfry/processing4 / modelY

Method modelY

core/src/processing/opengl/PGraphicsOpenGL.java:4710–4727  ·  view source on GitHub ↗
(float x, float y, float z)

Source from the content-addressed store, hash-verified

4708
4709
4710 @Override
4711 public float modelY(float x, float y, float z) {
4712 float ax =
4713 modelview.m00*x + modelview.m01*y + modelview.m02*z + modelview.m03;
4714 float ay =
4715 modelview.m10*x + modelview.m11*y + modelview.m12*z + modelview.m13;
4716 float az =
4717 modelview.m20*x + modelview.m21*y + modelview.m22*z + modelview.m23;
4718 float aw =
4719 modelview.m30*x + modelview.m31*y + modelview.m32*z + modelview.m33;
4720
4721 float oy =
4722 cameraInv.m10*ax + cameraInv.m11*ay + cameraInv.m12*az + cameraInv.m13*aw;
4723 float ow =
4724 cameraInv.m30*ax + cameraInv.m31*ay + cameraInv.m32*az + cameraInv.m33*aw;
4725
4726 return nonZero(ow) ? oy / ow : oy;
4727 }
4728
4729
4730 @Override

Callers

nothing calls this directly

Calls 1

nonZeroMethod · 0.95

Tested by

no test coverage detected