# Cesium3DTilesVoxelProvider

#### new Cesium.Cesium3DTilesVoxelProvider(options)
engine/Source/Scene/Cesium3DTilesVoxelProvider.js 47

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

Implements the `VoxelProvider` interface.

This object is normally not instantiated directly, use `Cesium3DTilesVoxelProvider.fromUrl`.

Name | Type | Description
--- | --- | ---
`options` | object | Object with the following properties:

##### Experimental

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

##### See:

- Cesium3DTilesVoxelProvider.fromUrl
- VoxelProvider
- VoxelPrimitive
- VoxelShapeType

### Extends

- VoxelProvider

### Members

#### readonly componentTypes : Array.<MetadataComponentType>
engine/Source/Scene/VoxelProvider.js 149

Gets the metadata component types. This should not be called before `VoxelProvider#ready` returns true.

Inherited From:
  - VoxelProvider#componentTypes

#### readonly dimensions : Cartesian3
engine/Source/Scene/VoxelProvider.js 89

Gets the number of voxels per dimension of a tile. This is the same for all tiles in the dataset. This should not be called before `VoxelProvider#ready` returns true.

Inherited From:
  - VoxelProvider#dimensions

#### readonly globalTransform : Matrix4|undefined
engine/Source/Scene/VoxelProvider.js 28

A transform from local space to global space. If undefined, the identity matrix will be used instead.

Inherited From:
  - VoxelProvider#globalTransform

#### readonly maxBounds : Cartesian3|undefined
engine/Source/Scene/VoxelProvider.js 77

Gets the maximum bounds. If undefined, the shape's default maximum bounds will be used instead. This should not be called before `VoxelProvider#ready` returns true.

Inherited From:
  - VoxelProvider#maxBounds

#### readonly maximumTileCount : number|undefined
engine/Source/Scene/VoxelProvider.js 185

The maximum number of tiles that exist for this provider. This value is used as a hint to the voxel renderer to allocate an appropriate amount of GPU memory. If this value is not known it can be undefined. This should not be called before `VoxelProvider#ready` returns true.

Inherited From:
  - VoxelProvider#maximumTileCount

#### readonly maximumValues : Array.<Array.<number>>|undefined
engine/Source/Scene/VoxelProvider.js 173

Gets the metadata maximum values. This should not be called before `VoxelProvider#ready` returns true.

Inherited From:
  - VoxelProvider#maximumValues

#### readonly minBounds : Cartesian3|undefined
engine/Source/Scene/VoxelProvider.js 64

Gets the minimum bounds. If undefined, the shape's default minimum bounds will be used instead. This should not be called before `VoxelProvider#ready` returns true.

Inherited From:
  - VoxelProvider#minBounds

#### readonly minimumValues : Array.<Array.<number>>|undefined
engine/Source/Scene/VoxelProvider.js 161

Gets the metadata minimum values. This should not be called before `VoxelProvider#ready` returns true.

Inherited From:
  - VoxelProvider#minimumValues

#### readonly names : Array.<string>
engine/Source/Scene/VoxelProvider.js 125

Gets the metadata names. This should not be called before `VoxelProvider#ready` returns true.

Inherited From:
  - VoxelProvider#names

#### readonly paddingAfter : Cartesian3|undefined
engine/Source/Scene/VoxelProvider.js 113

Gets the number of padding voxels after the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage. This should not be called before `VoxelProvider#ready` returns true.

Inherited From:
  - VoxelProvider#paddingAfter

#### readonly paddingBefore : Cartesian3|undefined
engine/Source/Scene/VoxelProvider.js 101

Gets the number of padding voxels before the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage. This should not be called before `VoxelProvider#ready` returns true.

Inherited From:
  - VoxelProvider#paddingBefore

#### readonly shape : VoxelShapeType
engine/Source/Scene/VoxelProvider.js 51

Gets the `VoxelShapeType` This should not be called before `VoxelProvider#ready` returns true.

Inherited From:
  - VoxelProvider#shape

#### readonly shapeTransform : Matrix4|undefined
engine/Source/Scene/VoxelProvider.js 39

A transform from shape space to local space. If undefined, the identity matrix will be used instead.

Inherited From:
  - VoxelProvider#shapeTransform

#### readonly types : Array.<MetadataType>
engine/Source/Scene/VoxelProvider.js 137

Gets the metadata types. This should not be called before `VoxelProvider#ready` returns true.

Inherited From:
  - VoxelProvider#types

### Methods

#### static Cesium.Cesium3DTilesVoxelProvider.fromUrl(url) → Promise.<Cesium3DTilesVoxelProvider>
engine/Source/Scene/Cesium3DTilesVoxelProvider.js 108

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

Name | Type | Description
--- | --- | ---
`url` | Resource | string | The URL to a tileset JSON file

##### Returns:

The created provider

##### 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

#### requestData(options) → Promise.<Array.<Array>>|undefined
engine/Source/Scene/VoxelProvider.js 229

Requests the data for a given tile. The data is a flattened 3D array ordered by X, then Y, then Z. This function should not be called before `VoxelProvider#ready` returns true.

Name | Type | Description
--- | --- | ---
`options` | object | optional Object with the following properties:
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:

A promise to an array of typed arrays containing the requested voxel data or undefined if there was a problem loading the data.

Inherited From:
  - VoxelProvider#requestData

Need help? The fastest way to get answers is from the community and team on the Cesium Forum.