Cesium JS API
AppearanceArcGisMapServerImageryProviderArcGISTiledElevationTerrainProviderArcTypeAssociativeArrayAxisAxisAlignedBoundingBoxbarycentricCoordinatesBillboardBillboardCollectionBillboardGraphicsBillboardVisualizerbinarySearchbinarySearchComparatorBingMapsGeocoderServiceBingMapsImageryProviderBingMapsStyleBlendEquationBlendFunctionBlendingStateBlendOptionBoundingRectangleBoundingSphereBoxEmitterBoxGeometryBoxGeometryUpdaterBoxGraphicsBoxOutlineGeometrybuildModuleUrlCallbackPropertyCameraCameraEventAggregatorCameraEventTypeCartesian2Cartesian3Cartesian4CartographicCartographicGeocoderServiceCatmullRomSplineCesium3DTileCesium3DTileColorBlendModeCesium3DTileContentCesium3DTileFeatureCesium3DTilePointFeatureCesium3DTilesetCesium3DTilesetGraphicsCesium3DTilesetVisualizerCesium3DTileStyleCesium3DTilesVoxelProviderCesiumTerrainProviderCesiumWidgetCheckerboardMaterialPropertyCircleEmitterCircleGeometryCircleOutlineGeometryClassificationPrimitiveClassificationTypeClippingPlaneClippingPlaneCollectionClockClockRangeClockStepcloneCloudCollectionCloudTypeColorColorBlendModeColorGeometryInstanceAttributeColorMaterialPropertycombineComponentDatatypeCompositeEntityCollectionCompositeMaterialPropertyCompositePositionPropertyCompositePropertyCompressedTextureBufferConditionsExpressionConeEmitterConstantPositionPropertyConstantPropertyConstantSplineContextOptionsCoplanarPolygonGeometryCoplanarPolygonOutlineGeometryCornerTypeCorridorGeometryCorridorGeometryUpdaterCorridorGraphicsCorridorOutlineGeometrycreateElevationBandMaterialcreateElevationBandMaterialBandcreateElevationBandMaterialEntrycreateGuidcreateOsmBuildingscreateTangentSpaceDebugPrimitivecreateWorldImagerycreateWorldTerrainCreditCreditDisplayCubicRealPolynomialCullFaceCullingVolumeCumulusCloudCustomDataSourceCustomHeightmapTerrainProviderCustomShaderCustomShaderModeCustomShaderTranslucencyModeCylinderGeometryCylinderGeometryUpdaterCylinderGraphicsCylinderOutlineGeometryCzmlDataSourceDataSourceDataSourceClockDataSourceCollectionDataSourceDisplayDebugAppearanceDebugCameraPrimitiveDebugModelMatrixPrimitiveDefaultProxydefaultValuedefinedDepthFunctiondestroyObjectDeveloperErrorDirectionalLightDirectionUpDiscardEmptyTileImagePolicyDiscardMissingTileImagePolicyDistanceDisplayConditionDistanceDisplayConditionGeometryInstanceAttributeEasingFunctionEllipseGeometryEllipseGeometryUpdaterEllipseGraphicsEllipseOutlineGeometryEllipsoidEllipsoidGeodesicEllipsoidGeometryEllipsoidGeometryUpdaterEllipsoidGraphicsEllipsoidOutlineGeometryEllipsoidRhumbLineEllipsoidSurfaceAppearanceEllipsoidTangentPlaneEllipsoidTerrainProviderEntityEntityClusterEntityCollectionEntityViewEventEventHelperexcludesReverseAxisexportKmlexportKmlModelCallbackexportKmlResultKmlexportKmlResultKmzExpressionExtrapolationTypeFeatureDetectionFogformatErrorFrameRateMonitorFrustumGeometryFrustumOutlineGeometryFullscreenGeocoderServiceGeocodeTypeGeographicProjectionGeographicTilingSchemeGeoJsonDataSourceGeometryGeometryAttributeGeometryAttributesGeometryFactoryGeometryInstanceGeometryInstanceAttributeGeometryPipelineGeometryUpdaterGeometryVisualizergetAbsoluteUrigetBaseUrigetExtensionFromUriGetFeatureInfoFormatgetFilenameFromUrigetImagePixelsgetTimestampGlobeGlobeTranslucencyGoogleEarthEnterpriseImageryProviderGoogleEarthEnterpriseMapsProviderGoogleEarthEnterpriseMetadataGoogleEarthEnterpriseTerrainDataGoogleEarthEnterpriseTerrainProviderGpxDataSourceGregorianDateGridImageryProviderGridMaterialPropertyGroundGeometryUpdaterGroundPolylineGeometryGroundPolylinePrimitiveGroundPrimitiveHeadingPitchRangeHeadingPitchRollHeadingPitchRollValuesHeightmapEncodingHeightmapTerrainDataHeightReferenceHermitePolynomialApproximationHermiteSplineHilbertOrderHorizontalOriginI3SDataProviderI3SFeatureI3SFieldI3SGeometryI3SLayerI3SNodeImageBasedLightingImageMaterialPropertyImageryLayerImageryLayerCollectionImageryLayerFeatureInfoImageryProviderImageryTypesincludesReverseAxisIndexDatatypeIntersectIntersections2DIntersectionTestsIntervalIonIonGeocoderServiceIonImageryProviderIonResourceIonWorldImageryStyleisLeapYearIso8601JulianDateKeyboardEventModifierKmlCameraKmlDataSourceKmlFeatureDataKmlLookAtKmlTourKmlTourFlyToKmlTourWaitLabelLabelCollectionLabelGraphicsLabelStyleLabelVisualizerLagrangePolynomialApproximationLeapSecondLightLightingModelLinearApproximationLinearSplineMapboxImageryProviderMapboxStyleImageryProviderMapMode2DMapProjectionMaterialMaterialAppearanceMaterialSupportMaterialPropertyMathMatrix2Matrix3Matrix4mergeSortmergeSortComparatorMetadataClassMetadataClassPropertyMetadataComponentTypeMetadataEnumMetadataEnumValueMetadataSchemaMetadataTypeModelModelAnimationModelAnimationCollectionModelAnimationLoopModelFeatureModelGraphicsModelNodeModelVisualizerMoonMorphWeightSplineNearFarScalarNeverTileDiscardPolicyNodeTransformationPropertyobjectToQueryOccluderOpenCageGeocoderServiceOpenStreetMapImageryProviderOrientedBoundingBoxOrthographicFrustumOrthographicOffCenterFrustumPackableForInterpolationParticleParticleBurstParticleEmitterParticleSystemPathGraphicsPathVisualizerPeliasGeocoderServicePerInstanceColorAppearancePerspectiveFrustumPerspectiveOffCenterFrustumPinBuilderPixelDatatypePixelFormatPlanePlaneGeometryPlaneGeometryUpdaterPlaneGraphicsPlaneOutlineGeometryPointCloudShadingPointGraphicspointInsideTrianglePointPrimitivePointPrimitiveCollectionPointVisualizerPolygonGeometryPolygonGeometryUpdaterPolygonGraphicsPolygonHierarchyPolygonOutlineGeometryPolylinePolylineArrowMaterialPropertyPolylineCollectionPolylineColorAppearancePolylineDashMaterialPropertyPolylineGeometryPolylineGeometryUpdaterPolylineGlowMaterialPropertyPolylineGraphicsPolylineMaterialAppearancePolylineOutlineMaterialPropertyPolylineVisualizerPolylineVolumeGeometryPolylineVolumeGeometryUpdaterPolylineVolumeGraphicsPolylineVolumeOutlineGeometryPositionPropertyPositionPropertyArrayPostProcessStagePostProcessStageCollectionPostProcessStageCompositePostProcessStageLibraryPostProcessStageSampleModePrimitivePrimitiveCollectionPrimitiveTypePropertyPropertyArrayPropertyBagProxyQuadraticRealPolynomialQuantizedMeshTerrainDataQuarticRealPolynomialQuaternionQuaternionSplinequeryToObjectQueueRayreadyPromiseRectangleRectangleGeometryRectangleGeometryUpdaterRectangleGraphicsRectangleOutlineGeometryReferenceFrameReferencePropertyremoveExtensionRequestRequestErrorEventRequestSchedulerRequestStateRequestTypeResourceRuntimeErrorSampledPositionPropertySampledPropertysampleTerrainsampleTerrainMostDetailedSceneSceneModeSceneTransformsScreenSpaceCameraControllerScreenSpaceEventHandlerScreenSpaceEventTypeshaderDefinesshaderMaximumIntersectionsLengthshaderUniformsShadowMapShadowModeShowGeometryInstanceAttributeSimon1994PlanetaryPositionsSimplePolylineGeometrySingleTileImageryProviderSkyAtmosphereSkyBoxSphereEmitterSphereGeometrySphereOutlineGeometrySphericalSplineSplitDirectionStencilFunctionStencilOperationSteppedSplineStripeMaterialPropertyStripeOrientationStyleExpressionsubdivideArraySunSunLightTaskProcessorTerrainDataTerrainProviderTextureMagnificationFilterTextureMinificationFilterTextureUniformTileAvailabilityTileCoordinatesImageryProviderTileDiscardPolicyTileMapServiceImageryProviderTileProviderErrorTilingSchemeTimeDynamicImageryTimeDynamicPointCloudTimeIntervalTimeIntervalCollectionTimeIntervalCollectionPositionPropertyTimeIntervalCollectionPropertyTimeStandardTransformsTranslationRotationScaleTridiagonalSystemSolverTrustedServersUniformSpecifierUniformTypeUrlTemplateImageryProviderVaryingTypeVelocityOrientationPropertyVelocityVectorPropertyVertexFormatVerticalOriginVideoSynchronizerViewportQuadVisibilityVisualizerVoxelPrimitiveVoxelProviderVoxelShapeTypeVRTheWorldTerrainProviderWallGeometryWallGeometryUpdaterWallGraphicsWallOutlineGeometryWebGLConstantsWebGLOptionsWebMapServiceImageryProviderWebMapTileServiceImageryProviderWebMercatorProjectionWebMercatorTilingSchemeWindingOrderwriteTextToCanvasAnimationAnimationViewModelBaseLayerPickerBaseLayerPickerViewModelCesium3DTilesInspectorCesium3DTilesInspectorViewModelCesiumInspectorCesiumInspectorViewModelClockViewModelCommandcreateCommandFullscreenButtonFullscreenButtonViewModelGeocoderGeocoderViewModelHomeButtonHomeButtonViewModelInfoBoxInfoBoxViewModelNavigationHelpButtonNavigationHelpButtonViewModelPerformanceWatchdogPerformanceWatchdogViewModelProjectionPickerProjectionPickerViewModelProviderViewModelSceneModePickerSceneModePickerViewModelSelectionIndicatorSelectionIndicatorViewModelSvgPathBindingHandlerTimelineToggleButtonViewModelViewerviewerCesium3DTilesInspectorMixinviewerCesiumInspectorMixinviewerDragDropMixinviewerPerformanceWatchdogMixinviewerVoxelInspectorMixinVoxelInspectorVoxelInspectorViewModelVRButtonVRButtonViewModel

