generatePositionAndOrientation method
- Coordinates targetCoords
Generates a position at longitude, latitude in degrees, with respect to the surface of the focused sphere, altitude in meters above the sphere (sea level), oriented toward the center of the sphere, north up.
The camera position and orientation are unchanged. The camera or any other object can then be set at the resulting position and with the resulting orientation.
Parameters
- IN targetCoords Coordinates representing the desired latitude, longitude and altitude.
Returns
- GemError.success on success, otherwise see GemError for other values.
- The computed position and orientation.
Implementation
(GemError, PositionOrientation) generatePositionAndOrientation(
final Coordinates targetCoords,
) {
final OperationResult resultString = objectMethod(
_pointerId,
'MapCamera',
'generatePositionAndOrientation',
args: targetCoords,
);
return (
GemErrorExtension.fromCode(resultString['result']['errorCode']),
PositionOrientation(
position: Point3d.fromJson(resultString['result']['tuple3D']),
orientation: Point4d.fromJson(resultString['result']['tuple4D']),
),
);
}