Cesium 铯传感器
我在我的应用程序中添加了一个简单的矩形传感器Cesium 铯传感器,cesium,Cesium,我在我的应用程序中添加了一个简单的矩形传感器 addRectangularSensor() { this.viewer.scene.primitives.removeAll(); var rectangularPyramidSensor = new CesiumSensorVolumes.RectangularPyramidSensorVolume(); rectangularPyramidSensor.modelMatrix = this.getModelMatrix(
addRectangularSensor() {
this.viewer.scene.primitives.removeAll();
var rectangularPyramidSensor = new CesiumSensorVolumes.RectangularPyramidSensorVolume();
rectangularPyramidSensor.modelMatrix = this.getModelMatrix();
rectangularPyramidSensor.radius = 50000.0;
rectangularPyramidSensor.xHalfAngle = Cesium.Math.toRadians(45);
rectangularPyramidSensor.yHalfAngle = Cesium.Math.toRadians(30);
rectangularPyramidSensor.lateralSurfaceMaterial = Cesium.Material.fromType('Color');
rectangularPyramidSensor.lateralSurfaceMaterial.uniforms.color = new Cesium.Color(0.0, 1.0, 1.0, 0.5);
rectangularPyramidSensor.intersectionColor = Cesium.Color.YELLOW
rectangularPyramidSensor.debugShowCrossingPoints = true;
rectangularPyramidSensor.showIntersection = true;
console.log('rectangularPyramidSensor', rectangularPyramidSensor)
console.log('rectangularPyramidSensor.modelMatrix', rectangularPyramidSensor.modelMatrix)
this.viewer.scene.primitives.add(rectangularPyramidSensor);
console.log('this.viewer.scene.primitives', this.viewer.scene.primitives)
},
getModelMatrix() {
var longitude = Cesium.Math.toRadians(34.862923);
var latitude = Cesium.Math.toRadians(31.996851);
var altitude = 2000.0;
var clock = 0.0;
var cone = Cesium.Math.toRadians(15.0);
// var cone = 0.0;
var twist = 0.0;
var ellipsoid = this.viewer.scene.globe.ellipsoid;
var location = ellipsoid.cartographicToCartesian(new Cesium.Cartographic(longitude, latitude, altitude));
var modelMatrix = Cesium.Transforms.northEastDownToFixedFrame(location);
var orientation = Cesium.Matrix3.multiply(
Cesium.Matrix3.multiply(Cesium.Matrix3.fromRotationZ(clock), Cesium.Matrix3.fromRotationY(cone), new Cesium.Matrix3()),
Cesium.Matrix3.fromRotationX(twist), new Cesium.Matrix3()
);
const globe = this.viewer.scene.globe;
return Cesium.Matrix4.multiply(modelMatrix, Cesium.Matrix4.fromRotationTranslation(orientation, Cesium.Cartesian3.ZERO), new Cesium.Matrix4());
},
如何获得该传感器的交互坐标(角点)
我想画一些关于这个传感器的图像或视频