婷婷久久网-婷婷久久久久-婷婷久久久-婷婷久-国产微拍精品一区-国产网址在线观看

GeometryInstanceAttribute

每個實例幾何圖形屬性的值和類型信息。
new GeometryInstanceAttribute(options)
Parameters:
options (Object)
Name Description
options.componentDatatype
ComponentDatatype
屬性中每個組件的數據類型,例如值中的單個元素。
options.componentsPerAttribute
Number
一個介于1和4之間的數字,用于定義屬性中組件的數量。
options.normalize
Boolean
default false
truecomponentDatatype為整數格式時,表示當組件作為浮點進行渲染訪問時,應將它們映射到范圍[0,1](無符號)或[-1,1](有符號)中。
options.value
Array.<Number>
屬性的值。
Example
var instance = new bmgl.GeometryInstance({
  geometry : bmgl.BoxGeometry.fromDimensions({
    dimensions : new bmgl.Cartesian3(1000000.0, 1000000.0, 500000.0)
  }),
  modelMatrix : bmgl.Matrix4.multiplyByTranslation(bmgl.Transforms.eastNorthUpToFixedFrame(
    bmgl.Cartesian3.fromDegrees(0.0, 0.0)), new bmgl.Cartesian3(0.0, 0.0, 1000000.0), new bmgl.Matrix4()),
  id : 'box',
  attributes : {
    color : new bmgl.GeometryInstanceAttribute({
      componentDatatype : bmgl.ComponentDatatype.UNSIGNED_BYTE,
      componentsPerAttribute : 4,
      normalize : true,
      value : [255, 255, 0, 255]
    })
  }
});
Throws
  • DeveloperError : options.componentsPerAttribute必須介于1和4之間。
See:

Members

componentDatatype : ComponentDatatype

屬性中每個組件的數據類型,例如GeometryInstanceAttribute#value中的單個元素。
Default Value: undefined

componentsPerAttribute : Number

一個介于1和4之間的數字,用于定義屬性中組件的數量。例如,具有x、y和z組件的位置屬性將有3個,如代碼示例所示。
Default Value: undefined
Example:
show : new bmgl.GeometryInstanceAttribute({
  componentDatatype : bmgl.ComponentDatatype.UNSIGNED_BYTE,
  componentsPerAttribute : 1,
  normalize : true,
  value : [1.0]
})

normalize : Boolean

truecomponentDatatype為整數格式時,表示當組件作為浮點進行渲染訪問時,應將它們映射到范圍[0,1](無符號)或[-1,1](有符號)中。

這通常在使用ComponentDatatype.UNSIGNED_BYTE存儲顏色時使用。

Default Value: false
Example:
attribute.componentDatatype = bmgl.ComponentDatatype.UNSIGNED_BYTE;
attribute.componentsPerAttribute = 4;
attribute.normalize = true;
attribute.value = [
  bmgl.Color.floatToByte(color.red),
  bmgl.Color.floatToByte(color.green),
  bmgl.Color.floatToByte(color.blue),
  bmgl.Color.floatToByte(color.alpha)
];

value : Array.<Number>

存儲在類型化數組中的屬性值。在代碼示例中,values中的每三個元素定義一個屬性,因為componentsPerAttribute為3。
Default Value: undefined
Example:
show : new bmgl.GeometryInstanceAttribute({
  componentDatatype : bmgl.ComponentDatatype.UNSIGNED_BYTE,
  componentsPerAttribute : 1,
  normalize : true,
  value : [1.0]
})
主站蜘蛛池模板: 性视频播放| 伦理电影在线看| 韩国xxxxxxxxxxxx| 森林运动会作文三年级300字| 杨晓宁| 陈芷琰演过哪些电视剧名字| 第一财经现场直播| 我落泪情绪零碎周杰伦歌词| 直播一级片| 13名妓| 金装维尔梅| 五年级语文下册| 佐藤蓝子| 飞鸭向前冲| 珠帘玉幕剧情介绍| 奶奶的星星| 美绪电影主演的电影| 18岁在线观看| 浙江卫视周一至周五节目表| 新贵妃醉酒简谱| 闺蜜心窍 电影| 热带夜电影| 老司机免费看视频| 女神宿舍管理君动漫| qq经典声音| 无耻之徒阿曼达| 绿雾影视| hellokitty壁纸| 向着胜利前进演员表| 发现一个神奇的定胆方法| 安志杰电影全集大全| 迷宫1意大利劳尔| 许多组织都有自己的价值标准和行为理念| 叫床mp3| 李道新| 二年级我是谁课文| 吴京电影全集完整版喜剧| 五月天丁香婷婷| 韧战作文800字初中| 宁死不屈电影免费观看| 日本xxww|