亚洲动漫在线观看-亚洲动漫第一页-亚洲丁香婷婷-亚洲丶国产丶欧美一区二区三区-亚洲第一综合网站-亚洲第一永久色

GroundPrimitive

Ground Primitive表示覆蓋在地形上的幾何體,或Scene中的3D瓦片。

基本體將幾何體實例與描述完整著色的Appearance結合起來,包括MaterialRenderState。大致上,幾何體實例定義結構和位置,外觀定義視覺特征。分離幾何體和外觀允許我們混合和匹配大多數幾何體和外觀,并獨立地添加新的幾何體或外觀。

支持WebGL_深度紋理擴展,除了PerinstanceColorAppearance外,還需要使用具有不同PerinstanceColors或材質的幾何體。

紋理基本體是為概念模式而設計的,并不用于精確地將紋理映射到地形-對于該用例,請使用SingleTileImageryProvider

要正確渲染,此功能需要ext}frag_depth webgl擴展。對于不支持此擴展的硬件,將存在一些視角的渲染工件。

有效幾何圖形為CircleGeometryCorridorGeometry、EllipseGeometryPolygonGeometryRectangleGeometry。

new GroundPrimitive(options)
Parameters:
options (Object)
Name Description
options.geometryInstances
(Array | GeometryInstance)
要渲染的幾何體實例。
options.appearance
Appearance
用于呈現原語的外觀。當幾何實體具有顏色屬性時,默認為平面PerinstanceColorAppearance。
options.show
Boolean
default true
確定是否顯示此基元。
options.vertexCacheOptimize
Boolean
default false
true時,幾何體頂點將針對頂點前和頂點后明暗器緩存進行優化。
options.interleave
Boolean
default false
true時,幾何頂點屬性交錯,這可以稍微提高渲染性能,但增加加載時間。
options.compressVertices
Boolean
default true
true時,幾何體頂點被壓縮,這將節省內存。
options.releaseGeometryInstances
Boolean
default true
true時,原語不保留對輸入geometryInstances的引用以保存內存。
options.allowPicking
Boolean
default true
true時,每個幾何體實例只能使用Scene#pick進行選擇。當false時,保存GPU內存。
options.asynchronous
Boolean
default true
確定在準備就緒之前是異步創建基元還是阻止創建基元。如果為false,則必須首先調用initiaterrainheights()。
options.classificationType
ClassificationType
default ClassificationType.BOTH
確定地形、三維瓦片還是兩者都要分類。
options.debugShowBoundingVolume
Boolean
default false
僅用于調試。確定是否顯示此基元的命令的邊界球。
options.debugShowShadowVolume
Boolean
default false
僅用于調試。確定是否繪制基本體中每個幾何體的陰影體積。在釋放幾何圖形或選項之前,要創建的卷在創建時必須為true。ReleaseGeometryInstance必須為false
Example
// Example 1: Create primitive with a single instance
var rectangleInstance = new bmgl.GeometryInstance({
  geometry : new bmgl.RectangleGeometry({
    rectangle : bmgl.Rectangle.fromDegrees(-140.0, 30.0, -100.0, 40.0)
  }),
  id : 'rectangle',
  attributes : {
    color : new bmgl.ColorGeometryInstanceAttribute(0.0, 1.0, 1.0, 0.5)
  }
});
scene.primitives.add(new bmgl.GroundPrimitive({
  geometryInstances : rectangleInstance
}));

// Example 2: Batch instances
var color = new bmgl.ColorGeometryInstanceAttribute(0.0, 1.0, 1.0, 0.5); // Both instances must have the same color.
var rectangleInstance = new bmgl.GeometryInstance({
  geometry : new bmgl.RectangleGeometry({
    rectangle : bmgl.Rectangle.fromDegrees(-140.0, 30.0, -100.0, 40.0)
  }),
  id : 'rectangle',
  attributes : {
    color : color
  }
});
var ellipseInstance = new bmgl.GeometryInstance({
    geometry : new bmgl.EllipseGeometry({
        center : bmgl.Cartesian3.fromDegrees(-105.0, 40.0),
        semiMinorAxis : 300000.0,
        semiMajorAxis : 400000.0
    }),
    id : 'ellipse',
    attributes : {
        color : color
    }
});
scene.primitives.add(new bmgl.GroundPrimitive({
  geometryInstances : [rectangleInstance, ellipseInstance]
}));
See:

Members

(readonly) allowPicking : Boolean

true時,每個幾何體實例只能使用Scene#pick進行選擇。當false時,保存GPU內存。
Default Value: true

appearance : Appearance

Appearance用于對該原語進行著色。每個幾何體實例都以相同的外觀著色。一些外觀,如PerInstanceColorAppearance允許為每個實例提供唯一的屬性。
Default Value: undefined

(readonly) asynchronous : Boolean

確定是否將在Web工作者上創建和批處理幾何體實例。
Default Value: true

classificationType : ClassificationType

確定地形、三維瓦片還是兩者都要分類。
Default Value: ClassificationType.BOTH

(readonly) compressVertices : Boolean

true時,幾何體頂點被壓縮,這將節省內存。
Default Value: true

debugShowBoundingVolume : Boolean