BoundingRectangle

BoundingRectangle定义了一个矩形的边界框。它通常在几何运算中使用,如测试一个点是否在矩形内或计算两个矩形的交集。

构造函数

BoundingRectangle([west, south, east, north])

  • 参数:
    • {Number} west:矩形最西侧的经度。
    • {Number} south:矩形最南侧的纬度。
    • {Number} east:矩形最东侧的经度。
    • {Number} north:矩形最北侧的纬度。
  • 返回值:新的BoundingRectangle实例。

创建一个具有给定边界的矩形。

静态方法

BoundingRectangle.clone(rectangle, result)

  • 参数:
    • {BoundingRectangle} rectangle:矩形。
    • {BoundingRectangle} result:可选的用于存储结果的矩形。
  • 返回值:与result相同的实例或新实例。

复制矩形的边界框的值到result矩形上,如果未提供result则创建一个新的矩形。

BoundingRectangle.expand(rectangle, amount, result)

  • 参数:
    • {BoundingRectangle} rectangle:矩形。
    • {Number} amount:矩形增加的大小。
    • {BoundingRectangle} result:可选的用于存储结果的矩形。
  • 返回值:与result相同的实例或新实例。

将该矩形的边界扩大amount个单位,如果未提供result则创建一个新的矩形。

BoundingRectangle.fromPoints(positions, result)

  • 参数:
    • {Cartesian3[]} [positions]:点的数组.
    • {BoundingRectangle} [result]:用于存储结果的BoundingRectangle对象.
  • 返回值:BoundingRectangle。

