new Cesium.Cesium3DTilesVoxelProvider(options)

A VoxelProvider that fetches voxel data from a 3D Tiles tileset.

Implements the VoxelProvider interface.

此天体通常不直接即时化,使用 Cesium3DTilesVoxelProvider.fromUrl .
Name Type Description
options Cesium3DTilesVoxelProvider.ConstructorOptions 描述初始化选项的对象
Experimental

This feature is not final and is subject to change without Cesium's standard deprecation policy.

See:

Extends

Members

readonly availableLevels : number|undefined

砖块中包含可用瓦片的详细级数.

readonly className : string

此瓷砖的元数据类 .

readonly componentTypes : Array.<MetadataComponentType>

获取元数据组件类型.

readonly dimensions : Cartesian3

获得瓦片每维的 Voxel 数 。 这对数据集中的所有瓷砖都是一样的.

readonly globalTransform : Matrix4

从局部空间向全球空间的转变.
Default Value: Matrix4.IDENTITY

readonly maxBounds : Cartesian3|undefined

获得最大极限. 如果未定义,则将使用形状的默认最大界限.

readonly maximumTileCount : number|undefined

此提供者的最大牌数 . 此值被用作对 voxel 渲染器的提示, 用于分配 NT % 0 内存 . 如果未知此值, 则无法定义 .

readonly maximumValues : Array.<Array.<number>>|undefined

获取元数据最大值.

readonly minBounds : Cartesian3|undefined

得到最小界限. 如果未定义, 则将使用形状的默认最小界限 .

readonly minimumValues : Array.<Array.<number>>|undefined

获得元数据最小值.

readonly names : Array.<string>

获取元数据名称 .

readonly paddingAfter : Cartesian3

获得瓦片之后的粘贴瓶数 。 这在取样瓷砖边缘时提高了渲染质量,但增加了内存的使用.
Default Value: Cartesian3.ZERO

readonly paddingBefore : Cartesian3

在瓦片之前获得粘贴瓶的数量。 这在取样瓷砖边缘时提高了渲染质量,但增加了内存的使用.
Default Value: Cartesian3.ZERO

readonly shape : VoxelShapeType

Gets the VoxelShapeType

readonly shapeTransform : Matrix4

从形状空间转变为局部空间.
Default Value: Matrix4.IDENTITY

readonly types : Array.<MetadataType>

获取元数据类型.

Methods

static Cesium.Cesium3DTilesVoxelProvider.fromUrl(url)Promise.<Cesium3DTilesVoxelProvider>

Creates a Cesium3DTilesVoxelProvider that fetches voxel data from a 3D Tiles tileset.
Name Type Description
url Resource | string 将 URL 到 JSON 文件
Returns:
创建的提供者
Throws:
  • RuntimeException : Root must have content
  • RuntimeException : Root tile content must have 3DTILES_content_voxels extension
  • RuntimeException : Root tile must have implicit tiling
  • RuntimeException : Tileset must have a metadata schema
  • RuntimeException : Only box, region and 3DTILES_bounding_volume_cylinder are supported in Cesium3DTilesVoxelProvider
Example:
try {
  const voxelProvider = await Cesium3DTilesVoxelProvider.fromUrl(
    "http://localhost:8002/tilesets/voxel/tileset.json"
  );
  const voxelPrimitive = new VoxelPrimitive({
    provider: voxelProvider,
    customShader: customShader,
  });
  scene.primitives.add(voxelPrimitive);
} catch (error) {
  console.error(`Error creating voxel primitive: ${error}`);
}
See:

requestData(options)Promise.<VoxelContent>|undefined

请求给定的瓦片的数据 .
Name Type Description
options object optional 下列属性的对象 :
Name Type Default Description
tileLevel number 0 optional The tile's level.
tileX number 0 optional The tile's X coordinate.
tileY number 0 optional The tile's Y coordinate.
tileZ number 0 optional The tile's Z coordinate.
Returns:
向 VoxelContent 解析包含瓷砖数据的承诺, 如果请求无法安排此框架, 则未定义 .

Type Definitions

Cesium.Cesium3DTilesVoxelProvider.ConstructorOptions

铯3DTILES Voxel 制造器的初始化选项
Properties:
Name Type Attributes Default Description
className string 平面图中描述 voxel 元数据的类.
names Array.<string> 元数据名称.
types Array.<MetadataType> 元数据类型.
componentTypes Array.<MetadataComponentType> 元数据组件类型.
shape VoxelShapeType The VoxelShapeType.
dimensions Cartesian3 瓦片每维的花瓶数量. 这对数据集中的所有瓷砖都是一样的.
paddingBefore Cartesian3 <optional>
Cartesian3.ZERO The number of padding voxels before the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage.
paddingAfter Cartesian3 <optional>
Cartesian3.ZERO The number of padding voxels after the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage.
globalTransform Matrix4 <optional>
Matrix4.IDENTITY A transform from local space to global space.
shapeTransform Matrix4 <optional>
Matrix4.IDENTITY A transform from shape space to local space.
minBounds Cartesian3 <optional>
最小界限.
maxBounds Cartesian3 <optional>
最大界限.
minimumValues Array.<Array.<number>> <optional>
元数据最低值.
maximumValues Array.<Array.<number>> <optional>
元数据最大值 .
maximumTileCount number <optional>
此提供者的最大牌数 。 此值被用作对 voxel 渲染器的提示, 用于分配 NT % 0 内存 。 如果未知此值, 则无法定义 .
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.