GeoFourPrismPrimitive

new Cesium.GeoFourPrismPrimitive(options)

雷达跟踪四棱锥体
Name Type Description
options Object optional 参数选项:
Name Type Description
viewer Viewer optional 三维视图对象
angle1 Number optional 四棱锥夹角1
angle2 Number optional 四棱锥夹角2
rotation Number optional 四棱锥相对地面的姿态
radius Number optional 四棱锥半径
topSteps Number optional 四棱锥顶盖水平方向及垂直方向分隔数
position Cartesian3 optional 四棱锥的中心点
show Boolean optional 四棱锥的可见性
outline Boolean optional 四棱锥边框可见性
topShow Boolean optional 四棱锥顶盖可见性
topOutline Boolean optional 四棱锥顶盖边框的可见性
reverse Boolean optional 四棱锥是否反转
color Color optional 四棱锥的颜色
lineColor Color optional 四棱锥边框的颜色
Example:
var radar = viewer.scene.primitives.add(new GeoFourPrismPrimitive(viewer, {
		show:true,
		angle1: 22,
 	angle2: 22,
		radius: 700000,
		rotation: {
			heading: Cesium.Math.toRadians(0),
			pitch:Cesium.Math.toRadians(40),
			roll: Cesium.Math.toRadians(0)
		},
		color: Cesium.Color.fromCssColorString('rgba(255,255,0,0.4)'),	
		position: Cesium.Cartesian3.fromDegrees(116.517, 39.891, 100),
		outline: true,
		lineColor: Cesium.Color.fromCssColorString('rgba(255,255,255,0.4)'),
		topShow: true,
		topOutline: true,
		reverse: false,
		topSteps: 2
	}));
Demo:

Members

angle : Number

四棱锥夹角
Default Value: 60
Example:
geoFourPrismPrimitive.angle = 60

angle1 : Number

四棱锥夹角1
Default Value: 60
Example:
geoFourPrismPrimitive.angle1 = 60

angle2 : Number

四棱锥夹角2
Default Value: 60
Example:
geoFourPrismPrimitive.angle2 = 60

color : Color

四棱锥的颜色
Default Value: new Cesium.Color(1.0 ,0 ,0 ,0.2)
Example:
geoFourPrismPrimitive.color = new Cesium.Color(1.0 ,0 ,0 ,0.2)

heading : Number

四棱锥的方向角
Default Value: 0
Example:
geoFourPrismPrimitive.heading = 100

lineColor : Color

四棱锥的边框颜色
Default Value: new Cesium.Color(1.0 ,1.0 ,1.0 ,0.4)
Example:
geoFourPrismPrimitive.lineColor = new Cesium.Color(1.0 ,1.0 ,1.0 ,0.4)

lookAt : Cartesian3

摄像机的位置
Default Value: undefined
Example:
geoFourPrismPrimitive.lookAt = Cesium.Cartesian3.fromDegrees(116.517, 39.891, 100)

outline : Boolean

四棱锥边框是否可见
Default Value: true
Example:
geoFourPrismPrimitive.outline = true

pitch : Number

四棱锥的俯仰角
Default Value: 0
Example:
geoFourPrismPrimitive.pitch = 0

position : Cartesian3

四棱锥的位置
Example:
geoFourPrismPrimitive.position = Cesium.Cartesian3.fromDegrees(116.517, 39.891, 0)

position : Cartesian3

视锥位置
Example:
geoFourPrismPrimitive.position = Cesium.Cartesian3.fromDegrees(118, 37, 100)

radius : Number

四棱锥的大小
Default Value: 10000
Example:
geoFourPrismPrimitive.radius = 70000

roll : Number

四棱锥的翻滚角
Default Value: 0
Example:
geoFourPrismPrimitive.roll = 0

show : Boolean

四棱锥是否可见
Default Value: true
Example:
geoFourPrismPrimitive.show = true

topOutline : Boolean

四棱锥顶盖边框的是否显示
Default Value: true
Example:
geoFourPrismPrimitive.topOutline = true

topShow : Boolean

四棱锥顶盖是否显示
Default Value: true
Example:
geoFourPrismPrimitive.topShow = true

trackedEntity : Entity

跟踪实体
Default Value: undefined
Example:
geoFourPrismPrimitive.trackedEntity = new Cesium.Entity()