setCameraRelativeToTarget method
- Coordinates targetCoords,
- Point3d targetHeadingPitchRollDeg,
- Point3d cameraHeadingPitchDegDistanceMeters,
- Point3d cameraHeadingPitchRollDeg,
Set camera relative to a target position, looking in any direction relative to the direction toward the target, all in the coordinate system of the focused target.
This function is the same as setCameraRelativeToCenteredTarget, except the camera can be oriented in a direction other than centered on the target.
The camera is centered on the target when the 4th parameter, the camera/observer heading, pitch, roll = 0, 0, 0. A nonzero heading, in degrees, specifies a rotation about the observer/camera up axis, going through the observer/camera position. A nonzero pitch, in degrees, specifies a rotation about the observer/camera right axis, going through the observer/camera position. A nonzero roll, in degrees, specifies a rotation about the observer/camera forward vector.
See generatePositionAndOrientationRelativeToTarget.
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.
- IN cameraHeadingPitchRollDeg Point3d representing the desired latitude, longitude and altitude.
Throws
- An exception if it fails.
Implementation
void setCameraRelativeToTarget(
final Coordinates targetCoords,
final Point3d targetHeadingPitchRollDeg,
final Point3d cameraHeadingPitchDegDistanceMeters,
final Point3d cameraHeadingPitchRollDeg,
) {
objectMethod(
_pointerId,
'MapCamera',
'setCameraRelativeToTarget',
args: <String, Object>{
'coordinates': targetCoords,
'tuple3D1': targetHeadingPitchRollDeg,
'tuple3D2': cameraHeadingPitchDegDistanceMeters,
'tuple3D3': cameraHeadingPitchRollDeg,
},
);
}