cesium点线面贴地
1.polygon贴地
面要素贴地,可以使用entity里polygon的classificationType设置:ClassificationType.TERRAIN:
var polygon = viewer.entities.add({
polygon: {
hierarchy: new PolygonHierarchy(
Cartesian3.fromRadiansArray([
1.9467100113991904, 0.6545654747980045,
1.9475872685817361, 0.6580493823317781,
1.9507298124562473, 0.6565429311637261,
1.9489660013711525, 0.6537103492221,
])
),
classificationType: ClassificationType.TERRAIN,
},
});
也可以用 primitives 方式通过GroundPrimitive来设置,除了PolygonGeometry,GroundPrimitive还可支持CircleGeometry, CorridorGeometry, EllipseGeometry and RectangleGeometry:
var polygongeometry = new PolygonGeometry({
polygonHierarchy: n