Class MapNavigator.LookFromAction
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
MapNavigator
A look-from action moves the camera to a given eye position and orientation. This can for example be used to fly the camera to a known viewpoint, such as a panorama location.
Looking from works by:
- defining the eye position to move the camera to (
LookFromAction#eye) - optionally defining the orientation of the camera at that position (
LookFromAction#yaw,LookFromAction#pitchandLookFromAction#roll)
Note that the navigation constraints also apply to this action. For example, to move the camera close to the ground, lower the minimum altitude of the above constraint.
- Since:
- 2026.1
-
Method Summary
Modifier and TypeMethodDescriptionanimate(boolean animated) Specifies if the action should use an animation.voidclose()Specifies the duration of the animation.Sets the eye position to move the camera to.protected voidfinalize()voidlookFrom()Applies the look-from action.pitch(double pitch) Sets the pitch angle of the camera at the target eye position.roll(double roll) Sets the roll angle of the camera at the target eye position.Sets the yaw angle of the camera at the target eye position.
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
eye
Sets the eye position to move the camera to.The position can be defined in any reference.
This parameter is mandatory. Not setting it will cause
LookFromAction#lookFromto throw an exception.- Parameters:
eyePosition- the eye position to move the camera to- Returns:
- this
-
yaw
Sets the yaw angle of the camera at the target eye position.This parameter is optional. The default is 0.
- Parameters:
yaw- the yaw angle of the camera at the target eye position- Returns:
- this
-
pitch
Sets the pitch angle of the camera at the target eye position.Pitch is defined as the camera's tilt angle. A value of 0 points the camera towards the horizon (i.e. horizontally); -90 points straight down towards the ground and +90 points straight up.
This parameter is optional. The default is 0.
- Parameters:
pitch- the pitch angle of the camera at the target eye position, expressed in degrees- Returns:
- this
-
roll
Sets the roll angle of the camera at the target eye position.Roll is a rotation around the camera's forward direction. Negative angles bank the camera left; positive angles bank the camera right.
This parameter is optional. The default is 0.
- Parameters:
roll- the roll angle of the camera at the target eye position, expressed in degrees- Returns:
- this
-
animate
Specifies if the action should use an animation.- Parameters:
animated- if this action should use an animation. The default is false.- Returns:
- this
-
duration
Specifies the duration of the animation.This parameter is only used if
animate(bool)is called with true as argument.- Parameters:
duration- the duration of the animation in milliseconds. The default is 2000 (=2 seconds)- Returns:
- this
-
lookFrom
Applies the look-from action.If no camera path towards the eye position can be determined, for example because the eye position cannot be transformed to the map reference, this method has no effect.
- Throws:
IllegalStateException- if the action is not built correctly, for example if mandatory parameters are missing.
-