OrbPro2 a Cesium distribution

Viewshed

new Cesium.Viewshed(options)

A viewshed analyzes visibility from an observer position, showing which areas are visible and which are occluded by terrain or other objects.
Name Type Description
options object Object with the following properties:
Name Type Default Description
scene Scene The scene to add the viewshed to.
observerPosition Cartesian3 The observer position in world coordinates.
heading number 0.0 optional The heading angle in radians (0 = north, positive = clockwise).
pitch number -CesiumMath.PI_OVER_TWO optional The pitch angle in radians (0 = horizontal, negative = down).
range number 1000.0 optional The analysis range in meters.
horizontalFov number CesiumMath.PI_OVER_TWO optional The horizontal field of view in radians.
verticalFov number CesiumMath.PI_OVER_TWO optional The vertical field of view in radians.
visibleColor Color Color.GREEN.withAlpha(0.5) optional Color for visible areas.
occludedColor Color Color.RED.withAlpha(0.5) optional Color for occluded areas.
visualizationMode ViewshedVisualizationMode ViewshedVisualizationMode.VISIBILITY optional Viewshed coloring mode.
rfFrequency number 2.4e9 optional Frequency in Hz for RF path-loss visualization.
rfAtmosphericLossDbPerKm number 0.0 optional Atmospheric attenuation rate used by RF path-loss visualization.
rfOccludedLossDb number 35.0 optional Additional loss applied to occluded fragments in RF path-loss visualization.
rfThresholdDb number 140.0 optional Path-loss threshold separating "good" and "bad" RF coverage colors.
rfTransitionWidthDb number 6.0 optional Transition band around the RF threshold. Use 0 for a hard cutoff.
rfGoodColor Color Color.GREEN.withAlpha(0.55) optional Color for fragments below the RF loss threshold.
rfBadColor Color Color.RED.withAlpha(0.55) optional Color for fragments above the RF loss threshold.
displayMode ViewshedDisplayMode ViewshedDisplayMode.TERRAIN_OVERLAY optional How to display the viewshed.
resolution number 2048 optional Shadow map resolution (higher = more accurate but slower).
enabled boolean true optional Whether the viewshed is enabled.
Example:
const viewshed = new Cesium.Viewshed({
  scene: viewer.scene,
  observerPosition: Cesium.Cartesian3.fromDegrees(-122.4, 37.8, 100),
  heading: 0,
  pitch: Cesium.Math.toRadians(-15),
  range: 5000,
  horizontalFov: Cesium.Math.toRadians(90),
  verticalFov: Cesium.Math.toRadians(60)
});

Members

Gets or sets the display mode.
Gets or sets whether the viewshed is enabled.
Gets or sets the heading angle in radians.

horizontalFov : number

Gets or sets the horizontal field of view in radians.
Gets or sets the observer position in world coordinates.
Gets or sets the color for occluded areas.
Gets or sets the pitch angle in radians.
Gets or sets the analysis range in meters.

rfAtmosphericLossDbPerKm : number

Gets or sets the atmospheric attenuation rate used by RF viewshed visualization.
Gets or sets the "bad" RF coverage color.
Gets or sets the RF frequency used by RF viewshed visualization.
Gets or sets the "good" RF coverage color.

rfOccludedLossDb : number

Gets or sets the occlusion penalty applied in RF viewshed visualization.

rfThresholdDb : number

Gets or sets the RF path-loss threshold.

rfTransitionWidthDb : number

Gets or sets the transition band around the RF threshold.
Gets the underlying shadow map used for depth comparison.
Gets or sets the vertical field of view in radians.
Gets or sets the color for visible areas.
Gets or sets the viewshed visualization mode.

Methods

Destroys the viewshed. Once destroyed, a viewshed should not be used.

isDestroyed()boolean

Returns true if this object was destroyed; otherwise, false.
Returns:
True if this object was destroyed; otherwise, false.
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.