casc-cesium
Version:
Vue 3.x components for CesiumJS.
1,371 lines (1,337 loc) • 2.03 MB
TypeScript
/* eslint-disable */
// cesium-shim
declare namespace Cesium {
function createDefaultImageryProviderViewModels(): Array<ProviderViewModel>
function createDefaultTerrainProviderViewModels(): Array<ProviderViewModel>
function sprintf(...args: any[]): string
function appendForwardSlash(url: string): string
const knockout: any
const when: any
const Uri: any
const GlobeSurfaceTile: any
const ManagedArray: any
const VERSION: string
const ClearCommand: any
const Pass: any
const VertexArray: any
const BufferUsage: any
const ShaderProgram: any
const RenderState: any
const DrawCommand: any
const ComputeCommand: any
const Sampler: any
const Texture: any
const Framebuffer: any
const ShaderSource: any
const S3MTilesLayer: any
const SuperMapVersion: string
interface Rectangle {
expand: (widthFactor: number, heightFactor: number, result?: Rectangle) => Rectangle
}
interface CumulusCloud {
id?: string
}
interface Viewer {
viewerWidgetResized: Event
_selectionIndicator?: SelectionIndicator
_infoBox?: InfoBox
_geocoder?: Geocoder
_homeButton?: HomeButton
_sceneModePicker?: SceneModePicker
_projectionPicker?: ProjectionPicker
_baseLayerPicker?: BaseLayerPicker
_baseLayerPickerDropDown?: Element
_navigationHelpButton?: NavigationHelpButton
_animation?: Animation
_timeline?: Timeline
_fullscreenButton?: FullscreenButton
_vrButton?: VRButton
_terrainExaggeration: number
_eventHelper?: EventHelper
_toolbar?: Element
_element?: Element
_onInfoBoxCameraClicked?(val: InfoBoxViewModel): void
_onInfoBoxClockClicked?(val: InfoBoxViewModel): void
_clearObjects?: () => void
_clearTrackedObject?(val: InfoBoxViewModel): void
_vcPickScreenSpaceEventHandler: ScreenSpaceEventHandler
_vcViewerScreenSpaceEventHandler: ScreenSpaceEventHandler
}
interface Timeline {
makeLabel?(time: JulianDate): string
addEventListener?(type, listener, useCapture): void
}
interface Scene {
frameState: any
pickPositionWorldCoordinates(pickPositionWorldCoordinates: Cesium.Cartesian2, result?: Cesium.Cartesian3): Cesium.Cartesian3
_performanceDisplay: any
tweens: any
pickFromRay(ray: Cesium.Ray, objectsToExclude?: Array<any>, width?: number): any
drillPickFromRay(ray: Cesium.Ray, limit?: number, objectsToExclude?: Array<any>, width?: number): any
}
interface Globe {
pickTriangle?(
ray: Ray,
scene: Scene,
projection: MapProjection,
cullBackFaces: boolean
):
| {
intersection: Cartesian3
v0: Cartesian3
v1: Cartesian3
v2: Cartesian3
}
| undefined
}
// interface GlobeSurfaceTile {
// pickTriangle?(ray: Ray, mode: SceneMode, projection: MapProjection, cullBackFaces: boolean): {
// intersection: Cartesian3
// v0: Cartesian3
// v1: Cartesian3
// v2: Cartesian3
// } | undefined
// }
interface ImageryLayer {
/**
* Specify the relative order of the layers.
*/
sortOrder?: number
}
interface ImageryLayerCollection {
_layers: ImageryLayer[]
_update(): void
}
interface BillboardCollection {
_billboards: Billboard[]
}
interface LabelCollection {
_labels: Label[]
}
interface PointPrimitiveCollection {
_pointPrimitives: PointPrimitive[]
}
interface PolylineCollection {
_polylines: Polyline[]
}
interface PrimitiveCollection {
_primitives: Array<Primitive | any>
}
interface CloudCollection {
_clouds: CumulusCloud[]
}
interface ShadowMap {
// constructor(options: {
// lightCamera?: Camera
// enabled?: boolean
// isPointLight?: boolean
// pointLightRadius?: number | boolean
// cascadesEnabled?: boolean
// numberOfCascades?: number
// maximumDistance?: number
// size?: number
// softShadows?: boolean
// darkness?: number
// normalOffset?: boolean
// fadingEnabled?: boolean
// context?: any
// fromLightSource?: boolean
// })
update(e): void
destroy(): boolean
_shadowMapTexture: any
_shadowMapMatrix: any
_lightPositionEC: any
_pointBias: any
_distance: number
maximumDistance: number
_textureSize: any
_pointLightRadius: number | boolean
enabled: boolean
}
// eslint-disable-next-line no-var
var SuperMapImageryProvider: any
// eslint-disable-next-line no-var
var TiandituImageryProvider: any
// eslint-disable-next-line no-var
var GeoTerrainProvider: any
// eslint-disable-next-line no-var
var BaiduMapImageryProvider: any
// eslint-disable-next-line no-var
var AMapImageryProvider: any
// eslint-disable-next-line no-var
var TencentImageryProvider: any
namespace ScreenSpaceEventParamsType {
export interface LEFT_DOWN {
position: Cesium.Cartesian2
}
export interface LEFT_UP {
position: Cesium.Cartesian2
}
export interface LEFT_CLICK {
position: Cesium.Cartesian2
}
export interface LEFT_DOUBLE_CLICK {
position: Cesium.Cartesian2
}
export interface RIGHT_DOWN {
position: Cesium.Cartesian2
}
export interface RIGHT_UP {
position: Cesium.Cartesian2
}
export interface RIGHT_CLICK {
position: Cesium.Cartesian2
}
export interface MIDDLE_DOWN {
position: Cesium.Cartesian2
}
export interface MIDDLE_UP {
position: Cesium.Cartesian2
}
export interface MIDDLE_CLICK {
position: Cesium.Cartesian2
}
export interface MOUSE_MOVE {
startPosition: Cesium.Cartesian2
endPosition: Cesium.Cartesian2
}
export type WHEEL = number
export interface PINCH_START {
position1: Cesium.Cartesian2
position2: Cesium.Cartesian2
}
export type PINCH_END = undefined
export interface PINCH_MOVE {
distance: {
startPosition: Cesium.Cartesian2
endPosition: Cesium.Cartesian2
}
angleAndHeight: {
startPosition: Cesium.Cartesian2
endPosition: Cesium.Cartesian2
}
}
}
}
// eslint-disable-next-line no-var
declare var XE: any
// eslint-disable-next-line no-var
declare var XbsjCesium: any
// eslint-disable-next-line no-var
declare var XbsjEarth: any
// eslint-disable-next-line no-var
declare var mars3d: any
// eslint-disable-next-line no-var
declare var DC: any
// eslint-disable-next-line no-var
declare var DcCore: any
// cesium-native
declare namespace Cesium {
/**
* Private interfaces to support PropertyBag being a dictionary-like object.
*/
interface DictionaryLike {
[index: string]: any
}
/**
* Enum containing WebGL Constant values by name.
for use without an active WebGL context, or in cases where certain constants are unavailable using the WebGL context
(For example, in [Safari 9]{@link https://github.com/CesiumGS/cesium/issues/2989}).
These match the constants from the [WebGL 1.0]{@link https://www.khronos.org/registry/webgl/specs/latest/1.0/}
and [WebGL 2.0]{@link https://www.khronos.org/registry/webgl/specs/latest/2.0/}
specifications.
*/
export enum WebGLConstants {
DEPTH_BUFFER_BIT = 256,
STENCIL_BUFFER_BIT = 1024,
COLOR_BUFFER_BIT = 16384,
POINTS = 0,
LINES = 1,
LINE_LOOP = 2,
LINE_STRIP = 3,
TRIANGLES = 4,
TRIANGLE_STRIP = 5,
TRIANGLE_FAN = 6,
ZERO = 0,
ONE = 1,
SRC_COLOR = 768,
ONE_MINUS_SRC_COLOR = 769,
SRC_ALPHA = 770,
ONE_MINUS_SRC_ALPHA = 771,
DST_ALPHA = 772,
ONE_MINUS_DST_ALPHA = 773,
DST_COLOR = 774,
ONE_MINUS_DST_COLOR = 775,
SRC_ALPHA_SATURATE = 776,
FUNC_ADD = 32774,
BLEND_EQUATION = 32777,
BLEND_EQUATION_RGB = 32777,
BLEND_EQUATION_ALPHA = 34877,
FUNC_SUBTRACT = 32778,
FUNC_REVERSE_SUBTRACT = 32779,
BLEND_DST_RGB = 32968,
BLEND_SRC_RGB = 32969,
BLEND_DST_ALPHA = 32970,
BLEND_SRC_ALPHA = 32971,
CONSTANT_COLOR = 32769,
ONE_MINUS_CONSTANT_COLOR = 32770,
CONSTANT_ALPHA = 32771,
ONE_MINUS_CONSTANT_ALPHA = 32772,
BLEND_COLOR = 32773,
ARRAY_BUFFER = 34962,
ELEMENT_ARRAY_BUFFER = 34963,
ARRAY_BUFFER_BINDING = 34964,
ELEMENT_ARRAY_BUFFER_BINDING = 34965,
STREAM_DRAW = 35040,
STATIC_DRAW = 35044,
DYNAMIC_DRAW = 35048,
BUFFER_SIZE = 34660,
BUFFER_USAGE = 34661,
CURRENT_VERTEX_ATTRIB = 34342,
FRONT = 1028,
BACK = 1029,
FRONT_AND_BACK = 1032,
CULL_FACE = 2884,
BLEND = 3042,
DITHER = 3024,
STENCIL_TEST = 2960,
DEPTH_TEST = 2929,
SCISSOR_TEST = 3089,
POLYGON_OFFSET_FILL = 32823,
SAMPLE_ALPHA_TO_COVERAGE = 32926,
SAMPLE_COVERAGE = 32928,
NO_ERROR = 0,
INVALID_ENUM = 1280,
INVALID_VALUE = 1281,
INVALID_OPERATION = 1282,
OUT_OF_MEMORY = 1285,
CW = 2304,
CCW = 2305,
LINE_WIDTH = 2849,
ALIASED_POINT_SIZE_RANGE = 33901,
ALIASED_LINE_WIDTH_RANGE = 33902,
CULL_FACE_MODE = 2885,
FRONT_FACE = 2886,
DEPTH_RANGE = 2928,
DEPTH_WRITEMASK = 2930,
DEPTH_CLEAR_VALUE = 2931,
DEPTH_FUNC = 2932,
STENCIL_CLEAR_VALUE = 2961,
STENCIL_FUNC = 2962,
STENCIL_FAIL = 2964,
STENCIL_PASS_DEPTH_FAIL = 2965,
STENCIL_PASS_DEPTH_PASS = 2966,
STENCIL_REF = 2967,
STENCIL_VALUE_MASK = 2963,
STENCIL_WRITEMASK = 2968,
STENCIL_BACK_FUNC = 34816,
STENCIL_BACK_FAIL = 34817,
STENCIL_BACK_PASS_DEPTH_FAIL = 34818,
STENCIL_BACK_PASS_DEPTH_PASS = 34819,
STENCIL_BACK_REF = 36003,
STENCIL_BACK_VALUE_MASK = 36004,
STENCIL_BACK_WRITEMASK = 36005,
VIEWPORT = 2978,
SCISSOR_BOX = 3088,
COLOR_CLEAR_VALUE = 3106,
COLOR_WRITEMASK = 3107,
UNPACK_ALIGNMENT = 3317,
PACK_ALIGNMENT = 3333,
MAX_TEXTURE_SIZE = 3379,
MAX_VIEWPORT_DIMS = 3386,
SUBPIXEL_BITS = 3408,
RED_BITS = 3410,
GREEN_BITS = 3411,
BLUE_BITS = 3412,
ALPHA_BITS = 3413,
DEPTH_BITS = 3414,
STENCIL_BITS = 3415,
POLYGON_OFFSET_UNITS = 10752,
POLYGON_OFFSET_FACTOR = 32824,
TEXTURE_BINDING_2D = 32873,
SAMPLE_BUFFERS = 32936,
SAMPLES = 32937,
SAMPLE_COVERAGE_VALUE = 32938,
SAMPLE_COVERAGE_INVERT = 32939,
COMPRESSED_TEXTURE_FORMATS = 34467,
DONT_CARE = 4352,
FASTEST = 4353,
NICEST = 4354,
GENERATE_MIPMAP_HINT = 33170,
BYTE = 5120,
UNSIGNED_BYTE = 5121,
SHORT = 5122,
UNSIGNED_SHORT = 5123,
INT = 5124,
UNSIGNED_INT = 5125,
FLOAT = 5126,
DEPTH_COMPONENT = 6402,
ALPHA = 6406,
RGB = 6407,
RGBA = 6408,
LUMINANCE = 6409,
LUMINANCE_ALPHA = 6410,
UNSIGNED_SHORT_4_4_4_4 = 32819,
UNSIGNED_SHORT_5_5_5_1 = 32820,
UNSIGNED_SHORT_5_6_5 = 33635,
FRAGMENT_SHADER = 35632,
VERTEX_SHADER = 35633,
MAX_VERTEX_ATTRIBS = 34921,
MAX_VERTEX_UNIFORM_VECTORS = 36347,
MAX_VARYING_VECTORS = 36348,
MAX_COMBINED_TEXTURE_IMAGE_UNITS = 35661,
MAX_VERTEX_TEXTURE_IMAGE_UNITS = 35660,
MAX_TEXTURE_IMAGE_UNITS = 34930,
MAX_FRAGMENT_UNIFORM_VECTORS = 36349,
SHADER_TYPE = 35663,
DELETE_STATUS = 35712,
LINK_STATUS = 35714,
VALIDATE_STATUS = 35715,
ATTACHED_SHADERS = 35717,
ACTIVE_UNIFORMS = 35718,
ACTIVE_ATTRIBUTES = 35721,
SHADING_LANGUAGE_VERSION = 35724,
CURRENT_PROGRAM = 35725,
NEVER = 512,
LESS = 513,
EQUAL = 514,
LEQUAL = 515,
GREATER = 516,
NOTEQUAL = 517,
GEQUAL = 518,
ALWAYS = 519,
KEEP = 7680,
REPLACE = 7681,
INCR = 7682,
DECR = 7683,
INVERT = 5386,
INCR_WRAP = 34055,
DECR_WRAP = 34056,
VENDOR = 7936,
RENDERER = 7937,
VERSION = 7938,
NEAREST = 9728,
LINEAR = 9729,
NEAREST_MIPMAP_NEAREST = 9984,
LINEAR_MIPMAP_NEAREST = 9985,
NEAREST_MIPMAP_LINEAR = 9986,
LINEAR_MIPMAP_LINEAR = 9987,
TEXTURE_MAG_FILTER = 10240,
TEXTURE_MIN_FILTER = 10241,
TEXTURE_WRAP_S = 10242,
TEXTURE_WRAP_T = 10243,
TEXTURE_2D = 3553,
TEXTURE = 5890,
TEXTURE_CUBE_MAP = 34067,
TEXTURE_BINDING_CUBE_MAP = 34068,
TEXTURE_CUBE_MAP_POSITIVE_X = 34069,
TEXTURE_CUBE_MAP_NEGATIVE_X = 34070,
TEXTURE_CUBE_MAP_POSITIVE_Y = 34071,
TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072,
TEXTURE_CUBE_MAP_POSITIVE_Z = 34073,
TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074,
MAX_CUBE_MAP_TEXTURE_SIZE = 34076,
TEXTURE0 = 33984,
TEXTURE1 = 33985,
TEXTURE2 = 33986,
TEXTURE3 = 33987,
TEXTURE4 = 33988,
TEXTURE5 = 33989,
TEXTURE6 = 33990,
TEXTURE7 = 33991,
TEXTURE8 = 33992,
TEXTURE9 = 33993,
TEXTURE10 = 33994,
TEXTURE11 = 33995,
TEXTURE12 = 33996,
TEXTURE13 = 33997,
TEXTURE14 = 33998,
TEXTURE15 = 33999,
TEXTURE16 = 34000,
TEXTURE17 = 34001,
TEXTURE18 = 34002,
TEXTURE19 = 34003,
TEXTURE20 = 34004,
TEXTURE21 = 34005,
TEXTURE22 = 34006,
TEXTURE23 = 34007,
TEXTURE24 = 34008,
TEXTURE25 = 34009,
TEXTURE26 = 34010,
TEXTURE27 = 34011,
TEXTURE28 = 34012,
TEXTURE29 = 34013,
TEXTURE30 = 34014,
TEXTURE31 = 34015,
ACTIVE_TEXTURE = 34016,
REPEAT = 10497,
CLAMP_TO_EDGE = 33071,
MIRRORED_REPEAT = 33648,
FLOAT_VEC2 = 35664,
FLOAT_VEC3 = 35665,
FLOAT_VEC4 = 35666,
INT_VEC2 = 35667,
INT_VEC3 = 35668,
INT_VEC4 = 35669,
BOOL = 35670,
BOOL_VEC2 = 35671,
BOOL_VEC3 = 35672,
BOOL_VEC4 = 35673,
FLOAT_MAT2 = 35674,
FLOAT_MAT3 = 35675,
FLOAT_MAT4 = 35676,
SAMPLER_2D = 35678,
SAMPLER_CUBE = 35680,
VERTEX_ATTRIB_ARRAY_ENABLED = 34338,
VERTEX_ATTRIB_ARRAY_SIZE = 34339,
VERTEX_ATTRIB_ARRAY_STRIDE = 34340,
VERTEX_ATTRIB_ARRAY_TYPE = 34341,
VERTEX_ATTRIB_ARRAY_NORMALIZED = 34922,
VERTEX_ATTRIB_ARRAY_POINTER = 34373,
VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 34975,
IMPLEMENTATION_COLOR_READ_TYPE = 35738,
IMPLEMENTATION_COLOR_READ_FORMAT = 35739,
COMPILE_STATUS = 35713,
LOW_FLOAT = 36336,
MEDIUM_FLOAT = 36337,
HIGH_FLOAT = 36338,
LOW_INT = 36339,
MEDIUM_INT = 36340,
HIGH_INT = 36341,
FRAMEBUFFER = 36160,
RENDERBUFFER = 36161,
RGBA4 = 32854,
RGB5_A1 = 32855,
RGB565 = 36194,
DEPTH_COMPONENT16 = 33189,
STENCIL_INDEX = 6401,
STENCIL_INDEX8 = 36168,
DEPTH_STENCIL = 34041,
RENDERBUFFER_WIDTH = 36162,
RENDERBUFFER_HEIGHT = 36163,
RENDERBUFFER_INTERNAL_FORMAT = 36164,
RENDERBUFFER_RED_SIZE = 36176,
RENDERBUFFER_GREEN_SIZE = 36177,
RENDERBUFFER_BLUE_SIZE = 36178,
RENDERBUFFER_ALPHA_SIZE = 36179,
RENDERBUFFER_DEPTH_SIZE = 36180,
RENDERBUFFER_STENCIL_SIZE = 36181,
FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 36048,
FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 36049,
FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 36050,
FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 36051,
COLOR_ATTACHMENT0 = 36064,
DEPTH_ATTACHMENT = 36096,
STENCIL_ATTACHMENT = 36128,
DEPTH_STENCIL_ATTACHMENT = 33306,
NONE = 0,
FRAMEBUFFER_COMPLETE = 36053,
FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 36054,
FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 36055,
FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 36057,
FRAMEBUFFER_UNSUPPORTED = 36061,
FRAMEBUFFER_BINDING = 36006,
RENDERBUFFER_BINDING = 36007,
MAX_RENDERBUFFER_SIZE = 34024,
INVALID_FRAMEBUFFER_OPERATION = 1286,
UNPACK_FLIP_Y_WEBGL = 37440,
UNPACK_PREMULTIPLY_ALPHA_WEBGL = 37441,
CONTEXT_LOST_WEBGL = 37442,
UNPACK_COLORSPACE_CONVERSION_WEBGL = 37443,
BROWSER_DEFAULT_WEBGL = 37444,
COMPRESSED_RGB_S3TC_DXT1_EXT = 33776,
COMPRESSED_RGBA_S3TC_DXT1_EXT = 33777,
COMPRESSED_RGBA_S3TC_DXT3_EXT = 33778,
COMPRESSED_RGBA_S3TC_DXT5_EXT = 33779,
COMPRESSED_RGB_PVRTC_4BPPV1_IMG = 35840,
COMPRESSED_RGB_PVRTC_2BPPV1_IMG = 35841,
COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 35842,
COMPRESSED_RGBA_PVRTC_2BPPV1_IMG = 35843,
COMPRESSED_RGBA_ASTC_4x4_WEBGL = 37808,
COMPRESSED_RGB_ETC1_WEBGL = 36196,
COMPRESSED_RGBA_BPTC_UNORM = 36492,
HALF_FLOAT_OES = 36193,
DOUBLE = 5130,
READ_BUFFER = 3074,
UNPACK_ROW_LENGTH = 3314,
UNPACK_SKIP_ROWS = 3315,
UNPACK_SKIP_PIXELS = 3316,
PACK_ROW_LENGTH = 3330,
PACK_SKIP_ROWS = 3331,
PACK_SKIP_PIXELS = 3332,
COLOR = 6144,
DEPTH = 6145,
STENCIL = 6146,
RED = 6403,
RGB8 = 32849,
RGBA8 = 32856,
RGB10_A2 = 32857,
TEXTURE_BINDING_3D = 32874,
UNPACK_SKIP_IMAGES = 32877,
UNPACK_IMAGE_HEIGHT = 32878,
TEXTURE_3D = 32879,
TEXTURE_WRAP_R = 32882,
MAX_3D_TEXTURE_SIZE = 32883,
UNSIGNED_INT_2_10_10_10_REV = 33640,
MAX_ELEMENTS_VERTICES = 33000,
MAX_ELEMENTS_INDICES = 33001,
TEXTURE_MIN_LOD = 33082,
TEXTURE_MAX_LOD = 33083,
TEXTURE_BASE_LEVEL = 33084,
TEXTURE_MAX_LEVEL = 33085,
MIN = 32775,
MAX = 32776,
DEPTH_COMPONENT24 = 33190,
MAX_TEXTURE_LOD_BIAS = 34045,
TEXTURE_COMPARE_MODE = 34892,
TEXTURE_COMPARE_FUNC = 34893,
CURRENT_QUERY = 34917,
QUERY_RESULT = 34918,
QUERY_RESULT_AVAILABLE = 34919,
STREAM_READ = 35041,
STREAM_COPY = 35042,
STATIC_READ = 35045,
STATIC_COPY = 35046,
DYNAMIC_READ = 35049,
DYNAMIC_COPY = 35050,
MAX_DRAW_BUFFERS = 34852,
DRAW_BUFFER0 = 34853,
DRAW_BUFFER1 = 34854,
DRAW_BUFFER2 = 34855,
DRAW_BUFFER3 = 34856,
DRAW_BUFFER4 = 34857,
DRAW_BUFFER5 = 34858,
DRAW_BUFFER6 = 34859,
DRAW_BUFFER7 = 34860,
DRAW_BUFFER8 = 34861,
DRAW_BUFFER9 = 34862,
DRAW_BUFFER10 = 34863,
DRAW_BUFFER11 = 34864,
DRAW_BUFFER12 = 34865,
DRAW_BUFFER13 = 34866,
DRAW_BUFFER14 = 34867,
DRAW_BUFFER15 = 34868,
MAX_FRAGMENT_UNIFORM_COMPONENTS = 35657,
MAX_VERTEX_UNIFORM_COMPONENTS = 35658,
SAMPLER_3D = 35679,
SAMPLER_2D_SHADOW = 35682,
FRAGMENT_SHADER_DERIVATIVE_HINT = 35723,
PIXEL_PACK_BUFFER = 35051,
PIXEL_UNPACK_BUFFER = 35052,
PIXEL_PACK_BUFFER_BINDING = 35053,
PIXEL_UNPACK_BUFFER_BINDING = 35055,
FLOAT_MAT2x3 = 35685,
FLOAT_MAT2x4 = 35686,
FLOAT_MAT3x2 = 35687,
FLOAT_MAT3x4 = 35688,
FLOAT_MAT4x2 = 35689,
FLOAT_MAT4x3 = 35690,
SRGB = 35904,
SRGB8 = 35905,
SRGB8_ALPHA8 = 35907,
COMPARE_REF_TO_TEXTURE = 34894,
RGBA32F = 34836,
RGB32F = 34837,
RGBA16F = 34842,
RGB16F = 34843,
VERTEX_ATTRIB_ARRAY_INTEGER = 35069,
MAX_ARRAY_TEXTURE_LAYERS = 35071,
MIN_PROGRAM_TEXEL_OFFSET = 35076,
MAX_PROGRAM_TEXEL_OFFSET = 35077,
MAX_VARYING_COMPONENTS = 35659,
TEXTURE_2D_ARRAY = 35866,
TEXTURE_BINDING_2D_ARRAY = 35869,
R11F_G11F_B10F = 35898,
UNSIGNED_INT_10F_11F_11F_REV = 35899,
RGB9_E5 = 35901,
UNSIGNED_INT_5_9_9_9_REV = 35902,
TRANSFORM_FEEDBACK_BUFFER_MODE = 35967,
MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 35968,
TRANSFORM_FEEDBACK_VARYINGS = 35971,
TRANSFORM_FEEDBACK_BUFFER_START = 35972,
TRANSFORM_FEEDBACK_BUFFER_SIZE = 35973,
TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 35976,
RASTERIZER_DISCARD = 35977,
MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 35978,
MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 35979,
INTERLEAVED_ATTRIBS = 35980,
SEPARATE_ATTRIBS = 35981,
TRANSFORM_FEEDBACK_BUFFER = 35982,
TRANSFORM_FEEDBACK_BUFFER_BINDING = 35983,
RGBA32UI = 36208,
RGB32UI = 36209,
RGBA16UI = 36214,
RGB16UI = 36215,
RGBA8UI = 36220,
RGB8UI = 36221,
RGBA32I = 36226,
RGB32I = 36227,
RGBA16I = 36232,
RGB16I = 36233,
RGBA8I = 36238,
RGB8I = 36239,
RED_INTEGER = 36244,
RGB_INTEGER = 36248,
RGBA_INTEGER = 36249,
SAMPLER_2D_ARRAY = 36289,
SAMPLER_2D_ARRAY_SHADOW = 36292,
SAMPLER_CUBE_SHADOW = 36293,
UNSIGNED_INT_VEC2 = 36294,
UNSIGNED_INT_VEC3 = 36295,
UNSIGNED_INT_VEC4 = 36296,
INT_SAMPLER_2D = 36298,
INT_SAMPLER_3D = 36299,
INT_SAMPLER_CUBE = 36300,
INT_SAMPLER_2D_ARRAY = 36303,
UNSIGNED_INT_SAMPLER_2D = 36306,
UNSIGNED_INT_SAMPLER_3D = 36307,
UNSIGNED_INT_SAMPLER_CUBE = 36308,
UNSIGNED_INT_SAMPLER_2D_ARRAY = 36311,
DEPTH_COMPONENT32F = 36012,
DEPTH32F_STENCIL8 = 36013,
FLOAT_32_UNSIGNED_INT_24_8_REV = 36269,
FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 33296,
FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 33297,
FRAMEBUFFER_ATTACHMENT_RED_SIZE = 33298,
FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 33299,
FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 33300,
FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 33301,
FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 33302,
FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 33303,
FRAMEBUFFER_DEFAULT = 33304,
UNSIGNED_INT_24_8 = 34042,
DEPTH24_STENCIL8 = 35056,
UNSIGNED_NORMALIZED = 35863,
DRAW_FRAMEBUFFER_BINDING = 36006,
READ_FRAMEBUFFER = 36008,
DRAW_FRAMEBUFFER = 36009,
READ_FRAMEBUFFER_BINDING = 36010,
RENDERBUFFER_SAMPLES = 36011,
FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 36052,
MAX_COLOR_ATTACHMENTS = 36063,
COLOR_ATTACHMENT1 = 36065,
COLOR_ATTACHMENT2 = 36066,
COLOR_ATTACHMENT3 = 36067,
COLOR_ATTACHMENT4 = 36068,
COLOR_ATTACHMENT5 = 36069,
COLOR_ATTACHMENT6 = 36070,
COLOR_ATTACHMENT7 = 36071,
COLOR_ATTACHMENT8 = 36072,
COLOR_ATTACHMENT9 = 36073,
COLOR_ATTACHMENT10 = 36074,
COLOR_ATTACHMENT11 = 36075,
COLOR_ATTACHMENT12 = 36076,
COLOR_ATTACHMENT13 = 36077,
COLOR_ATTACHMENT14 = 36078,
COLOR_ATTACHMENT15 = 36079,
FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 36182,
MAX_SAMPLES = 36183,
HALF_FLOAT = 5131,
RG = 33319,
RG_INTEGER = 33320,
R8 = 33321,
RG8 = 33323,
R16F = 33325,
R32F = 33326,
RG16F = 33327,
RG32F = 33328,
R8I = 33329,
R8UI = 33330,
R16I = 33331,
R16UI = 33332,
R32I = 33333,
R32UI = 33334,
RG8I = 33335,
RG8UI = 33336,
RG16I = 33337,
RG16UI = 33338,
RG32I = 33339,
RG32UI = 33340,
VERTEX_ARRAY_BINDING = 34229,
R8_SNORM = 36756,
RG8_SNORM = 36757,
RGB8_SNORM = 36758,
RGBA8_SNORM = 36759,
SIGNED_NORMALIZED = 36764,
COPY_READ_BUFFER = 36662,
COPY_WRITE_BUFFER = 36663,
COPY_READ_BUFFER_BINDING = 36662,
COPY_WRITE_BUFFER_BINDING = 36663,
UNIFORM_BUFFER = 35345,
UNIFORM_BUFFER_BINDING = 35368,
UNIFORM_BUFFER_START = 35369,
UNIFORM_BUFFER_SIZE = 35370,
MAX_VERTEX_UNIFORM_BLOCKS = 35371,
MAX_FRAGMENT_UNIFORM_BLOCKS = 35373,
MAX_COMBINED_UNIFORM_BLOCKS = 35374,
MAX_UNIFORM_BUFFER_BINDINGS = 35375,
MAX_UNIFORM_BLOCK_SIZE = 35376,
MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 35377,
MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 35379,
UNIFORM_BUFFER_OFFSET_ALIGNMENT = 35380,
ACTIVE_UNIFORM_BLOCKS = 35382,
UNIFORM_TYPE = 35383,
UNIFORM_SIZE = 35384,
UNIFORM_BLOCK_INDEX = 35386,
UNIFORM_OFFSET = 35387,
UNIFORM_ARRAY_STRIDE = 35388,
UNIFORM_MATRIX_STRIDE = 35389,
UNIFORM_IS_ROW_MAJOR = 35390,
UNIFORM_BLOCK_BINDING = 35391,
UNIFORM_BLOCK_DATA_SIZE = 35392,
UNIFORM_BLOCK_ACTIVE_UNIFORMS = 35394,
UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 35395,
UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 35396,
UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 35398,
INVALID_INDEX = 4294967295,
MAX_VERTEX_OUTPUT_COMPONENTS = 37154,
MAX_FRAGMENT_INPUT_COMPONENTS = 37157,
MAX_SERVER_WAIT_TIMEOUT = 37137,
OBJECT_TYPE = 37138,
SYNC_CONDITION = 37139,
SYNC_STATUS = 37140,
SYNC_FLAGS = 37141,
SYNC_FENCE = 37142,
SYNC_GPU_COMMANDS_COMPLETE = 37143,
UNSIGNALED = 37144,
SIGNALED = 37145,
ALREADY_SIGNALED = 37146,
TIMEOUT_EXPIRED = 37147,
CONDITION_SATISFIED = 37148,
WAIT_FAILED = 37149,
SYNC_FLUSH_COMMANDS_BIT = 1,
VERTEX_ATTRIB_ARRAY_DIVISOR = 35070,
ANY_SAMPLES_PASSED = 35887,
ANY_SAMPLES_PASSED_CONSERVATIVE = 36202,
SAMPLER_BINDING = 35097,
RGB10_A2UI = 36975,
INT_2_10_10_10_REV = 36255,
TRANSFORM_FEEDBACK = 36386,
TRANSFORM_FEEDBACK_PAUSED = 36387,
TRANSFORM_FEEDBACK_ACTIVE = 36388,
TRANSFORM_FEEDBACK_BINDING = 36389,
COMPRESSED_R11_EAC = 37488,
COMPRESSED_SIGNED_R11_EAC = 37489,
COMPRESSED_RG11_EAC = 37490,
COMPRESSED_SIGNED_RG11_EAC = 37491,
COMPRESSED_RGB8_ETC2 = 37492,
COMPRESSED_SRGB8_ETC2 = 37493,
COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 37494,
COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 37495,
COMPRESSED_RGBA8_ETC2_EAC = 37496,
COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 37497,
TEXTURE_IMMUTABLE_FORMAT = 37167,
MAX_ELEMENT_INDEX = 36203,
TEXTURE_IMMUTABLE_LEVELS = 33503,
MAX_TEXTURE_MAX_ANISOTROPY_EXT = 34047
}
/**
* A {@link TerrainProvider} that produces terrain geometry by tessellating height maps
retrieved from Elevation Tiles of an an ArcGIS ImageService.
* @example
* const terrainProvider = new Cesium.ArcGISTiledElevationTerrainProvider({
url : 'https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer',
token : 'KED1aF_I4UzXOHy3BnhwyBHU4l5oY6rO6walkmHoYqGp4XyIWUd5YZUC1ZrLAzvV40pR6gBXQayh0eFA8m6vPg..'
});
viewer.terrainProvider = terrainProvider;
* @param options - Object with the following properties:
* @param options.url - The URL of the ArcGIS ImageServer service.
* @param [options.token] - The authorization token to use to connect to the service.
* @param [options.ellipsoid] - The ellipsoid. If the tilingScheme is specified,
this parameter is ignored and the tiling scheme's ellipsoid is used instead.
If neither parameter is specified, the WGS84 ellipsoid is used.
*/
export class ArcGISTiledElevationTerrainProvider {
constructor(options: { url: Resource | string | Promise<Resource> | Promise<string>; token?: string; ellipsoid?: Ellipsoid })
/**
* Gets an event that is raised when the terrain provider encounters an asynchronous error. By subscribing
to the event, you will be notified of the error and can potentially recover from it. Event listeners
are passed an instance of {@link TileProviderError}.
*/
readonly errorEvent: Event
/**
* Gets the credit to display when this terrain provider is active. Typically this is used to credit
the source of the terrain. This function should not be called before {@link ArcGISTiledElevationTerrainProvider#ready} returns true.
*/
readonly credit: Credit
/**
* Gets the tiling scheme used by this provider. This function should
not be called before {@link ArcGISTiledElevationTerrainProvider#ready} returns true.
*/
readonly tilingScheme: GeographicTilingScheme
/**
* Gets a value indicating whether or not the provider is ready for use.
*/
readonly ready: boolean
/**
* Gets a promise that resolves to true when the provider is ready for use.
*/
readonly readyPromise: Promise<boolean>
/**
* Gets a value indicating whether or not the provider includes a water mask. The water mask
indicates which areas of the globe are water rather than land, so they can be rendered
as a reflective surface with animated waves. This function should not be
called before {@link ArcGISTiledElevationTerrainProvider#ready} returns true.
*/
readonly hasWaterMask: boolean
/**
* Gets a value indicating whether or not the requested tiles include vertex normals.
This function should not be called before {@link ArcGISTiledElevationTerrainProvider#ready} returns true.
*/
readonly hasVertexNormals: boolean
/**
* Gets an object that can be used to determine availability of terrain from this provider, such as
at points and in rectangles. This function should not be called before
{@link TerrainProvider#ready} returns true. This property may be undefined if availability
information is not available.
*/
readonly availability: TileAvailability
/**
* Requests the geometry for a given tile. This function should not be called before
{@link ArcGISTiledElevationTerrainProvider#ready} returns true. The result includes terrain
data and indicates that all child tiles are available.
* @param x - The X coordinate of the tile for which to request geometry.
* @param y - The Y coordinate of the tile for which to request geometry.
* @param level - The level of the tile for which to request geometry.
* @param [request] - The request object. Intended for internal use only.
* @returns A promise for the requested geometry. If this method
returns undefined instead of a promise, it is an indication that too many requests are already
pending and the request will be retried later.
*/
requestTileGeometry(x: number, y: number, level: number, request?: Request): Promise<TerrainData> | undefined
/**
* Gets the maximum geometric error allowed in a tile at a given level.
* @param level - The tile level for which to get the maximum geometric error.
* @returns The maximum geometric error.
*/
getLevelMaximumGeometricError(level: number): number
/**
* Determines whether data for a tile is available to be loaded.
* @param x - The X coordinate of the tile for which to request geometry.
* @param y - The Y coordinate of the tile for which to request geometry.
* @param level - The level of the tile for which to request geometry.
* @returns Undefined if not supported, otherwise true or false.
*/
getTileDataAvailable(x: number, y: number, level: number): boolean | undefined
/**
* Makes sure we load availability data for a tile
* @param x - The X coordinate of the tile for which to request geometry.
* @param y - The Y coordinate of the tile for which to request geometry.
* @param level - The level of the tile for which to request geometry.
* @returns This provider does not support loading availability.
*/
loadTileDataAvailability(x: number, y: number, level: number): undefined
}
/**
* ArcType defines the path that should be taken connecting vertices.
*/
export enum ArcType {
/**
* Straight line that does not conform to the surface of the ellipsoid.
*/
NONE = 0,
/**
* Follow geodesic path.
*/
GEODESIC = 1,
/**
* Follow rhumb or loxodrome path.
*/
RHUMB = 2
}
/**
* A collection of key-value pairs that is stored as a hash for easy
lookup but also provides an array for fast iteration.
*/
export class AssociativeArray {
constructor()
/**
* Gets the number of items in the collection.
*/
length: number
/**
* Gets an unordered array of all values in the collection.
This is a live array that will automatically reflect the values in the collection,
it should not be modified directly.
*/
values: any[]
/**
* Determines if the provided key is in the array.
* @param key - The key to check.
* @returns <code>true</code> if the key is in the array, <code>false</code> otherwise.
*/
contains(key: string | number): boolean
/**
* Associates the provided key with the provided value. If the key already
exists, it is overwritten with the new value.
* @param key - A unique identifier.
* @param value - The value to associate with the provided key.
*/
set(key: string | number, value: any): void
/**
* Retrieves the value associated with the provided key.
* @param key - The key whose value is to be retrieved.
* @returns The associated value, or undefined if the key does not exist in the collection.
*/
get(key: string | number): any
/**
* Removes a key-value pair from the collection.
* @param key - The key to be removed.
* @returns True if it was removed, false if the key was not in the collection.
*/
remove(key: string | number): boolean
/**
* Clears the collection.
*/
removeAll(): void
}
/**
* Creates an instance of an AxisAlignedBoundingBox from the minimum and maximum points along the x, y, and z axes.
* @param [minimum = Cartesian3.ZERO] - The minimum point along the x, y, and z axes.
* @param [maximum = Cartesian3.ZERO] - The maximum point along the x, y, and z axes.
* @param [center] - The center of the box; automatically computed if not supplied.
*/
export class AxisAlignedBoundingBox {
constructor(minimum?: Cartesian3, maximum?: Cartesian3, center?: Cartesian3)
/**
* The minimum point defining the bounding box.
*/
minimum: Cartesian3
/**
* The maximum point defining the bounding box.
*/
maximum: Cartesian3
/**
* The center point of the bounding box.
*/
center: Cartesian3
/**
* Creates an instance of an AxisAlignedBoundingBox from its corners.
* @example
* // Compute an axis aligned bounding box from the two corners.
const box = Cesium.AxisAlignedBoundingBox.fromCorners(new Cesium.Cartesian3(-1, -1, -1), new Cesium.Cartesian3(1, 1, 1));
* @param minimum - The minimum point along the x, y, and z axes.
* @param maximum - The maximum point along the x, y, and z axes.
* @param [result] - The object onto which to store the result.
* @returns The modified result parameter or a new AxisAlignedBoundingBox instance if one was not provided.
*/
static fromCorners(minimum: Cartesian3, maximum: Cartesian3, result?: AxisAlignedBoundingBox): AxisAlignedBoundingBox
/**
* Computes an instance of an AxisAlignedBoundingBox. The box is determined by
finding the points spaced the farthest apart on the x, y, and z axes.
* @example
* // Compute an axis aligned bounding box enclosing two points.
const box = Cesium.AxisAlignedBoundingBox.fromPoints([new Cesium.Cartesian3(2, 0, 0), new Cesium.Cartesian3(-2, 0, 0)]);
* @param positions - List of points that the bounding box will enclose. Each point must have a <code>x</code>, <code>y</code>, and <code>z</code> properties.
* @param [result] - The object onto which to store the result.
* @returns The modified result parameter or a new AxisAlignedBoundingBox instance if one was not provided.
*/
static fromPoints(positions: Cartesian3[], result?: AxisAlignedBoundingBox): AxisAlignedBoundingBox
/**
* Duplicates a AxisAlignedBoundingBox instance.
* @param box - The bounding box to duplicate.
* @param [result] - The object onto which to store the result.
* @returns The modified result parameter or a new AxisAlignedBoundingBox instance if none was provided. (Returns undefined if box is undefined)
*/
static clone(box: AxisAlignedBoundingBox, result?: AxisAlignedBoundingBox): AxisAlignedBoundingBox
/**
* Compares the provided AxisAlignedBoundingBox componentwise and returns
<code>true</code> if they are equal, <code>false</code> otherwise.
* @param [left] - The first AxisAlignedBoundingBox.
* @param [right] - The second AxisAlignedBoundingBox.
* @returns <code>true</code> if left and right are equal, <code>false</code> otherwise.
*/
static equals(left?: AxisAlignedBoundingBox, right?: AxisAlignedBoundingBox): boolean
/**
* Determines which side of a plane a box is located.
* @param box - The bounding box to test.
* @param plane - The plane to test against.
* @returns {@link Intersect.INSIDE} if the entire box is on the side of the plane
the normal is pointing, {@link Intersect.OUTSIDE} if the entire box is
on the opposite side, and {@link Intersect.INTERSECTING} if the box
intersects the plane.
*/
static intersectPlane(box: AxisAlignedBoundingBox, plane: Plane): Intersect
/**
* Duplicates this AxisAlignedBoundingBox instance.
* @param [result] - The object onto which to store the result.
* @returns The modified result parameter or a new AxisAlignedBoundingBox instance if one was not provided.
*/
clone(result?: AxisAlignedBoundingBox): AxisAlignedBoundingBox
/**
* Determines which side of a plane this box is located.
* @param plane - The plane to test against.
* @returns {@link Intersect.INSIDE} if the entire box is on the side of the plane
the normal is pointing, {@link Intersect.OUTSIDE} if the entire box is
on the opposite side, and {@link Intersect.INTERSECTING} if the box
intersects the plane.
*/
intersectPlane(plane: Plane): Intersect
/**
* Compares this AxisAlignedBoundingBox against the provided AxisAlignedBoundingBox componentwise and returns
<code>true</code> if they are equal, <code>false</code> otherwise.
* @param [right] - The right hand side AxisAlignedBoundingBox.
* @returns <code>true</code> if they are equal, <code>false</code> otherwise.
*/
equals(right?: AxisAlignedBoundingBox): boolean
}
/**
* Computes the barycentric coordinates for a point with respect to a triangle.
* @example
* // Returns Cartesian3.UNIT_X
const p = new Cesium.Cartesian3(-1.0, 0.0, 0.0);
const b = Cesium.barycentricCoordinates(p,
new Cesium.Cartesian3(-1.0, 0.0, 0.0),
new Cesium.Cartesian3( 1.0, 0.0, 0.0),
new Cesium.Cartesian3( 0.0, 1.0, 1.0));
* @param point - The point to test.
* @param p0 - The first point of the triangle, corresponding to the barycentric x-axis.
* @param p1 - The second point of the triangle, corresponding to the barycentric y-axis.
* @param p2 - The third point of the triangle, corresponding to the barycentric z-axis.
* @param [result] - The object onto which to store the result.
* @returns The modified result parameter or a new Cartesian3 instance if one was not provided. If the triangle is degenerate the function will return undefined.
*/
export function barycentricCoordinates(
point: Cartesian2 | Cartesian3,
p0: Cartesian2 | Cartesian3,
p1: Cartesian2 | Cartesian3,
p2: Cartesian2 | Cartesian3,
result?: Cartesian3
): Cartesian3 | undefined
/**
* Finds an item in a sorted array.
* @example
* // Create a comparator function to search through an array of numbers.
function comparator(a, b) {
return a - b;
};
const numbers = [0, 2, 4, 6, 8];
const index = Cesium.binarySearch(numbers, 6, comparator); // 3
* @param array - The sorted array to search.
* @param itemToFind - The item to find in the array.
* @param comparator - The function to use to compare the item to
elements in the array.
* @returns The index of <code>itemToFind</code> in the array, if it exists. If <code>itemToFind</code>
does not exist, the return value is a negative number which is the bitwise complement (~)
of the index before which the itemToFind should be inserted in order to maintain the
sorted order of the array.
*/
export function binarySearch(array: any[], itemToFind: any, comparator: binarySearchComparator): number
/**
* A function used to compare two items while performing a binary search.
* @example
* function compareNumbers(a, b) {
return a - b;
}
* @param a - An item in the array.
* @param b - The item being searched for.
*/
export type binarySearchComparator = (a: any, b: any) => number
/**
* Provides geocoding through Bing Maps.
* @param options - Object with the following properties:
* @param options.key - A key to use with the Bing Maps geocoding service
* @param [options.culture] - A Bing Maps {@link https://docs.microsoft.com/en-us/bingmaps/rest-services/common-parameters-and-types/supported-culture-codes|Culture Code} to return results in a specific culture and language.
*/
export class BingMapsGeocoderService {
constructor(options: { key: string; culture?: string })
/**
* The URL endpoint for the Bing geocoder service
*/
readonly url: string
/**
* The key for the Bing geocoder service
*/
readonly key: string
/**
* @param query - The query to be sent to the geocoder service
*/
geocode(query: string): Promise<GeocoderService.Result[]>
}
/**
* A bounding rectangle given by a corner, width and height.
* @param [x = 0.0] - The x coordinate of the rectangle.
* @param [y = 0.0] - The y coordinate of the rectangle.
* @param [width = 0.0] - The width of the rectangle.
* @param [height = 0.0] - The height of the rectangle.
*/
export class BoundingRectangle {
constructor(x?: number, y?: number, width?: number, height?: number)
/**
* The x coordinate of the rectangle.
*/
x: number
/**
* The y coordinate of the rectangle.
*/
y: number
/**
* The width of the rectangle.
*/
width: number
/**
* The height of the rectangle.
*/
height: number
/**
* The number of elements used to pack the object into an array.
*/
static packedLength: number
/**
* Stores the provided instance into the provided array.
* @param value - The value to pack.
* @param array - The array to pack into.
* @param [startingIndex = 0] - The index into the array at which to start packing the elements.
* @returns The array that was packed into
*/
static pack(value: BoundingRectangle, array: number[], startingIndex?: number): number[]
/**
* Retrieves an instance from a packed array.
* @param array - The packed array.
* @param [startingIndex = 0] - The starting index of the element to be unpacked.
* @param [result] - The object into which to store the result.
* @returns The modified result parameter or a new BoundingRectangle instance if one was not provided.
*/
static unpack(array: number[], startingIndex?: number, result?: BoundingRectangle): BoundingRectangle
/**
* Computes a bounding rectangle enclosing the list of 2D points.
The rectangle is oriented with the corner at the bottom left.
* @param positions - List of points that the bounding rectangle will enclose. Each point must have <code>x</code> and <code>y</code> properties.
* @param [result] - The object onto which to store the result.
* @returns The modified result parameter or a new BoundingRectangle instance if one was not provided.
*/
static fromPoints(positions: Cartesian2[], result?: BoundingRectangle): BoundingRectangle
/**
* Computes a bounding rectangle from a rectangle.
* @param rectangle - The valid rectangle used to create a bounding rectangle.
* @param [projection = GeographicProjection] - The projection used to project the rectangle into 2D.
* @param [result] - The object onto which to store the result.
* @returns The modified result parameter or a new BoundingRectangle instance if one was not provided.
*/
static fromRectangle(rectangle: Rectangle, projection?: any, result?: BoundingRectangle): BoundingRectangle
/**
* Duplicates a BoundingRectangle instance.
* @param rectangle - The bounding rectangle to duplicate.
* @param [result] - The object onto which to store the result.
* @returns The modified result parameter or a new BoundingRectangle instance if one was not provided. (Returns undefined if rectangle is undefined)
*/
static clone(rectangle: BoundingRectangle, result?: BoundingRectangle): BoundingRectangle
/**
* Computes a bounding rectangle that is the union of the left and right bounding rectangles.
* @param left - A rectangle to enclose in bounding rectangle.
* @param right - A rectangle to enclose in a bounding rectangle.
* @param [result] - The object onto which to store the result.
* @returns The modified result parameter or a new BoundingRectangle instance if one was not provided.
*/
static union(left: BoundingRectangle, right: BoundingRectangle, result?: BoundingRectangle): BoundingRectangle
/**
* Computes a bounding rectangle by enlarging the provided rectangle until it contains the provided point.
* @param rectangle - A rectangle to expand.
* @param point - A point to enclose in a bounding rectangle.
* @param [result] - The object onto which to store the result.
* @returns The modified result parameter or a new BoundingRectangle instance if one was not provided.
*/
static expand(rectangle: BoundingRectangle, point: Cartesian2, result?: BoundingRectangle): BoundingRectangle
/**
* Determines if two rectangles intersect.
* @param left - A rectangle to check for intersection.
* @param right - The other rectangle to check for intersection.
* @returns <code>Intersect.INTERSECTING</code> if the rectangles intersect, <code>Intersect.OUTSIDE</code> otherwise.
*/
static intersect(left: BoundingRectangle, right: BoundingRectangle): Intersect
/**
* Compares the provided BoundingRectangles componentwise and returns
<code>true</code> if they are equal, <code>false</code> otherwise.
* @param [left] - The first BoundingRectangle.
* @param [right] - The second BoundingRectangle.
* @returns <code>true</code> if left and right are equal, <code>false</code> otherwise.
*/
static equals(left?: BoundingRectangle, right?: BoundingRectangle): boolean
/**
* Duplicates this BoundingRectangle instance.
* @param [result] - The object onto which to store the result.
* @returns The modified result parameter or a new BoundingRectangle instance if one was not provided.
*/
clone(result?: BoundingRectangle): BoundingRectangle
/**
* Determines if this rectangle intersects with another.
* @param right - A rectangle to check for intersection.
* @returns <code>Intersect.INTERSECTING</code> if the rectangles intersect, <code>Intersect.OUTSIDE</code> otherwise.
*/
intersect(right: BoundingRectangle): Intersect
/**
* Compares this BoundingRectangle against the provided BoundingRectangle componentwise and returns
<code>true</code> if they are equal, <code>false</code> otherwise.
* @param [right] - The right hand side BoundingRectangle.
* @returns <code>true</code> if they are equal, <code>false</code> otherwise.
*/
equals(right?: BoundingRectangle): boolean
}
/**
* A bounding sphere with a center and a radius.
* @param [center = Cartesian3.ZERO] - The center of the bounding sphere.
* @param [radius = 0.0] - The radius of the bounding sphere.
*/
export class BoundingSphere {
constructor(center?: Cartesian3, radius?: number)
/**
* The center point of the sphere.
*/
center: Cartesian3
/**
* The radius of the sphere.
*/
radius: number
/**
* Computes a tight-fitting bounding sphere enclosing a list of 3D Cartesian points.
The bounding sphere is computed by running two algorithms, a naive algorithm and
Ritter's algorithm. The smaller of the two spheres is used to ensure a tight fit.
* @param [positions] - An array of points that the bounding sphere will enclose. Each point must have <code>x</code>, <code>y</code>, and <code>z</code> properties.
* @param [result] - The object onto which to store the result.
* @returns The modified result parameter or a new BoundingSphere instance if one was not provided.
*/
static fromPoints(positions?: Cartesian3[], result?: BoundingSphere): BoundingSphere
/**
* Computes a bounding sphere from a rectangle projected in 2D.
* @param [rectangle] - The rectangle around which to create a bounding sphere.
* @param [projection = GeographicProjection] - The projection used to project the rectangle into 2D.
* @param [result] - The object onto which to store the result.
* @returns The modified result parameter or a new BoundingSphere instance if none was provided.
*/
static fromRectangle2D(rectangle?: Rectangle, projection?: any, result?: BoundingSphere): BoundingSphere
/**
* Computes a bounding sphere from a rectangle projected in 2D. The bounding sphere accounts for the
object's minimum and maximum heights over the rectangle.
* @param [rectangle] - The rectangle around which to create a bounding sphere.
* @param [projection = GeographicProjection] - The projection used to project the rectangle into 2D.
* @param [minimumHeight = 0.0] - The minimum height over the rectangle.
* @param [maximumHeight = 0.0] - The maximum height over the rectangle.
* @param [result] - The object onto which to store the result.
* @returns The modified result parameter or a new BoundingSphere instance if none was provided.
*/
static fromRectangleWithHeights2D(
rectangle?: Rectangle,
projection?: any,
minimumHeight?: number,
maximumHeight?: number,
result?: BoundingSphere
): BoundingSphere
/**
* Computes a bounding sphere from a rectangle in 3D. The bounding sphere is created using a subsample of points
on the ellipsoid and contained in the rectangle. It may not be accurate for all rectangles on all types of ellipsoids.
* @param [rectangle] - The valid rectangle used to create a bounding sphere.
* @param [ellipsoid = Ellipsoid.WGS84] - The ellipsoid used to determine positions of the rectangle.
* @param [surfaceHeight = 0.0] - The height above the surface of the ellipsoid.
* @param [result] - The object onto which to store the result.
* @returns The modified result parameter or a new BoundingSphere instance if none was provided.
*/
static fromRectangle3D(rectangle?: Rectangle, ellipsoid?: Ellipsoid, surfaceHeight?: number, result?: BoundingSphere): BoundingSphere
/**
* Computes a tight-fitting bounding sphere enclosing a list of 3D points, where the points are
stored in a flat array in X, Y, Z, order. The bounding sphere is computed by running two
algorithms, a naive algorithm and Ritter's algorithm. The smaller of the two spheres is used to
ensure a tight fit.
* @example
* // Compute the bounding sphere from 3 positions, each specified relative to a center.
// In addition to the X,