public void setEnabled(boolean enabled) { camControl.setEnabled(enabled); }
/** * 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; }
public void setEnabled(boolean enabled) { camControl.setEnabled(enabled); }
public void setEnabled(boolean enabled) { camControl.setEnabled(enabled); }
/** * 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); } }
@Override public Control cloneForSpatial(Spatial newSpatial) { CameraControl control = new CameraControl(camera, controlDir); control.setSpatial(newSpatial); control.setEnabled(isEnabled()); return control; } private static final String CONTROL_DIR_NAME = "controlDir";
/** * 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; }