| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- import destroyObject from "../Core/destroyObject.js";
-
- /**
- * Represents content for a tile in a
- * {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification|3D Tiles} tileset whose
- * content points to another 3D Tiles tileset.
- * <p>
- * Implements the {@link Cesium3DTileContent} interface.
- * </p>
- *
- * @implements Cesium3DTileContent
- * @private
- */
- class Tileset3DTileContent {
- constructor(tileset, tile, resource) {
- this._tileset = tileset;
- this._tile = tile;
- this._resource = resource;
-
- this.featurePropertiesDirty = false;
-
- this._metadata = undefined;
- this._group = undefined;
-
- this._ready = false;
- }
-
- get featuresLength() {
- return 0;
- }
-
- get pointsLength() {
- return 0;
- }
-
- get trianglesLength() {
- return 0;
- }
-
- get geometryByteLength() {
- return 0;
- }
-
- get texturesByteLength() {
- return 0;
- }
-
- get batchTableByteLength() {
- return 0;
- }
-
- get innerContents() {
- return undefined;
- }
-
- /**
- * Returns true when the tile's content is ready to render; otherwise false
- *
- *
- * @type {boolean}
- * @readonly
- * @private
- */
- get ready() {
- return this._ready;
- }
-
- get tileset() {
- return this._tileset;
- }
-
- get tile() {
- return this._tile;
- }
-
- get url() {
- return this._resource.getUrlComponent(true);
- }
-
- get batchTable() {
- return undefined;
- }
-
- get metadata() {
- return this._metadata;
- }
-
- set metadata(value) {
- this._metadata = value;
- }
-
- get group() {
- return this._group;
- }
-
- set group(value) {
- this._group = value;
- }
-
- /**
- * Creates an instance of Tileset3DTileContent from a parsed JSON object
- * @param {Cesium3DTileset} tileset
- * @param {Cesium3DTile} tile
- * @param {Resource} resource
- * @param {object} json
- * @returns {Tileset3DTileContent}
- */
- static fromJson(tileset, tile, resource, json) {
- const content = new Tileset3DTileContent(tileset, tile, resource);
- content._tileset.loadTileset(content._resource, json, content._tile);
- content._ready = true;
-
- return content;
- }
-
- /**
- * Part of the {@link Cesium3DTileContent} interface. <code>Tileset3DTileContent</code>
- * always returns <code>false</code> since a tile of this type does not have any features.
- */
- hasProperty(batchId, name) {
- return false;
- }
-
- /**
- * Part of the {@link Cesium3DTileContent} interface. <code>Tileset3DTileContent</code>
- * always returns <code>undefined</code> since a tile of this type does not have any features.
- */
- getFeature(batchId) {
- return undefined;
- }
-
- applyDebugSettings(enabled, color) {}
- applyStyle(style) {}
- update(tileset, frameState) {}
-
- pick(ray, frameState, result) {
- return undefined;
- }
-
- isDestroyed() {
- return false;
- }
-
- destroy() {
- return destroyObject(this);
- }
- }
-
- export default Tileset3DTileContent;
|