国产久_亚欧精品一区_久久亚洲美女_99精品在线观看_日韩成人三级_久久精品久久久久

GroundPrimitive

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

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

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

紋理基本體是為概念模式而設(shè)計(jì)的,并不用于精確地將紋理映射到地形-對(duì)于該用例,請(qǐng)使用SingleTileImageryProvider

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

有效幾何圖形為CircleGeometry、CorridorGeometry、EllipseGeometry、PolygonGeometryRectangleGeometry。

new GroundPrimitive(options)
Parameters:
options (Object)
Name Description
options.geometryInstances
(Array | GeometryInstance)
要渲染的幾何體實(shí)例。
options.appearance
Appearance
用于呈現(xiàn)原語的外觀。當(dāng)幾何實(shí)體具有顏色屬性時(shí),默認(rèn)為平面PerinstanceColorAppearance。
options.show
Boolean
default true
確定是否顯示此基元。
options.vertexCacheOptimize
Boolean
default false
當(dāng)true時(shí),幾何體頂點(diǎn)將針對(duì)頂點(diǎn)前和頂點(diǎn)后明暗器緩存進(jìn)行優(yōu)化。
options.interleave
Boolean
default false
當(dāng)true時(shí),幾何頂點(diǎn)屬性交錯(cuò),這可以稍微提高渲染性能,但增加加載時(shí)間。
options.compressVertices
Boolean
default true
當(dāng)true時(shí),幾何體頂點(diǎn)被壓縮,這將節(jié)省內(nèi)存。
options.releaseGeometryInstances
Boolean
default true
當(dāng)true時(shí),原語不保留對(duì)輸入geometryInstances的引用以保存內(nèi)存。
options.allowPicking
Boolean
default true
當(dāng)true時(shí),每個(gè)幾何體實(shí)例只能使用Scene#pick進(jìn)行選擇。當(dāng)false時(shí),保存GPU內(nèi)存。
options.asynchronous
Boolean
default true
確定在準(zhǔn)備就緒之前是異步創(chuàng)建基元還是阻止創(chuàng)建基元。如果為false,則必須首先調(diào)用initiaterrainheights()。
options.classificationType
ClassificationType
default ClassificationType.BOTH
確定地形、三維瓦片還是兩者都要分類。
options.debugShowBoundingVolume
Boolean
default false
僅用于調(diào)試。確定是否顯示此基元的命令的邊界球。
options.debugShowShadowVolume
Boolean
default false
僅用于調(diào)試。確定是否繪制基本體中每個(gè)幾何體的陰影體積。在釋放幾何圖形或選項(xiàng)之前,要?jiǎng)?chuàng)建的卷在創(chuàng)建時(shí)必須為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

當(dāng)true時(shí),每個(gè)幾何體實(shí)例只能使用Scene#pick進(jìn)行選擇。當(dāng)false時(shí),保存GPU內(nèi)存。
Default Value: true

appearance : Appearance

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

(readonly) asynchronous : Boolean

確定是否將在Web工作者上創(chuàng)建和批處理幾何體實(shí)例。
Default Value: true

classificationType : ClassificationType

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

(readonly) compressVertices : Boolean

當(dāng)true時(shí),幾何體頂點(diǎn)被壓縮,這將節(jié)省內(nèi)存。
Default Value: true

debugShowBoundingVolume : Boolean

此屬性僅用于調(diào)試;它既不用于生產(chǎn),也不進(jìn)行優(yōu)化。

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

Default Value: false

debugShowShadowVolume : Boolean

此屬性僅用于調(diào)試;它既不用于生產(chǎn),也不進(jìn)行優(yōu)化。

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

Default Value: false

(readonly) geometryInstances : (Array|GeometryInstance)

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

在呈現(xiàn)基元后更改此屬性沒有效果。

Default Value: undefined

(readonly) interleave : Boolean

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

(readonly) ready : Boolean

確定基元是否已完成并準(zhǔn)備好呈現(xiàn)。如果此屬性為真,則下次調(diào)用GroundPrimitive#update時(shí)將呈現(xiàn)原語。

