@itwin/core-frontend
Version:
iTwin.js frontend components
72 lines • 3.66 kB
TypeScript
/** @packageDocumentation
* @module Views
*/
import { Range3d } from "@itwin/core-geometry";
import { Cartographic } from "@itwin/core-common";
import { ScreenViewport } from "./Viewport";
import { ViewState3d } from "./ViewState";
/** Describes a rectangular area of the earth using cartographic data structures.
* @public
* @extensions
*/
export interface GlobalLocationArea {
southwest: Cartographic;
northeast: Cartographic;
}
/** Describes a location on the earth using cartographic data structures.
* The viewed area of the location can be optionally specified.
* The center of the location is specified with the center position.
* @public
* @extensions
*/
export interface GlobalLocation {
center: Cartographic;
area?: GlobalLocationArea;
}
/** @internal */
export declare class ViewGlobalLocationConstants {
static readonly birdHeightAboveEarthInMeters = 713;
static readonly satelliteHeightAboveEarthInMeters: number;
static readonly largestEarthArc = 20037500;
static readonly birdPitchAngleRadians = 0;
static readonly maximumDistanceToDrive = 96560.6;
}
/** Converts a distance in meters to some range (smaller distances result in lower number; longer distances result in larger number)
* Uses 500 for minimum output and 3000 for maximum output, unless either are specified.
* Uses [[ViewGlobalLocationConstants.satelliteHeightAboveEarthInMeters]] as maximum input meters unless specified.
* A good use of this is to convert meters to some transition duration.
* @internal
*/
export declare function metersToRange(inputMeters: number, minimumOutput?: number, maximumOutput?: number, maximumInputMeters?: number): number;
/** Queries the actual elevation of a cartographic point on the globe (using Bing elevation services)
* @public
* @extensions
*/
export declare function queryTerrainElevationOffset(viewport: ScreenViewport, carto: Cartographic): Promise<number>;
/** Converts a cartographic area on the globe to an ideal eye height to view that area.
* Offset in meters, which defaults to 0, is applied to final eye height.
* @internal
*/
export declare function areaToEyeHeight(view3d: ViewState3d, area: GlobalLocationArea, offset?: number): number;
/** Converts a cartographic area on the globe to an ideal eye height to view that area using the GCS.
* Offset in meters, which defaults to 0, is applied to final eye height.
* @internal
*/
export declare function areaToEyeHeightFromGcs(view3d: ViewState3d, area: GlobalLocationArea, offset?: number): Promise<number>;
/** Converts a root range (often project extents) to a cartographic area.
* @internal
*/
export declare function rangeToCartographicArea(view3d: ViewState3d, range: Range3d): GlobalLocationArea | undefined;
/** Converts the eye of the camera to a cartographic location on the globe as if it was at height 0.
* If preserveHeight is set to true, then height will remain untouched.
* @internal
*/
export declare function eyeToCartographicOnGlobe(viewport: ScreenViewport, preserveHeight?: boolean): Cartographic | undefined;
/** Converts the eye of the camera to a cartographic location on the globe as if it was at height 0 using the GCS.
* If preserveHeight is set to true, then height will remain untouched.
* @internal
*/
export declare function eyeToCartographicOnGlobeFromGcs(viewport: ScreenViewport, preserveHeight?: boolean): Promise<Cartographic | undefined>;
/** @internal */
export declare function viewGlobalLocation(viewport: ScreenViewport, doAnimate: boolean, eyeHeight?: number, pitchAngleRadians?: number, location?: GlobalLocation): number;
//# sourceMappingURL=ViewGlobalLocation.d.ts.map