flywave-mapview.mapviewutils.getcamerarotationattarget
Home > @flywave/flywave-mapview > MapViewUtils > getCameraRotationAtTarget
MapViewUtils.getCameraRotationAtTarget() function
Computes the rotation of the camera according to yaw and pitch in degrees. The computations hinge on the current projection and target, because yaw and pitch are defined in tangent space of the target point.
**Note:** yaw == 0 && pitch == 0 will north up the map and you will look downwards onto the map.
Signature:
function getCameraRotationAtTarget(projection: Projection, target: GeoCoordinates, yawDeg: number, pitchDeg: number, result?: THREE.Quaternion): THREE.Quaternion;
Parameters
Parameter | Type | Description |
|---|---|---|
projection | Projection | Current projection. |
target | GeoCoordinates | The camera target. |
yawDeg | number | Yaw in degrees, counter-clockwise (as opposed to azimuth), starting north. |
pitchDeg | number | Pitch in degrees. |
result | THREE.Quaternion | (Optional) |
Returns:
THREE.Quaternion