private void updateCameraLookat() { _tRenderer.getCamera().setLocation(_cam.getLocation()); _tRenderer.getCamera().lookAt(_center, _worldUpVector); }
private void updateCameraLookat() { _tRenderer.getCamera().setLocation(_cam.getLocation()); _tRenderer.getCamera().lookAt(_center, _worldUpVector); }
public void renderToCubeMap(final Renderable renderable, final TextureCubeMap cubemap, final ReadOnlyVector3 cameraPosition, final int clear) { if (cubemap.getTextureKey() == null) { _textureRenderer.setupTexture(cubemap); } final Camera cam = _textureRenderer.getCamera(); cam.setLocation(cameraPosition); for (final Face face : Face.values()) { pointAtFace(face, cam); cubemap.setCurrentRTTFace(face); _textureRenderer.render(renderable, cubemap, clear); } }
public void renderToCubeMap(final Spatial spatial, final TextureCubeMap cubemap, final ReadOnlyVector3 cameraPosition, final int clear) { if (cubemap.getTextureKey() == null) { _textureRenderer.setupTexture(cubemap); } final Camera cam = _textureRenderer.getCamera(); cam.setLocation(cameraPosition); for (final Face face : Face.values()) { pointAtFace(face, cam); cubemap.setCurrentRTTFace(face); _textureRenderer.renderSpatial(spatial, cubemap, clear); } }
/** * Update the position of the Camera controlled by this object. * * @param time * a delta time, in seconds. Not used currently, but might be useful for doing "ease-in" of camera * movements. */ public void update(final double time) { updateTargetPos(); if (!_dirty) { return; } if (_worldUpVec.getY() == 1) { MathUtils.sphericalToCartesian(_sphereCoords, _camPosition); } else if (_worldUpVec.getZ() == 1) { MathUtils.sphericalToCartesianZ(_sphereCoords, _camPosition); } _camera.setLocation(_camPosition.addLocal(_lookAtPoint)); _camera.lookAt(_lookAtPoint, _worldUpVec); _dirty = false; }
/** * Update the position of the Camera controlled by this object. * * @param time * a delta time, in seconds. Not used currently, but might be useful for doing "ease-in" of camera * movements. */ public void update(final double time) { updateTargetPos(); if (!_dirty) { return; } if (_worldUpVec.getY() == 1) { MathUtils.sphericalToCartesian(_sphereCoords, _camPosition); } else if (_worldUpVec.getZ() == 1) { MathUtils.sphericalToCartesianZ(_sphereCoords, _camPosition); } if (_camera != null) { _camera.setLocation(_camPosition.addLocal(_lookAtPoint)); _camera.lookAt(_lookAtPoint, _worldUpVec); } _dirty = false; }
tRenderer.getCamera().setLocation(cam.getLocation()); tRenderer.getCamera().setDirection(cam.getDirection()); tRenderer.getCamera().setUp(cam.getUp());
tRenderer.getCamera().setLocation(cam.getLocation()); tRenderer.getCamera().setDirection(cam.getDirection()); tRenderer.getCamera().setUp(cam.getUp());
shadowCam.setLocation(pl.getLocation());
shadowCam.setLocation(pl.getLocation());
shadowCam.setLocation(tmpVec); shadowCam.lookAt(center, Vector3.UNIT_Y); shadowCam.setLocation(x, y, z);
shadowCam.setLocation(tmpVec); shadowCam.lookAt(center, Vector3.UNIT_Y); shadowCam.setLocation(x, y, z);
tRenderer.getCamera().setLocation(camReflectPos); tRenderer.getCamera().setDirection(camReflectDir); tRenderer.getCamera().setUp(camReflectUp); tRenderer.getCamera().setLeft(camReflectLeft); } else { tRenderer.getCamera().setLocation(cam.getLocation()); tRenderer.getCamera().setDirection(cam.getDirection()); tRenderer.getCamera().setUp(cam.getUp());
camera.setLocation(loc);
tRenderer.getCamera().setLocation(camReflectPos); tRenderer.getCamera().setDirection(camReflectDir); tRenderer.getCamera().setUp(camReflectUp); tRenderer.getCamera().setLeft(camReflectLeft); } else { tRenderer.getCamera().setLocation(cam.getLocation()); tRenderer.getCamera().setDirection(cam.getDirection()); tRenderer.getCamera().setUp(cam.getUp());
camera.setLocation(loc);
final double delta = (projectorMinHeight * 2 - cameraLocation.getY()) / (projectorMinHeight * 2); projectorCamera.setLocation(cameraLocation.getX(), projectorMinHeight * 2 - projectorMinHeight * delta, cameraLocation.getZ()); } else if (cameraLocation.getY() < 0.0 && cameraLocation.getY() > -projectorMinHeight * 2) { final double delta = (-projectorMinHeight * 2 - cameraLocation.getY()) / (-projectorMinHeight * 2); projectorCamera.setLocation(cameraLocation.getX(), -projectorMinHeight * 2 + projectorMinHeight * delta, cameraLocation.getZ());
final double delta = (projectorMinHeight * 2 - cameraLocation.getY()) / (projectorMinHeight * 2); projectorCamera.setLocation(cameraLocation.getX(), projectorMinHeight * 2 - projectorMinHeight * delta, cameraLocation.getZ()); } else if (cameraLocation.getY() < 0.0 && cameraLocation.getY() > -projectorMinHeight * 2) { final double delta = (-projectorMinHeight * 2 - cameraLocation.getY()) / (-projectorMinHeight * 2); projectorCamera.setLocation(cameraLocation.getX(), -projectorMinHeight * 2 + projectorMinHeight * delta, cameraLocation.getZ());
sinceLast = 0; tRenderer.getCamera().setLocation(cam.getLocation()); tRenderer.getCamera().setDirection(cam.getDirection()); tRenderer.getCamera().setUp(cam.getUp());