Skip to content

Commit bc54df0

Browse files
committed
minor refactor in VR lib
1 parent b7844df commit bc54df0

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

mode/libraries/vr/src/processing/vr/PGraphicsVR.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,7 @@ protected PGL createPGL(PGraphicsOpenGL pg) {
6161

6262
@Override
6363
public PMatrix3D getEyeMatrix() {
64-
PMatrix3D mat = new PMatrix3D();
65-
float sign = cameraUp ? +1 : -1;
66-
mat.set(rightX, sign * upX, forwardX, cameraX,
67-
rightY, sign * upY, forwardY, cameraY,
68-
rightZ, sign * upZ, forwardZ, cameraZ,
69-
0, 0, 0, 1);
70-
return mat;
64+
return getEyeMatrix(null);
7165
}
7266

7367

@@ -80,7 +74,7 @@ public PMatrix3D getEyeMatrix(PMatrix3D target) {
8074
target.set(rightX, sign * upX, forwardX, cameraX,
8175
rightY, sign * upY, forwardY, cameraY,
8276
rightZ, sign * upZ, forwardZ, cameraZ,
83-
0, 0, 0, 1);
77+
0, 0, 0, 1);
8478
return target;
8579
}
8680

0 commit comments

Comments
 (0)