Enumeration CameraManagerInterfaceSignal

The CameraManagerInterfaceSignal list all the signals that may be sent by the CameraManagerInterface.

These signals are emitted by the CameraManagerInterface when the camera is modified or an animation is triggered.

8 types of signals are emitted :

  • When the camera orientation is changed : CameraFrameChanged.
  • When the camera location (position) is changed : CameraLocationChanged.
  • When an animation is triggered : CameraAnimationStarted.
  • When an animation is ended : CameraAnimationEnded.
  • When the camera has finished its computation (once per frame) : CameraComputationEnded.
  • When the frustum of the camera has changed (usually in orthographic projection) : CameraFrustumChanged.
  • When the reference frame of the camera is changed (CameraManagerInterface.setFrameReference) : CameraReferenceFrameChanged.
  • When the controller mode is changed, after a call to CameraManagerInterface.setCameraControllerMode.

If a move changes the location and the position of the camera then the CameraFrameChanged signal is always sent prior to the CameraLocationChanged. These signals are not sent when the user presses the mouse, but only once per rendered frame when the user inputs are processed. Awaiting these signals is not a reliable way to detect user inputs as they are emitted. User inputs are processed once per frame, in batch.

/** 
* Sample to illustrate some CameraManagerInterface signal system.
*/
import { InfiniteEngineInterface, CameraManagerInterfaceSignal, tListenerCallback } from 'generated_files/documentation/appinfiniteapi';

// engine has been created previously
let lEngine : InfiniteEngineInterface;
// callback called when the camera location is changed
let myCallback : tListenerCallback;

lEngine.getCameraManager().addEventListener(CameraManagerInterfaceSignal.CameraLocationChanged, myCallback);

Please refer to the CameraManagerInterface for more information.
Events

Enumeration Members

CameraAnimationEnded: "cameraAnimationEnded"

Signal sent by the CameraManagerInterface when a camera animation is over.

No attachment for events of this type.

CameraAnimationStarted: "cameraAnimationStarted"

Signal sent by the CameraManagerInterface when a camera animation is started.

The attachment for events of this type is a number, the duration in milliseconds of the animation.

CameraComputationEnded: "cameraComputationEnded"

Signal sent by the CameraManagerInterface when the computation of the camera has ended (sent even if the position has not changed).

No attachment for events of this type.

CameraControllerChanged: "cameraControllerChanged"

Signal sent by the CameraManagerInterface when the current camera controller is changed.

The attachment for events of this type is a CameraManagerControllerAttachment, telling the old and new controller mode.

CameraFrameChanged: "cameraFrameChanged"

Signal sent by the CameraManagerInterface when the camera orientation is changed.

No attachment for events of this type.

CameraFrustumChanged: "cameraFrustumChanged"

Signal sent by the CameraManagerInterface when the field of view has changed or the type of the camera has changed (perspective, orthographic).

No attachment for events of this type.

CameraLocationChanged: "cameraLocationChanged"

Signal sent by the CameraManagerInterface when the camera location (position) is changed.

No attachment for events of this type.

CameraReferenceFrameChanged: "cameraReferenceFrameChanged"

Signal sent by the CameraManagerInterface when CameraManagerInterface.setFrameReference has been called.

No attachment for events of this type.