ViewShed3D

new Cesium.ViewShed3D(scene)

Visual domain analysis, setting the observation point, target position, horizontal and vertical viewing angle range, establishing visual area analysis and displaying the analysis result in the specified scene.
Name Type Description
scene Object optional Scene object.
Throws:
Example:
//Create visual domain analysis
var viewShed3D= new Cesium.ViewShed3D(scene);
Demo:

Members

direction : Number

Gets or sets the angle between the current camera's direction and true north direction, unit: degree.

distance : Number

Get or set the visible distance, unit: meter.

hiddenAreaColor : Color

Gets or sets the color of the invisible area.

hintLineColor : Color

Gets or sets the color of the prompt line of the visual domain analysis.

horizontalFov : Number

Get or set the horizontal viewing angle range of the visual domain analysis. Unit: degree.

pitch : Number

Get or set the currently analyzed camera pitch angle. Note: The pitch angle refers to 0 degrees when the direction of the camera is parallel to the ground, which is different from the pitch of the camera itself.

verticalFov : Number

Get or set the vertical viewing angle range of the visual domain analysis. Unit: degree.

viewPosition : Array

Get or set the position of the observation point. The location is represented by an array of longitude, latitude, and elevation.

visibleAreaColor : Color

Gets or sets the color of the visible area.

Methods

getBarrierPoint(targetPoint)Point3D

Obtain the obstacle point corresponding to the target point.
Name Type Description
targetPoint Point3D Target
Returns:
Obstacle point

getViewshedParameter()Object

Obtain the construction parameters of the closed body of the visual domain.
Returns:
Returns the construction parameters of the visible/invisible closed body, including the viewpoint, target, obstacle point array and radius.

getVisibleInViewport(index)Boolean

Obtain the visibility of the visual domain analysis in the corresponding viewport.
Name Type Description
index Number The specified viewport index.
Returns:
Visiability
Throws:

setDistDirByPoint(position)

set the direction by point(longitude, latitude and height)
Name Type Description
position Array
Throws:
  • DeveloperError : the position is [longitude, latitude ,height] and is not equals viewPosition

setVisibleInViewport(index)

Set the visibility of the visual domain analysis in the corresponding viewport.
Name Type Description
index Number The specified viewport index.
Throws: