- 
    
    
        
        staticSuperMap3D.IndexDatatype.createTypedArray(numberOfVertices, indicesLengthOrArray) → Uint16Array|Uint32Array
        
    
     
    
 
- 
    
    
        创建一个存储索引的类型数组,使用或Uint32Array取决于顶点的数量。
    
    
    
    
    
    
        
    
    
        
        | Name | 
        
        Type | 
        
        Description | 
    
    
    
    
        
            
                numberOfVertices | 
            
            
            
                
Number
            
             | 
            
            
            
                索引将引用的顶点数。 | 
        
    
        
            
                indicesLengthOrArray | 
            
            
            
                
Number
|
Array
            
             | 
            
            
            
                传递给类型化数组构造函数。 | 
        
    
    
    
    
    
    
    
    
    Returns:
    
            
    Uint16Array或Uint32Array用indicesLengthOrArray构造。
        
    
    
    
    
    
    
    
    
    
    
    
    
        Example:
        
    this.indices = SuperMap3D.IndexDatatype.createTypedArray(positions.length / 3, numberOfIndices);
    
    
    
    
    
 
        
            
- 
    
    
        
        staticSuperMap3D.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和length构造。
        
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
 
        
            
- 
    
    
        
        staticSuperMap3D.IndexDatatype.fromSizeInBytes(sizeInBytes) → IndexDatatype
        
    
     
    
 
- 
    
    
        获取给定大小(以字节为单位)的数据类型。
    
    
    
    
    
    
        
    
    
        
        | Name | 
        
        Type | 
        
        Description | 
    
    
    
    
        
            
                sizeInBytes | 
            
            
            
                
Number
            
             | 
            
            
            
                单个索引的大小,以字节为单位。 | 
        
    
    
    
    
    
    
    
    
    Returns:
    
            
    给定大小的索引数据类型。
        
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
 
        
            
- 
    
    
        
        staticSuperMap3D.IndexDatatype.fromTypedArray(array) → IndexDatatype
        
    
     
    
 
- 
    
    
    
    
    
    
    
        
    
    
        
        | Name | 
        
        Type | 
        
        Description | 
    
    
    
    
        
            
                array | 
            
            
            
                
Uint8Array
|
Uint16Array
|
Uint32Array
            
             | 
            
            
            
                类型化数组。 | 
        
    
    
    
    
    
    
    
    
    Returns:
    
            
    提供的数组的IndexDatatype,如果数组不是Uint8Array、Uint16Array或Uint32Array,则未定义。
        
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
 
        
            
- 
    
    
        
        staticSuperMap3D.IndexDatatype.getSizeInBytes(indexDatatype) → Number
        
    
     
    
 
- 
    
    
        返回相应数据类型的大小(以字节为单位)。
    
    
    
    
    
    
        
    
    
    
    
    
    
    Returns:
    
            
    以字节为单位的大小。
        
    
    
    
    
    
    
    
    
    
    
    
    
        Example:
        
    // Returns 2
var size = SuperMap3D.IndexDatatype.getSizeInBytes(SuperMap3D.IndexDatatype.UNSIGNED_SHORT);
    
    
    
    
    
 
        
            
- 
    
    
        
        staticSuperMap3D.IndexDatatype.validate(indexDatatype) → Boolean
        
    
     
    
 
- 
    
    
    
    
    
    
    
        
    
    
    
    
    
    
    
Returns:
    
            
    如果提供的索引数据类型是有效值,则为 true;否则为 false
        
    
    
    
    
    
    
    
    
    
    
    
    
        Example:
        
    if (!SuperMap3D.IndexDatatype.validate(indexDatatype)) {
  throw new SuperMap3D.DeveloperError('indexDatatype must be a valid value.');
}