铯中的实体平面

问题描述

我对如何在 CesiumJS 中获取实体的平面感到有些困惑。基本上我有一个带有纬度、长度、高度、3 个方向角的盒子。如何从我在 Cesium 中获得的信息(盒子的坐标和方向)绘制和查看这个盒子的平面?并可能获得飞机的法线。

解决方法

@zhefengJin 基本上我以这种方式将盒子添加到 Cesium 中。很抱歉在此处添加代码而不是在评论回复中。

position = Cesium.Cartesian3.fromDegrees(10.540573,52.284086,2);
var head=Cesium.Math.toRadians(90);
var pitch = Cesium.Math.toRadians(0.0);
var roll = Cesium.Math.toRadians(90);

var hpr = new Cesium.HeadingPitchRoll(head,pitch,roll);
var orientation = Cesium.Transforms.headingPitchRollQuaternion(position,hpr);

var blueBox = viewer.entities.add({
    name: "abc.JPG",description: `Location: ()`,position: position,orientation : orientation,box: {
      dimensions: new Cesium.Cartesian3(1.0,1.0,0.0),material: '/images/abc.JPG',},});