Members
      与
      
     
       UNSIGNED_BYTE
      
      和类型相对应的8位无符号字节
      
       Uint8Array
      
      中的元素的元素。
     
      与
      
     
       UNSIGNED_INT
      
      和类型相对应的32位无符号整数
      
       Uint32Array
      
      中的元素的元素。
     
      与
      
     
       UNSIGNED_SHORT
      
      和类型相对应的16位无符号缩写
      
       Uint16Array
      
      中的元素的元素。
     Methods
static Cesium.IndexDatatype.createTypedArray (numberOfVertices, indicesLengthOrArray) → Uint16Array|Uint32Array
      使用
      
     
       
        创建一个存储索引的类型化数组或
        
         Uint32Array
        
        取决于顶点的数量。
        
      
     | Name | Type | Description | 
|---|---|---|
| 
          numberOfVertices
          | Number | 索引将引用的顶点数。 | 
| 
          indicesLengthOrArray
          | Number | Array | 传递给类型数组构造器。 | 
Returns:
   一种
   
 
     
    Uint16Array
   
   要么
   
    Uint32Array
   
   用
   
    indexLengthOrArray
   
   。
  Example:
this.indices = Cesium.IndexDatatype.createTypedArray(positions.length / 3, numberOfIndices);static Cesium.IndexDatatype.createTypedArrayFromArrayBuffer (numberOfVertices, sourceArray, byteOffset, length) → Uint16Array|Uint32Array
      从源数组缓冲区创建类型化数组。生成的类型化数组将使用
      
     
       
        存储索引或
        
         Uint32Array
        
        取决于顶点的数量。
        
      
     | Name | Type | Description | 
|---|---|---|
| 
          numberOfVertices
          | Number | 索引将引用的顶点数。 | 
| 
          sourceArray
          | ArrayBuffer | 传递给类型数组构造器。 | 
| 
          byteOffset
          | Number | 传递给类型数组构造器。 | 
| 
          length
          | Number | 传递给类型数组构造器。 | 
Returns:
   一种
   
 
     
    Uint16Array
   
   要么
   
    Uint32Array
   
   用
   
    sourceArray
   
   ,
   
    byteOffset
   
   和
   
    长度
   
   。
  static Cesium.IndexDatatype.fromSizeInBytes (sizeInBytes) → IndexDatatype
      获取具有给定大小(以字节为单位)的数据类型。
     
     | Name | Type | Description | 
|---|---|---|
| 
          sizeInBytes
          | Number | 单个索引的大小(以字节为单位)。 | 
Returns:
   具有给定大小的索引数据类型。
  
 
     
      返回相应数据类型的大小(以字节为单位)。
     
     | Name | Type | Description | 
|---|---|---|
| 
          indexDatatype
          | IndexDatatype | 要获取其大小的索引数据类型。 | 
Returns:
   大小(以字节为单位)。
  
 
     Example:
// Returns 2
var size = Cesium.IndexDatatype.getSizeInBytes(Cesium.IndexDatatype.UNSIGNED_SHORT);
      验证提供的索引数据类型是有效的
      
       
     
        IndexDatatype
       
      
      。
     | Name | Type | Description | 
|---|---|---|
| 
          indexDatatype
          | IndexDatatype | 要验证的索引数据类型。 | 
Returns:
    真正
   
   如果提供的索引数据类型是有效值;除此以外,
   
    假
   
   。
  Example:
if (!Cesium.IndexDatatype.validate(indexDatatype)) {
  throw new Cesium.DeveloperError('indexDatatype must be a valid value.');
}