flywave-mapview.mapviewutils.extracttiltanglefromlocation
Home > @flywave/flywave-mapview > MapViewUtils > extractTiltAngleFromLocation
MapViewUtils.extractTiltAngleFromLocation() function
Gets the tilt angle (in radians) of the object relative to the coordinates of location.
Note: this method can be used to get the direction that an object points to, when location is the target of that object, by adding PI to it. Otherwise it only returns the tilt angle (in radians) of object in the tangent space of location.
Signature:
function extractTiltAngleFromLocation(projection: Projection, object: THREE.Object3D, location: GeoCoordinates | Vector3Like, tiltAxis?: THREE.Vector3): number;
Parameters
Parameter | Type | Description |
|---|---|---|
projection | Projection | The used when converting from geo to world coordinates. |
object | THREE.Object3D | The object to get the coordinates from. |
location | GeoCoordinates | Vector3Like | The reference point. |
tiltAxis | THREE.Vector3 | (Optional) Optional axis used to define the rotation about which the object's tilt occurs, the direction vector to the location from the camera is projected on the plane with the given angle. |
Returns:
number