创建一个矩形,使其完全包括positions数组中所有点。

BoundingRectangle.fromRectangle(rectangle, result)

  • 参数:
    • {Rectangle} rectangle:矩形
    • {BoundingRectangle} [result]:可选的用于存储结果的BoundingRectangle对象.
  • 返回值:BoundingRectangle。

创建一组与矩形相同的边界框。

BoundingRectangle.intersect(left, right, result)

  • 参数:
    • {BoundingRectangle} left:矩形1。
    • {BoundingRectangle} right:矩形2。
    • {BoundingRectangle} result:可选的用于存储结果的BoundingRectangle对象.
  • 返回值:与result相同的实例或新实例。

创建一个新的边界框,表示两个输入边界框的交集。

BoundingRectangle.pack(value, array, startingIndex)

  • 参数:
    • {BoundingRectangle} value:BoundingRectangle。
    • {Number[]} array:包含结果到该数组.
    • {Number} [startingIndex=0]:数组的位移.
  • 返回值:数组。

将边界框存储在Array数组中。

BoundingRectangle.unpack(array, startingIndex, result)

  • 参数:
    • {Number[]} array:信息存储在其中.
    • {Number} [startingIndex=0]:数组的位移.
    • {BoundingRectangle} [result]:用于存储结果的BoundingRectangle对象.
  • 返回值:与result相同的实例或新实例。

