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

Geometry

一種幾何表示法,具有構(gòu)成頂點(diǎn)的屬性和定義基元的可選索引數(shù)據(jù)。幾何圖形和描述陰影的Appearance可分配給Primitive進(jìn)行可視化。APrimitive可以從許多異構(gòu)(在許多情況下)幾何結(jié)構(gòu)中創(chuàng)建,以提高性能。

幾何圖形可以使用GeometryPipeline中的函數(shù)進(jìn)行轉(zhuǎn)換和優(yōu)化。

new Geometry(options)
Parameters:
options (Object)
Name Description
options.attributes
GeometryAttributes
組成幾何體頂點(diǎn)的屬性。
options.primitiveType
PrimitiveType
default PrimitiveType.TRIANGLES
幾何體中基本體的類型。
options.indices
(Uint16Array | Uint32Array)
用于確定幾何體中基本體的可選索引數(shù)據(jù)。
options.boundingSphere
BoundingSphere
完全包圍幾何體的可選邊界球體。
Example
// Create geometry with a position attribute and indexed lines.
var positions = new Float64Array([
  0.0, 0.0, 0.0,
  7500000.0, 0.0, 0.0,
  0.0, 7500000.0, 0.0
]);

var geometry = new bmgl.Geometry({
  attributes : {
    position : new bmgl.GeometryAttribute({
      componentDatatype : bmgl.ComponentDatatype.DOUBLE,
      componentsPerAttribute : 3,
      values : positions
    })
  },
  indices : new Uint16Array([0, 1, 1, 2, 2, 0]),
  primitiveType : bmgl.PrimitiveType.LINES,
  boundingSphere : bmgl.BoundingSphere.fromVertices(positions)
});
See:

Members

attributes : GeometryAttributes

組成幾何體頂點(diǎn)的屬性。此對(duì)象中的每個(gè)屬性對(duì)應(yīng)于包含屬性數(shù)據(jù)的GeometryAttribute

屬性始終不交錯(cuò)存儲(chǔ)在幾何圖形中。

有保留的具有眾所周知語義的屬性名。以下屬性由幾何圖形創(chuàng)建(取決于提供的VertexFormat)。

  • position-三維頂點(diǎn)位置。64位浮點(diǎn)(用于精度)。每個(gè)屬性3個(gè)組件。見VertexFormat#position.
  • normal-正常(標(biāo)準(zhǔn)化),通常用于照明。32位浮點(diǎn)。每個(gè)屬性3個(gè)組件。見VertexFormat#normal.
  • st-2d紋理坐標(biāo)。32位浮點(diǎn)。每個(gè)屬性2個(gè)組件。參見VertexFormat#st.
  • bitangent-位范圍(標(biāo)準(zhǔn)化),用于切線空間效果,如凹凸貼圖。32位浮點(diǎn)。每個(gè)屬性3個(gè)組件。參見VertexFormat#bitangent.
  • tangent-切線(標(biāo)準(zhǔn)化),用于切線空間效果,如凹凸貼圖。32位浮點(diǎn)。每個(gè)屬性3個(gè)組件。請(qǐng)參見VertexFormat#tangent

以下屬性名稱通常不是由幾何體創(chuàng)建的,而是由PrimitiveGeometryPipeline函數(shù)添加到幾何體以準(zhǔn)備渲染幾何體。

  • {position3DHigh-編碼64位位置用GeometryPipeline.encodeAttribute計(jì)算的高32位。32位浮點(diǎn)。每個(gè)屬性4個(gè)組件。
  • position3DLow-編碼64位位置的低32位,用GeometryPipeline.encodeAttribute計(jì)算。32位浮點(diǎn)。每個(gè)屬性4個(gè)組件。
  • position3DHigh-使用GeometryPipeline.encodeAttribute計(jì)算的編碼64位二維(Columbus視圖)位置的高32位。32位浮點(diǎn)。每個(gè)屬性4個(gè)組件。
  • position2DLow-使用GeometryPipeline.encodeAttribute計(jì)算的編碼64位二維(哥倫布視圖)位置的低32位。32位浮點(diǎn)。每個(gè)屬性4個(gè)組件。
  • color-rgba顏色(標(biāo)準(zhǔn)化),通常從GeometryInstance#color開始。32位浮點(diǎn)。每個(gè)屬性4個(gè)組件。
  • pickColor-用于拾取的rgba顏色。32位浮點(diǎn)。每個(gè)屬性4個(gè)組件。

Default Value: undefined
See:
Example:
geometry.attributes.position = new bmgl.GeometryAttribute({
  componentDatatype : bmgl.ComponentDatatype.FLOAT,
  componentsPerAttribute : 3,
  values : new Float32Array(0)
});

boundingSphere : BoundingSphere

完全包圍幾何體的可選邊界球體。這通常用于剔除。
Default Value: undefined

indices : Array

可選索引數(shù)據(jù),與Geometry#primitiveType一起確定幾何體中的基本體。
Default Value: undefined

primitiveType : PrimitiveType

幾何體中基本體的類型。這通常是PrimitiveType.TRIANGLES,但可以根據(jù)特定的幾何圖形變化。
Default Value: undefined

Methods

(static) computeNumberOfVertices(geometry) → {Number}
計(jì)算幾何體中的頂點(diǎn)數(shù)。運(yùn)行時(shí)相對(duì)于頂點(diǎn)中的屬性數(shù)是線性的,而不是頂點(diǎn)數(shù)。
Parameters:
geometry (Geometry) 幾何圖形。
Example
var numVertices = bmgl.Geometry.computeNumberOfVertices(geometry);
主站蜘蛛池模板: 超碰久草| 黄色成人在线观看 | 国产乱码精品一区二区三 | 男人的天堂av网站 | 天堂网在线视频观看 | 免费一级毛毛片 | 91网站免费视频 | av大片免费在线观看 | 欧美日韩免费视频 | 亚洲日本视频 | 日本三级在线观看网站 | www亚洲国产| 亚洲欧美在线视频观看 | 日本wwwxxx | 黄色成人在线观看 | 2019亚洲男人天堂 | 欧美视频免费在线观看 | 成人午夜网 | 黄色软件链接下载 | 欧美在线综合 | 精品成人免费视频 | 日韩精品中文在线 | 最新国产毛片 | 黄色软件app下载安装 | 三级毛片在线免费观看 | 久久艹这里只有精品 | 久久精品国产清自在天天线 | 午夜视频网站在线观看 | 日韩小视频在线播放 | 日韩欧美高清在线观看 | 亚洲一区二区电影 | av三级毛片| 亚州高清 | 欧美精品一区二区在线播放 | 久久久九| www.国产在线视频 | 久久精品视频观看 | 免费一区二区三区四区 | 免费三级电影网站 | 日本不卡一区二区三区四区 | 伦理片朋友的妈妈 |