1
我試圖在空氣中放置一個PolygonGeometry
在銫。總之,我想用height
創建一個從地面的偏移量,並extrudedHeight
給物體一定的厚度。但是,當我設置extrudedHeight時,高度設置本身將被忽略,並且擠壓一直下降到地面。所以我可以將飛機層疊在一起,但沒有三維物體。什麼是實現這一目標的正確方法?在空氣中放置一個PolygonGeometry在銫
下面是我在做什麼至今:
polygonGeometry = Cesium.PolygonGeometry.fromPositions(
positions: pos,
vertexFormat: Cesium.PerInstanceColorAppearance.VERTEX_FORMAT
extrudedHeight: @options.extrudedHeight,
height:@options.height
)
geometryInstance = new Cesium.GeometryInstance
geometry: polygonGeometry
primitive = new Cesium.Primitive
geometryInstances: [geoInstance]
謝謝,這有很大的幫助。爲了澄清,我想定位一個高度爲x的物體,然後將其拉伸10米。我一直將高度設置爲x,並將高度拉伸至10(以及其他一些奇怪的組合),而從您的示例中,我瞭解到它的高度爲x,並將高度拉伸至x + 10(當您知道它時很明顯)。 – Nicolas78
這很有道理;我會做一個說明,以澄清文件是更具體的行爲。 –