(readonly) readyPromise : Promise.<GroundPrimitive>

獲取解決基元何時(shí)準(zhǔn)備呈現(xiàn)的承諾。

(readonly) releaseGeometryInstances : Boolean

當(dāng)true時(shí),原語不保留對(duì)輸入geometryInstances的引用以保存內(nèi)存。
Default Value: true

show : Boolean

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

(readonly) vertexCacheOptimize : Boolean

當(dāng)true時(shí),幾何體頂點(diǎn)將針對(duì)頂點(diǎn)前和頂點(diǎn)后明暗器緩存進(jìn)行優(yōu)化。
Default Value: true

Methods

(static) initializeTerrainHeights() → {Promise}
初始化最小和最大地形高度。這只需要在同步創(chuàng)建groundprimitive時(shí)調(diào)用。
(static) isSupported(scene) → {Boolean}
確定是否支持GroundPrimitive呈現(xiàn)。
Parameters:
scene (Scene) 現(xiàn)場。
(static) supportsMaterials(scene) → {Boolean}
檢查給定場景是否支持基本體上的材質(zhì)。GroundPrimitive上的材質(zhì)需要支持WebGL“深度”紋理擴(kuò)展。
Parameters:
scene (Scene) 當(dāng)前場景。
destroy()
銷毀此對(duì)象持有的WebGL資源。銷毀對(duì)象允許確定地釋放WebGL資源,而不是依賴?yán)占鱽礓N毀此對(duì)象。

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

Example
e = e && e.destroy();
Throws
  • DeveloperError : 此對(duì)象已被銷毀,即調(diào)用destroy()。
See:
getGeometryInstanceAttributes(id) → {Object}
返回GeometryInstance的每個(gè)實(shí)例可修改屬性。
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 : 必須在調(diào)用GetGeometryInstanceAttributes之前調(diào)用Update。
isDestroyed() → {Boolean}
如果此對(duì)象被破壞,則返回true;否則返回false。

如果此對(duì)象被破壞,則不應(yīng)使用它;調(diào)用除isDestroyed以外的任何函數(shù)都將導(dǎo)致DeveloperError異常。

See:
update()
當(dāng)ViewerBMWidget渲染場景以獲取渲染此原語所需的繪制命令時(shí)調(diào)用。

不要直接調(diào)用此函數(shù)。這只是為了列出渲染場景時(shí)可能傳播的異常:

Throws
  • DeveloperError : 對(duì)于同步groundPrimitive,必須調(diào)用groundPrimitive.InitializerRainHeights()并等待返回的Promise解析。
  • DeveloperError : 所有實(shí)例幾何必須具有相同的PrimitiveType。
  • DeveloperError : 外觀和材料有一個(gè)統(tǒng)一的名稱。
主站蜘蛛池模板: 日日夜夜综合网 | 国产午夜性春猛交xxxx公交车 | 日韩和欧美的一区二区 | 78成人天堂久久成人 | 精品亚洲91| 在线视频亚洲 | 色视频在线观看视频 | 久久久久久久久久久久久久久伊免 | 97婷婷狠狠成为人免费视频 | 天天操操 | av男人的天堂在线观看 | 成人影院一区二区三区 | 久久综合99| 国产一区二区三区四区无人区 | 国产区视频在线播放 | 少妇一级淫片免费 | 中文字幕.com | 黄页大全在线观看 | 成人免费毛片片v | 国产天堂网| 99精品在 | 久久精品一二区 | 蜜桃视频在线观看视频 | 亚洲日本va中文字幕 | 中文字幕精品一区 | 免费成人短视频 | 免费成人国产 | 99精品网站 | 免费在线日本 | 成人夜视频 | 亚洲激情视频网站 | 18涩涩午夜精品.www | 午夜精品一区二区三区在线播放 | 2021最新热播中文字幕-第1页-看片视频 2022精品国偷自产免费观看 | 亚洲久操 | 亚洲在线视频观看 | 欧美在线一级片 | 欧美亚洲日本国产 | 国产一区二区三区四区无人区 | 亚洲黄色在线看 | 特一级一性一交一视一频 |