setCameraRelativeToCenteredTarget method
- Coordinates targetCoords,
- Point3d targetHeadingPitchRollDeg,
- Point3d cameraHeadingPitchDegDistanceMeters
Set camera looking toward a target position, all in the coordinate system of the focused target.
Target coordinates are lon, lat position in degrees, with respect to the focused sphere surface, altitude in meters above the sphere.
The camera is centered on the target, at the specified distance in meters from the target, heading (0=looking at the target from behind it, in the direction of the target's heading, 90=looking at the target from its right/starboard side, 180=looking at the target from the front, 270=looking at the target from its left/port side) with respect to the focused target, and pitch (0=looking toward the target center from above the target, 90=looking at the target center from the horizontal plane/equator of the target, which is the plane containing the target forward and right vectors, 180=looking at the target from below). The roll is always 0, so the horizon is level.
See generatePositionAndOrientationRelativeToCenteredTarget.
Parameters
- IN targetCoords Coordinates representing the desired latitude, longitude and altitude.
- IN targetHeadingPitchRollDeg Point3d representing the desired latitude, longitude and altitude.
- IN cameraHeadingPitchDegDistanceMeters Point3d representing the desired latitude, longitude and altitude.
Throws
- An exception if it fails.
Implementation
void setCameraRelativeToCenteredTarget(
final Coordinates targetCoords,
final Point3d targetHeadingPitchRollDeg,
final Point3d cameraHeadingPitchDegDistanceMeters,
) {
objectMethod(
_pointerId,
'MapCamera',
'setCameraRelativeToCenteredTarget',
args: <String, Object>{
'coordinates': targetCoords,
'tuple3D1': targetHeadingPitchRollDeg,
'tuple3D2': cameraHeadingPitchDegDistanceMeters,
},
);
}