main.cesium.Cesium3DTileContent.kt Maven / Gradle / Ivy
The newest version!
// Automatically generated - do not modify!
@file:JsModule("cesium")
package cesium
/**
* The content of a tile in a [Cesium3DTileset].
*
* Derived classes of this interface provide access to individual features in the tile.
* Access derived objects through [Cesium3DTile.content].
*
* This type describes an interface and is not intended to be instantiated directly.
* @see Online Documentation
*/
abstract external class Cesium3DTileContent {
/**
* Gets the number of features in the tile.
* @see Online Documentation
*/
abstract val featuresLength: Int
/**
* Gets the number of points in the tile.
*
* Only applicable for tiles with Point Cloud content. This is different than [Cesium3DTileContent.featuresLength] which
* equals the number of groups of points as distinguished by the `BATCH_ID` feature table semantic.
* @see Online Documentation
*/
abstract val pointsLength: Int
/**
* Gets the number of triangles in the tile.
* @see Online Documentation
*/
abstract val trianglesLength: Int
/**
* Gets the tile's geometry memory in bytes.
* @see Online Documentation
*/
abstract val geometryByteLength: Int
/**
* Gets the tile's texture memory in bytes.
* @see Online Documentation
*/
abstract val texturesByteLength: Int
/**
* Gets the amount of memory used by the batch table textures, in bytes.
* @see Online Documentation
*/
abstract val batchTableByteLength: Int
/**
* Gets the array of [Cesium3DTileContent] objects for contents that contain other contents, such as composite tiles. The inner contents may in turn have inner contents, such as a composite tile that contains a composite tile.
* @see Online Documentation
*/
abstract val innerContents: Array
/**
* Gets the promise that will be resolved when the tile's content is ready to render.
* @see Online Documentation
*/
abstract val readyPromise: kotlin.js.Promise
/**
* Gets the tileset for this tile.
* @see Online Documentation
*/
abstract val tileset: Cesium3DTileset
/**
* Gets the tile containing this content.
* @see Online Documentation
*/
abstract val tile: Cesium3DTile
/**
* Gets the url of the tile's content.
* @see Online Documentation
*/
abstract val url: String
/**
* Returns whether the feature has this property.
* @param [batchId] The batchId for the feature.
* @param [name] The case-sensitive name of the property.
* @return `true` if the feature has this property; otherwise, `false`.
* @see Online Documentation
*/
abstract fun hasProperty(
batchId: Int,
name: String,
): Boolean
/**
* Returns the [Cesium3DTileFeature] object for the feature with the
* given `batchId`. This object is used to get and modify the
* feature's properties.
*
* Features in a tile are ordered by `batchId`, an index used to retrieve their metadata from the batch table.
* @param [batchId] The batchId for the feature.
* @return The corresponding [Cesium3DTileFeature] object.
* @see Online Documentation
*/
abstract fun getFeature(batchId: Int): Cesium3DTileFeature
}