A sensor primitive for visualization and detection. Combines WASM-accelerated
geometric detection with shadow map-based occlusion analysis for viewshed.
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
Configuration options.
|
Example:
// Sensor automatically adds itself to scene.primitives on construction
// and removes itself on destroy().
const sensor = new Cesium.Sensor({
scene: viewer.scene,
position: Cesium.Cartesian3.fromDegrees(-122.4, 37.8, 100),
type: Cesium.Sensor.Type.CONIC,
outerHalfAngle: Cesium.Math.toRadians(30),
radius: 5000,
color: Cesium.Color.CYAN.withAlpha(0.5),
showViewshed: true,
});
// Viewshed auto-caches when sensor is stationary.
// Force refresh if objects in FOV change:
sensor.refreshViewshed();
// To remove:
sensor.destroy();
Members
Set to true to force use of JS fallback instead of WASM for containsPoint.
Useful for debugging.
A promise that resolves when the sensor's WASM handle is ready.
Await this before calling containsPoint() to ensure WASM is initialized.
Whether to use spherical cap for the sensor.
When true (default), the sensor shows a dome at the range boundary and
detection uses spherical distance (dist < range).
When false, the cone is visually open-ended and detection uses a planar
boundary perpendicular to boresight (z < range in local coordinates).
-
Default Value:
true
splitDirection : SplitDirection
Gets or sets the split direction used for side-by-side comparison rendering.
Whether to clip the sensor volume at terrain/geometry occlusion points.
When true and viewshed is enabled, the sensor volume will stop rendering
at terrain and geometry that blocks the line of sight.
Requires viewshed to be enabled. Default is true.
Note: Changing this requires rebuilding the sensor geometry.
The terrain detail level within the sensor's viewshed area.
Value from 1-8, where 1 is highest detail and 8 is lowest.
Set to undefined to use the global terrain LOD setting.
Lower values require more GPU/CPU but provide more accurate viewshed.
The terrain detail distance mode within the sensor's viewshed area.
"distance" refines terrain based on distance from the sensor, while
"forced" caps far-footprint terrain distance for stable high-detail terrain.
readonly viewshed : SensorViewshed
See:
Gets or sets the depth-comparison bias used by viewshed visibility tests.
Expressed in normalized depth units relative to the shadow-map reference
distance of 10,000 km. Default
1e-7. Larger values eliminate
the per-pixel "zebra" banding caused by shadow-map quantization at the
cost of fine-scale occlusion detail; smaller values preserve detail but
may reintroduce banding. Tunable at runtime — no rebuild needed.
Whether the viewshed needs to be re-rendered. Automatically set to true
when position, orientation, or intersection settings change.
Set this to true or call
Sensor#refreshViewshed to force an update.
Optional terrain-analysis-backed positive-link footprint overlay for viewshed terrain shading.
Gets or sets the boresight-falloff exponent used by the coverage-quality heat map.
Gets or sets the distance-falloff exponent used by the coverage-quality heat map.
viewshedQualityHighColor : Color
Gets or sets the high-quality color used by the coverage-quality heat map.
viewshedQualityLowColor : Color
Gets or sets the low-quality color used by the coverage-quality heat map.
viewshedQualityMediumColor : Color
Gets or sets the medium-quality color used by the coverage-quality heat map.
Gets or sets the atmospheric attenuation rate used by RF viewshed visualization.
viewshedRfBadColor : Color
Legacy alias for `viewshedRfNegativeMarginColor`.
Gets or sets the RF frequency used by RF viewshed visualization.
viewshedRfGoodColor : Color
Legacy alias for `viewshedRfPositiveMarginColor`.
Optional terrain-analysis-backed projected RF link-margin raster.
viewshedRfNegativeMarginColor : Color
Gets or sets the negative link-margin color used by RF terrain overlays.
Gets or sets the occlusion penalty applied in RF viewshed visualization.
viewshedRfPositiveMarginColor : Color
Gets or sets the positive link-margin color used by RF terrain overlays.
Gets or sets the RF path-loss threshold.
Gets or sets the transition band around the RF threshold.
viewshedVisualizationMode : ViewshedVisualizationMode
Gets or sets the viewshed visualization mode.
Methods
Builds a sensor-coverage module request from an OrbPro Sensor graphics object
attached to a propagated entity. The module owns footprint and swath
projection; this helper only samples the entity's propagated state and
carries sensor semantics into the request.
| Name | Type | Description | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
Options.
|
Returns:
JSON-serializable coverage request.
Debug method to evaluate SDF for a specific point against a sensor.
This uses the already-loaded WASM backend, avoiding import path issues.
| Name | Type | Description |
|---|---|---|
sensor |
Sensor | The sensor instance to debug. |
point |
Cartesian3 | Point in world coordinates. |
Returns:
Debug info about the SDF evaluation.
Debug method to get WASM sensor state for a specific sensor.
This uses the already-loaded WASM backend, avoiding import path issues.
| Name | Type | Description |
|---|---|---|
sensor |
Sensor | The sensor instance to debug. |
Returns:
Debug info about the sensor's WASM state.
Ensures the WASM backend is loaded and ready for sensor operations.
Call this once before creating any sensors that will use containsPoint().
Returns:
Resolves to true when WASM is ready.
Throws:
-
Error : If WASM backend fails to initialize.
Example:
await Cesium.Sensor.ensureWasmReady();
const sensor = new Cesium.Sensor({ ... });
sensor.containsPoint(point); // Now works
Checks if the WASM backend is currently initialized and ready.
Returns:
True if WASM is ready for use.
Apply projected RF link-margin visualization settings in one update.
| Name | Type | Description |
|---|---|---|
configuration |
object | RF link-margin configuration. |
Legacy alias for
Sensor#applyViewshedLinkMarginConfiguration.
| Name | Type | Description |
|---|---|---|
configuration |
object | RF link-margin configuration. |
Apply coverage-quality heat-map settings in one update.
| Name | Type | Description |
|---|---|---|
configuration |
object | Coverage-quality visualization configuration. |
Apply RF viewshed visualization settings in one update.
| Name | Type | Description |
|---|---|---|
configuration |
object | RF viewshed configuration. |
Tests geometric containment only. This intentionally excludes body
occlusion, terrain occlusion, and shadow-map visibility so higher-level
access logic can layer those concerns independently.
| Name | Type | Description |
|---|---|---|
point |
Cartesian3 | Point in world coordinates. |
Returns:
True if the point is geometrically inside the sensor volume.
Debug method to compare JS and WASM containsPoint results.
Call this to diagnose mismatches between JS and WASM implementations.
| Name | Type | Description |
|---|---|---|
point |
Cartesian3 | Point in world coordinates. |
Returns:
Debug info comparing JS and WASM results.
Evaluates the geometric signed-distance function for this sensor when a
handle-backed WASM containment primitive is available.
| Name | Type | Description |
|---|---|---|
point |
Cartesian3 | Point in world coordinates. |
Returns:
Signed distance in meters, or undefined when a
non-SDF containment path is active.
getEntitiesInVolume(entities, time, options) → Array.<Entity>
Gets entities inside the sensor volume.
| Name | Type | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
entities |
EntityCollection | Entity collection to check. | ||||||||
time |
JulianDate | Time to evaluate positions. | ||||||||
options |
object |
optional
Options object.
|
Returns:
Entities inside the sensor volume.
Gets indices of points inside the sensor volume (batch operation).
| Name | Type | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
points |
Array.<Cartesian3> | Array of points to test. | ||||||||
options |
object |
optional
Options object.
|
Returns:
Indices of points inside the sensor.
Tests whether this sensor has access to a target position using a multi-tier
filtering pipeline ordered from cheapest to most expensive:
1. Range check (<0.001ms)
2. Body occlusion via WASM (~0.005ms) or JS EllipsoidalOccluder (~0.01ms fallback)
3. FOV containment via WASM (~0.1ms)
4. Terrain occlusion via GPU readback (~1ms, opt-in)
| Name | Type | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
targetPosition |
Cartesian3 | World-space target position. | ||||||||||||||||
options |
object |
optional
Options.
|
Returns:
True if the sensor has access to the target.
Manually triggers a viewshed shadow map update. Use this when objects
in the sensor's field of view have moved and you want to refresh the
occlusion analysis.
The viewshed automatically updates when the sensor position or orientation
changes, but objects moving within the FOV won't trigger an update.
Example:
// Force refresh when a building in the FOV was added/moved:
sensor.refreshViewshed();