/** * Get the projection matrix for an eye. * @param eyeIndex - An integer specifying the eye: 0 for the left eye, 1 for the right eye. * @return the projection matrix, as a Matrix4f. */ public Matrix4f getEyeProjectionMatrix(int eyeIndex) { return new Matrix4f(projectionMatrices[eyeIndex]); }
static Matrix4f createIdentityMatrix4f() { return new Matrix4f(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } }
/** * Get the pose of an eye. * @param eyeIndex - An integer specifying the eye: 0 for the left eye, 1 for the right eye. * @return the pose, as a Matrix4f */ public Matrix4f getEyePose(int eyeIndex) { Matrix4f matrixReturn = new Matrix4f(headPose); matrixReturn.mul(eyePoses[eyeIndex]); return matrixReturn; }
void setHeadPose(HmdMatrix34_t inputPose) { OpenVRUtil.setSteamVRMatrix3ToMatrix4f(inputPose, headPose); headPose = new Matrix4f( 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, groundPlaneYOffset, 0, 1 ).mul(headPose); }
void setControllerPose(HmdMatrix34_t inputPose, int nIndex) { OpenVRUtil.setSteamVRMatrix3ToMatrix4f(inputPose, controllerPose[nIndex]); controllerPose[nIndex] = new Matrix4f( 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, groundPlaneYOffset, 0, 1 ).mul(controllerPose[nIndex]); for (ControllerListener listener : controllerListeners) { listener.poseChanged(controllerPose[nIndex], nIndex); } }
public Transformation() { projectionMatrix = new Matrix4f(); modelMatrix = new Matrix4f(); modelViewMatrix = new Matrix4f(); modelLightMatrix = new Matrix4f(); modelLightViewMatrix = new Matrix4f(); viewMatrix = new Matrix4f(); orthoProjMatrix = new Matrix4f(); ortho2DMatrix = new Matrix4f(); orthoModelMatrix = new Matrix4f(); lightViewMatrix = new Matrix4f(); }
public Transformation() { projectionMatrix = new Matrix4f(); modelMatrix = new Matrix4f(); modelViewMatrix = new Matrix4f(); modelLightMatrix = new Matrix4f(); modelLightViewMatrix = new Matrix4f(); viewMatrix = new Matrix4f(); orthoProjMatrix = new Matrix4f(); ortho2DMatrix = new Matrix4f(); orthoModelMatrix = new Matrix4f(); lightViewMatrix = new Matrix4f(); }
public Transformation() { projectionMatrix = new Matrix4f(); modelMatrix = new Matrix4f(); modelViewMatrix = new Matrix4f(); modelLightViewMatrix = new Matrix4f(); viewMatrix = new Matrix4f(); orthoProjMatrix = new Matrix4f(); ortho2DMatrix = new Matrix4f(); orthoModelMatrix = new Matrix4f(); lightViewMatrix = new Matrix4f(); }
public Transformation() { projectionMatrix = new Matrix4f(); modelMatrix = new Matrix4f(); modelViewMatrix = new Matrix4f(); modelLightMatrix = new Matrix4f(); modelLightViewMatrix = new Matrix4f(); viewMatrix = new Matrix4f(); orthoProjMatrix = new Matrix4f(); ortho2DMatrix = new Matrix4f(); orthoModelMatrix = new Matrix4f(); lightViewMatrix = new Matrix4f(); }
public SoundManager() { soundBufferList = new ArrayList<>(); soundSourceMap = new HashMap<>(); cameraMatrix = new Matrix4f(); }
public void setMatrix(int pos, Matrix4f localJointMatrix, Matrix4f invJointMatrix) { localJointMatrices[pos] = localJointMatrix; Matrix4f mat = new Matrix4f(localJointMatrix); mat.mul(invJointMatrix); jointMatrices[pos] = mat; } }
public void setMatrix(int pos, Matrix4f localJointMatrix, Matrix4f invJointMatrix) { localJointMatrices[pos] = localJointMatrix; Matrix4f mat = new Matrix4f(localJointMatrix); mat.mul(invJointMatrix); jointMatrices[pos] = mat; } }
public Matrix4f getModelViewMatrix(GameItem gameItem, Matrix4f viewMatrix) { Vector3f rotation = gameItem.getRotation(); modelViewMatrix.identity().translate(gameItem.getPosition()). rotateX((float)Math.toRadians(-rotation.x)). rotateY((float)Math.toRadians(-rotation.y)). rotateZ((float)Math.toRadians(-rotation.z)). scale(gameItem.getScale()); Matrix4f viewCurr = new Matrix4f(viewMatrix); return viewCurr.mul(modelViewMatrix); } }
public Matrix4f getModelViewMatrix(GameItem gameItem, Matrix4f viewMatrix) { Vector3f rotation = gameItem.getRotation(); modelViewMatrix.identity().translate(gameItem.getPosition()). rotateX((float)Math.toRadians(-rotation.x)). rotateY((float)Math.toRadians(-rotation.y)). rotateZ((float)Math.toRadians(-rotation.z)). scale(gameItem.getScale()); Matrix4f viewCurr = new Matrix4f(viewMatrix); return viewCurr.mul(modelViewMatrix); }
public Matrix4f getModelViewMatrix(GameItem gameItem, Matrix4f viewMatrix) { Vector3f rotation = gameItem.getRotation(); modelViewMatrix.identity().translate(gameItem.getPosition()). rotateX((float)Math.toRadians(-rotation.x)). rotateY((float)Math.toRadians(-rotation.y)). rotateZ((float)Math.toRadians(-rotation.z)). scale(gameItem.getScale()); Matrix4f viewCurr = new Matrix4f(viewMatrix); return viewCurr.mul(modelViewMatrix); } }