LuciadCPillar C# 2023.1.03
Luciad.Maps.MapNavigator.RotateAction Class Reference

Class that allows to build a rotate action and apply it, either directly or using an animation. More...

Inheritance diagram for Luciad.Maps.MapNavigator.RotateAction:

Public Member Functions

Luciad.Maps.MapNavigator.RotateAction Animate (bool animated)
 Specifies if the action should use an animation. More...
 
Luciad.Maps.MapNavigator.RotateAction Center (Luciad.Geometries.Point centerMapLocation)
 Sets the center around which to rotate. More...
 
Luciad.Maps.MapNavigator.RotateAction DeltaPitch (double deltaPitch)
 Sets the pitch value that needs to be added to the initial pitch of the 3D camera. More...
 
Luciad.Maps.MapNavigator.RotateAction DeltaRotation (Luciad.Cartesian.Azimuth deltaRotation)
 Sets the 2D rotation that needs to be added to the initial rotation of the camera. More...
 
Luciad.Maps.MapNavigator.RotateAction DeltaYaw (Luciad.Cartesian.Azimuth deltaYaw)
 Sets the yaw value that needs to be added to the initial yaw of the 3D camera. More...
 
void Dispose ()
 
Luciad.Maps.MapNavigator.RotateAction Duration (System.TimeSpan duration)
 Specifies the duration of the animation. More...
 
void Rotate ()
 Applies the rotate action. More...
 
Luciad.Maps.MapNavigator.RotateAction TargetPitch (double targetPitch)
 Sets the target pitch value of the 3D camera. More...
 
Luciad.Maps.MapNavigator.RotateAction TargetRotation (Luciad.Cartesian.Azimuth targetRotation)
 Sets the target angle of the 2D camera rotation. More...
 
Luciad.Maps.MapNavigator.RotateAction TargetYaw (Luciad.Cartesian.Azimuth targetYaw)
 Sets the target yaw of the 3D camera. More...
 

Detailed Description

Class that allows to build a rotate action and apply it, either directly or using an animation.

Rotating works by: defining a point around which to rotate the Map (RotateAction::center) defining the rotation to apply to the current Map rotation. There are different angles for 2D and 3D: 2D: RotateAction::deltaRotation 3D: RotateAction::deltaYaw and RotateAction::deltaPitch

Example: Rotate the (2D) view

Example of an incremental rotate action (for example based on a mouse drag):

Map.ViewMapTransformation viewMapTransformation = map.GetViewMapTransformation();
Point point = viewMapTransformation.ViewToMap(Map.LocationMode.ClosestSurface, viewLocation);
if (point != null)
{
rotateAction = map.MapNavigator.NewRotateAction().Center(point);
// When a drag event arrives
rotateAction.DeltaRotation(originalViewLocation.X - eventLocation.X).Rotate();
// When an other drag event arrives
rotateAction.DeltaRotation(originalViewLocation.X - eventLocation.X).Rotate();
// When the drag gesture stops: cleanup
rotateAction.Dispose();
}
This class allows to transform between view (pixel coordinates on the screen) and map coordinates.
Definition: Map.cs:885
Luciad.Geometries.Point ViewToMap(Luciad.Maps.Map.LocationMode locationMode, Luciad.Cartesian.Coordinate coordinate)
Transform a coordinate from the view to a point in the world reference using the desired location mod...
Definition: Map.cs:922
A map for showing geo-spatial data.
Definition: Map.cs:13
LocationMode
Used to determine how the Map::getViewToMapTransformation method determines the point in Map coordina...
Definition: Map.cs:1130
Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::MapNavigator::RotateAction.

Member Function Documentation

◆ Animate()

Luciad.Maps.MapNavigator.RotateAction Luciad.Maps.MapNavigator.RotateAction.Animate ( bool  animated)
inline

Specifies if the action should use an animation.

animated

if this action should use an animation. The default is false.

this

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::MapNavigator::RotateAction::animate.

◆ Center()

Luciad.Maps.MapNavigator.RotateAction Luciad.Maps.MapNavigator.RotateAction.Center ( Luciad.Geometries.Point  centerMapLocation)
inline

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

this

luciad::InvalidArgumentException

if the toMapLocation parameter is not in the map coordinate reference.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::MapNavigator::RotateAction::center.

◆ DeltaPitch()

Luciad.Maps.MapNavigator.RotateAction Luciad.Maps.MapNavigator.RotateAction.DeltaPitch ( double  deltaPitch)
inline

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.

this

luciad::InvalidArgumentException

if the Map is a 2D Map.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::MapNavigator::RotateAction::deltaPitch.

◆ DeltaRotation()

Luciad.Maps.MapNavigator.RotateAction Luciad.Maps.MapNavigator.RotateAction.DeltaRotation ( Luciad.Cartesian.Azimuth  deltaRotation)
inline

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

this

luciad::InvalidArgumentException

if the Map is a 3D Map.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::MapNavigator::RotateAction::deltaRotation.

◆ DeltaYaw()

Luciad.Maps.MapNavigator.RotateAction Luciad.Maps.MapNavigator.RotateAction.DeltaYaw ( Luciad.Cartesian.Azimuth  deltaYaw)
inline

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.

this

luciad::InvalidArgumentException

if the Map is a 2D Map.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::MapNavigator::RotateAction::deltaYaw.

◆ Dispose()

void Luciad.Maps.MapNavigator.RotateAction.Dispose ( )
inline

◆ Duration()

Luciad.Maps.MapNavigator.RotateAction Luciad.Maps.MapNavigator.RotateAction.Duration ( System.TimeSpan  duration)
inline

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)

this

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::MapNavigator::RotateAction::duration.

◆ Rotate()

void Luciad.Maps.MapNavigator.RotateAction.Rotate ( )
inline

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.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::MapNavigator::RotateAction::rotate.

◆ TargetPitch()

Luciad.Maps.MapNavigator.RotateAction Luciad.Maps.MapNavigator.RotateAction.TargetPitch ( double  targetPitch)
inline

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

this

luciad::InvalidArgumentException

if the Map is a 2D Map.

2021.1

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::MapNavigator::RotateAction::targetPitch.

◆ TargetRotation()

Luciad.Maps.MapNavigator.RotateAction Luciad.Maps.MapNavigator.RotateAction.TargetRotation ( Luciad.Cartesian.Azimuth  targetRotation)
inline

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.

this

luciad::InvalidArgumentException

if the Map is a 3D Map.

2021.1

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::MapNavigator::RotateAction::targetRotation.

◆ TargetYaw()

Luciad.Maps.MapNavigator.RotateAction Luciad.Maps.MapNavigator.RotateAction.TargetYaw ( Luciad.Cartesian.Azimuth  targetYaw)
inline

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

this

luciad::InvalidArgumentException

if the Map is a 2D Map.

2021.1

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::MapNavigator::RotateAction::targetYaw.