itowns
Version:
A JS/WebGL framework for 3D geospatial data visualization
47 lines (46 loc) • 1.8 kB
TypeScript
import * as THREE from 'three';
import { GpuBufferAttributes, TileBuilder, TileBuilderParams } from '../Core/Prefab/TileBuilder';
import { Extent } from '@itowns/geographic';
import { LRUCache } from 'lru-cache';
import OBB from '../Renderer/OBB';
export declare class TileGeometry extends THREE.BufferGeometry {
/** Oriented Bounding Box of the tile geometry. */
OBB: OBB | null;
/** Ground area covered by this tile geometry. */
extent: Extent;
/** Resolution of the tile geometry in segments per side. */
segments: number;
/**
* [TileGeometry] instances are shared between tiles. Since a geometry
* handles its own GPU resource, it needs a reference counter to dispose of
* that resource only when it is discarded by every single owner of a
* reference to the geometry.
*/
private _refCount;
constructor(builder: TileBuilder<TileBuilderParams>, params: TileBuilderParams, bufferAttributes?: GpuBufferAttributes);
/**
* Enables or disables skirt rendering.
*
* @param toggle - Whether to hide the skirt; true hides, false shows.
*/
set hideSkirt(toggle: boolean);
/**
* Initialize reference count for this geometry if it is currently null.
*
* @param cacheTile - The [Cache] used to store this geometry.
* @param keys - The [south, level, epsg] key of this geometry.
*/
initRefCount(cacheTile: LRUCache<string, Promise<TileGeometry>>, key: string): void;
/**
* Increase reference count.
*
* @throws If reference count has not been initialized.
*/
increaseRefCount(): void;
/**
* The current reference count of this [TileGeometry] if it has been
* initialized.
*/
get refCount(): number | undefined;
dispose(): void;
}