LuciadCPillar 2023.1.04
|
Class that allows to build a rotate action and apply it, either directly or using an animation. More...
#include <luciad/maps/MapNavigator.h>
Public Member Functions | |
~RotateAction () | |
RotateAction & | animate (bool animated) |
Specifies if the action should use an animation. More... | |
RotateAction & | center (const Point ¢erMapLocation) |
Sets the center around which to rotate. More... | |
RotateAction & | deltaPitch (double deltaPitch) |
Sets the pitch value that needs to be added to the initial pitch of the 3D camera. More... | |
RotateAction & | deltaRotation (Azimuth deltaRotation) |
Sets the 2D rotation that needs to be added to the initial rotation of the camera. More... | |
RotateAction & | deltaYaw (Azimuth deltaYaw) |
Sets the yaw value that needs to be added to the initial yaw of the 3D camera. More... | |
RotateAction & | duration (std::chrono::milliseconds duration) |
Specifies the duration of the animation. More... | |
void | rotate () const |
Applies the rotate action. More... | |
RotateAction & | targetPitch (double targetPitch) |
Sets the target pitch value of the 3D camera. More... | |
RotateAction & | targetRotation (Azimuth targetRotation) |
Sets the target angle of the 2D camera rotation. More... | |
RotateAction & | targetYaw (Azimuth targetYaw) |
Sets the target yaw of the 3D camera. More... | |
Class that allows to build a rotate action and apply it, either directly or using an animation.
Rotating works by:
Example: Rotate the (2D) view
Example of an incremental rotate action (for example based on a mouse drag):
luciad::MapNavigator::RotateAction::~RotateAction | ( | ) |
RotateAction & luciad::MapNavigator::RotateAction::animate | ( | bool | animated | ) |
Specifies if the action should use an animation.
animated | if this action should use an animation. The default is false. |
RotateAction & luciad::MapNavigator::RotateAction::center | ( | const Point & | centerMapLocation | ) |
Sets the center around which to rotate.
This property is mandatory. Not setting it will cause the RotateAction::rotate method to throw an exception.
centerMapLocation | the center, defined in the reference of the Map |
luciad::InvalidArgumentException | if the toMapLocation parameter is not in the map coordinate reference. |
RotateAction & luciad::MapNavigator::RotateAction::deltaPitch | ( | double | deltaPitch | ) |
Sets the pitch value that needs to be added to the initial pitch of the 3D camera.
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 method can only be called when the Map is a 3D map (see Map::is3D).
deltaPitch | the pitch value that needs to be added to the initial pitch of the 3D camera, expressed in degrees. |
luciad::InvalidArgumentException | if the Map is a 2D Map. |
RotateAction & luciad::MapNavigator::RotateAction::deltaRotation | ( | Azimuth | deltaRotation | ) |
Sets the 2D rotation that needs to be added to the initial rotation of the camera.
This method can only be called when the Map is a 2D map (see Map::is3D).
deltaRotation | the 2D rotation that needs to be added to the initial rotation of the camera |
luciad::InvalidArgumentException | if the Map is a 3D Map. |
RotateAction & luciad::MapNavigator::RotateAction::deltaYaw | ( | Azimuth | deltaYaw | ) |
Sets the yaw value that needs to be added to the initial yaw of the 3D camera.
This method can only be called when the Map is a 3D map (see Map::is3D).
deltaYaw | the yaw value that needs to be added to the initial yaw of the 3D camera. |
luciad::InvalidArgumentException | if the Map is a 2D Map. |
RotateAction & luciad::MapNavigator::RotateAction::duration | ( | std::chrono::milliseconds | duration | ) |
Specifies the duration of the animation.
This parameter is only used if animate(bool) is called with true as argument.
duration | the duration of the animation in milliseconds. The default is 2000 (=2 seconds) |
void luciad::MapNavigator::RotateAction::rotate | ( | ) | const |
Applies the rotate action.
luciad::LogicException | if the action is not built correctly, for example if mandatory parameters are missing, or if incompatible parameters are configured. |
RotateAction & luciad::MapNavigator::RotateAction::targetPitch | ( | double | targetPitch | ) |
Sets the target pitch value of the 3D camera.
After the rotate operation finishes, the map's pitch will equal this value.
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 method can only be called when the Map is a 3D map (see Map::is3D).
targetPitch | the target pitch value of the 3D camera, expressed in degrees |
luciad::InvalidArgumentException | if the Map is a 2D Map. |
RotateAction & luciad::MapNavigator::RotateAction::targetRotation | ( | Azimuth | targetRotation | ) |
Sets the target angle of the 2D camera rotation.
After the rotate operation finishes, the map's rotation will equal this value.
This method can only be called when the Map is a 2D map (see Map::is3D).
targetRotation | the target angle of the 2D camera rotation. |
luciad::InvalidArgumentException | if the Map is a 3D Map. |
RotateAction & luciad::MapNavigator::RotateAction::targetYaw | ( | Azimuth | targetYaw | ) |
Sets the target yaw of the 3D camera.
After the rotate operation finishes, the map's yaw will equal this value.
This method can only be called when the Map is a 3D map (see Map::is3D).
targetYaw | the target yaw of the 3D camera |
luciad::InvalidArgumentException | if the Map is a 2D Map. |