/** * Convenience method for retrieving the Camera set on the current RenderContext. Similar to * ContextManager.getCurrentContext().getCurrentCamera() but with null checks for current context. * * @return the Camera on the current RenderContext. */ public static Camera getCurrentCamera() { if (ContextManager.getCurrentContext() == null) { return null; } return ContextManager.getCurrentContext().getCurrentCamera(); }
/** * Convenience method for retrieving the Camera set on the current RenderContext. Similar to * ContextManager.getCurrentContext().getCurrentCamera() but with null checks for current context. * * @return the Camera on the current RenderContext. */ public static Camera getCurrentCamera() { if (ContextManager.getCurrentContext() == null) { return null; } return ContextManager.getCurrentContext().getCurrentCamera(); }
/** * Update texture matrix. * * @param index * the index */ private void updateTextureMatrix(final int index) { // Create a matrix going from light to camera space final Camera cam = ContextManager.getCurrentContext().getCurrentCamera(); _shadowMatrix.set(cam.getViewMatrix()).invertLocal(); _shadowMatrix.multiplyLocal(_shadowMapRenderer.getCamera().getModelViewProjectionMatrix()) .multiplyLocal(SCALE_BIAS_MATRIX); // _shadowMapTexture[index].setTextureMatrix(_shadowMatrix); }
/** * Update texture matrix. * * @param index * the index */ private void updateTextureMatrix(final int index) { // Create a matrix going from light to camera space final Camera cam = ContextManager.getCurrentContext().getCurrentCamera(); _shadowMatrix.set(cam.getModelViewMatrix()).invertLocal(); _shadowMatrix.multiplyLocal(_shadowMapRenderer.getCamera().getModelViewProjectionMatrix()).multiplyLocal( SCALE_BIAS_MATRIX); _shadowMapTexture[index].setTextureMatrix(_shadowMatrix); }
: ContextManager.getCurrentContext().getCurrentCamera(); if (cam != null) { final int state = cam.getPlaneState(); final Camera cam = _viewCamera != null ? _viewCamera : (ContextManager.getCurrentContext() != null ? ContextManager.getCurrentContext().getCurrentCamera() : null); if (cam != null) {
final Camera originalCam = context.getCurrentCamera();
.getCurrentCamera(); if (cam != null) { final int state = cam.getPlaneState(); final Camera cam = _viewCamera != null ? _viewCamera : (ContextManager.getCurrentContext() != null ? ContextManager.getCurrentContext() .getCurrentCamera() : null); if (cam != null) { final int state = cam.getPlaneState();
final Camera cam = ContextManager.getCurrentContext().getCurrentCamera(); _pssmCam.set(cam);
final Camera cam = ContextManager.getCurrentContext().getCurrentCamera(); _pssmCam.set(cam);