从一个数组中读取信息,创建BoundingRectangle实例。

BoundingRectangle.union(left, right, result)

  • 参数:
    • {BoundingRectangle} left:矩形1。
    • {BoundingRectangle} right:矩形2。
    • {BoundingRectangle} result:可选的用于存储结果的BoundingRectangle对象.
  • 返回值:与result相同的实例或新实例。

创建一个新的矩形,其中包括原始的BoundingRectangles边界框的并集。

属性

center: Cartesian2

包含该矩形边界框的中心位置。

height: Number

该矩形边界框的高度(纬度范围)。

width: Number

该矩形边界框的宽度(经度范围)。

方法

clone(result)

  • 参数:
    • {BoundingRectangle} result:可选的用于存储结果的BoundingRectangle对象.
  • 返回值:与result相同的实例或新实例。

创建一个与该BoundingRectangles边界框相同的BoundingRectangles实例。

equals(right, relativeEpsilon)

  • 参数:
    • {BoundingRectangle} right:BoundingRectangles实例。
    • {Number} [relativeEpsilon=0.0]:用于比较的可选精度.
  • 返回值:如果两个BoundingRectangles实例相等则为true,否则为false.

比较该BoundingRectangles实例与right实例是否相等。

equalsEpsilon(right, relativeEpsilon)

  • 参数:
    • {BoundingRectangle} right:BoundingRectangles实例.
    • {Number} [relativeEpsilon=0.0]:用于比较的可选精度.
  • 返回值:如果两个BoundingRectangles实例相等则为true,否则为false.

比较该BoundingRectangles实例与right实例是否相等。

intersect(right)

  • 参数:
    • {BoundingRectangle} right:BoundingRectangles实例。
  • 返回值:如果存在交集则为true,否则为false。

判断该BoundingRectangles实例与right实例是否有交集。

toString()

  • 参数:无
  • 返回值:表达式字符串。

创建该BoundingRectangles实例的字符串表达式。

union(right)

  • 参数:
    • {BoundingRectangle} right:BoundingRectangles实例。
  • 返回值:新的BoundingRectangles实例,表示该BoundingRectangles实例与right的并集。

创建一个新的矩形,其中包括原始BoundingRectangles实例与right实例的并集。