此屬性僅用于調試;它既不用于生產,也不進行優化。

為基本體中的每個draw命令繪制邊界球體。

Default Value: false

debugShowShadowVolume : Boolean

此屬性僅用于調試;它既不用于生產,也不進行優化。

為基本體中的每個幾何體繪制陰影體積。

Default Value: false

(readonly) geometryInstances : (Array|GeometryInstance)

使用此基元渲染的幾何體實例。在構造基元時,如果options.releaseGeometryInstancestrue,則可能是undefined。

在呈現基元后更改此屬性沒有效果。

Default Value: undefined

(readonly) interleave : Boolean

確定幾何體頂點屬性是否交錯,這可以稍微提高渲染性能。
Default Value: false

(readonly) ready : Boolean

確定基元是否已完成并準備好呈現。如果此屬性為真,則下次調用GroundPrimitive#update時將呈現原語。

(readonly) readyPromise : Promise.<GroundPrimitive>

獲取解決基元何時準備呈現的承諾。

(readonly) releaseGeometryInstances : Boolean

true時,原語不保留對輸入geometryInstances的引用以保存內存。
Default Value: true

show : Boolean

確定是否顯示基元。這會影響基本體中的所有幾何體實例。
Default Value: true

(readonly) vertexCacheOptimize : Boolean

true時,幾何體頂點將針對頂點前和頂點后明暗器緩存進行優化。
Default Value: true

Methods

(static) initializeTerrainHeights() → {Promise}
初始化最小和最大地形高度。這只需要在同步創建groundprimitive時調用。
(static) isSupported(scene) → {Boolean}
確定是否支持GroundPrimitive呈現。
Parameters:
scene (Scene) 現場。
(static) supportsMaterials(scene) → {Boolean}
檢查給定場景是否支持基本體上的材質。GroundPrimitive上的材質需要支持WebGL“深度”紋理擴展。
Parameters:
scene (Scene) 當前場景。
destroy()
銷毀此對象持有的WebGL資源。銷毀對象允許確定地釋放WebGL資源,而不是依賴垃圾收集器來銷毀此對象。

一旦對象被破壞,就不應使用它;調用除isDestroyed以外的任何函數都將導致DeveloperError異常。因此,將返回值(undefined)賦給對象,如示例中所述。

Example
e = e && e.destroy();
Throws
  • DeveloperError : 此對象已被銷毀,即調用destroy()。
See:
getGeometryInstanceAttributes(id) → {Object}
返回GeometryInstance的每個實例可修改屬性。
Parameters:
id (*) GeometryInstance的ID。
Example
var attributes = primitive.getGeometryInstanceAttributes('an id');
attributes.color = bmgl.ColorGeometryInstanceAttribute.toValue(bmgl.Color.AQUA);
attributes.show = bmgl.ShowGeometryInstanceAttribute.toValue(true);
Throws
  • DeveloperError : 必須在調用GetGeometryInstanceAttributes之前調用Update。
isDestroyed() → {Boolean}
如果此對象被破壞,則返回true;否則返回false。

如果此對象被破壞,則不應使用它;調用除isDestroyed以外的任何函數都將導致DeveloperError異常。

See:
update()
ViewerBMWidget渲染場景以獲取渲染此原語所需的繪制命令時調用。

不要直接調用此函數。這只是為了列出渲染場景時可能傳播的異常:

Throws
  • DeveloperError : 對于同步groundPrimitive,必須調用groundPrimitive.InitializerRainHeights()并等待返回的Promise解析。
  • DeveloperError : 所有實例幾何必須具有相同的PrimitiveType。
  • DeveloperError : 外觀和材料有一個統一的名稱。
主站蜘蛛池模板: 天堂成人影院 | 欧美成人一区二区 | 欧美性色黄大片四虎影视 | 国产清纯女高中生在线观看 | 日本护士xxxx视频 | 亚洲精品片| 精品国产国产精2020久久日 | 国产在线精品成人一区二区三区 | 91亚洲一区二区在线观看不卡 | 1717国产精品视频免费 | 操儿子| 天天做天天爽天天谢 | 美女翘臀跪床被打屁股作文 | 色综合久久六月婷婷中文字幕 | 亚洲精品国产一区二区在线 | 国产盗摄wc女厕所 | 国产视频久久 | 女人张开腿 让男人桶个爽 免费观看 | 亚洲精品一区二区三区在线播放 | 91麻豆精品激情在线观看最新 | 婷婷去我也去 | 欧美日韩视频一区三区二区 | 国产精品嫩草影院在线看 | 特黄特色大片免费影院 | 精品国产免费第一区二区三区日韩 | 美女啪啪国产 | 99视频在线看 | 亚洲国产综合精品 | www.色婷婷.com| 扒开双腿羞辱调教play视频 | ipx-177绝对领域在线观看 | 三级黄色图片 | 色yeye在线观看 | 日韩精品一区二区三区中文在线 | 四虎精品成人a在线观看 | 成人精品视频一区二区在线 | 好看华人华人经典play | 高h肉爽文农民工 | 国产九九在线 | 四虎永久在线精品波多野结衣 | 网址在线观看你懂我意思吧免费的 |