/** * enable/disable the camera control of the cameraNode of the current cam * * @param enabled */ private void setEnableCurrentCam(boolean enabled) { if (currentCam != null) { currentCam.getControl(CameraControl.class).setEnabled(enabled); } }
/** * Binds a camera to this cinematic, tagged by a unique name. This methods * creates and returns a CameraNode for the cam and attach it to the scene. * The control direction is set to SpatialToCamera. This camera Node can * then be used in other events to handle the camera movements during the * playback * * @param cameraName the unique tag the camera should have * @param cam the scene camera. * @return the created CameraNode. */ public CameraNode bindCamera(String cameraName, Camera cam) { if (cameras.containsKey(cameraName)) { throw new IllegalArgumentException("Camera " + cameraName + " is already binded to this cinematic"); } CameraNode node = new CameraNode(cameraName, cam); node.setControlDir(ControlDirection.SpatialToCamera); node.getControl(CameraControl.class).setEnabled(false); cameras.put(cameraName, node); scene.attachChild(node); return node; }
/** * enable/disable the camera control of the cameraNode of the current cam * * @param enabled */ private void setEnableCurrentCam(boolean enabled) { if (currentCam != null) { currentCam.getControl(CameraControl.class).setEnabled(enabled); } }
/** * Binds a camera to this cinematic, tagged by a unique name. This methods * creates and returns a CameraNode for the cam and attach it to the scene. * The control direction is set to SpatialToCamera. This camera Node can * then be used in other events to handle the camera movements during the * playback * * @param cameraName the unique tag the camera should have * @param cam the scene camera. * @return the created CameraNode. */ public CameraNode bindCamera(String cameraName, Camera cam) { if (cameras.containsKey(cameraName)) { throw new IllegalArgumentException("Camera " + cameraName + " is already binded to this cinematic"); } CameraNode node = new CameraNode(cameraName, cam); node.setControlDir(ControlDirection.SpatialToCamera); node.getControl(CameraControl.class).setEnabled(false); cameras.put(cameraName, node); scene.attachChild(node); return node; }