Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove internal tile APIs from core-frontend package exports #7673

Merged
merged 14 commits into from
Feb 8, 2025
1,786 changes: 11 additions & 1,775 deletions common/api/core-frontend.api.md

Large diffs are not rendered by default.

123 changes: 0 additions & 123 deletions common/api/summary/core-frontend.exports.csv

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@itwin/core-frontend",
"comment": "",
"type": "none"
}
],
"packageName": "@itwin/core-frontend"
}
45 changes: 44 additions & 1 deletion core/frontend/src/core-frontend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,50 @@ export type {
TxnEntityMetadata,
TxnEntityMetadataCriterion,
} from "./TxnEntityChanges";
export * from "./tile/internal";
export {
type TileTreeDiscloser, DisclosedTileTreeSet,
type ReadGltfGraphicsArgs, type GltfGraphic, type GltfTemplate, readGltfGraphics, readGltfTemplate, readGltf,
readElementGraphics,
type BatchTableProperties, RealityTileTree,
type RealityTileGeometry, RealityTile,
type RenderGraphicTileTreeArgs,
type GpuMemoryLimit, type GpuMemoryLimits, TileAdmin,
type TileContent,
type TiledGraphicsProvider,
type TileDrawArgParams, TileDrawArgs,
type CollectTileStatus, type TileGeometryCollectorOptions, TileGeometryCollector, type GeometryTileTreeReference,
type TileParams,
TileRequestChannels,
type TileContentDecodingStatistics, TileRequestChannelStatistics, TileRequestChannel,
TileRequest,
type TileTreeOwner,
type TileTreeParams,
TileGraphicType, TileTreeReference,
type TileTreeSupplier,
TileTreeLoadStatus, TileTree,
Tile, TileLoadStatus, TileVisibility, TileLoadPriority, TileBoundingBoxes,
TileUsageMarker,
TileUser,
BingElevationProvider,
QuadId,
MapTilingScheme, GeographicTilingScheme, WebMercatorProjection, WebMercatorTilingScheme,
type MapLayerIndex,
MapTileProjection, MapTile,
MapLayerTileTreeReference,
MapLayerSourceStatus, type MapLayerSourceProps, MapLayerSource, MapLayerSources,
MapLayerImageryProviderStatus, MapLayerImageryProvider,
ImageryMapLayerFormat,
MapLayerFormat, type ValidateSourceArgs, type MapLayerFormatType, type MapLayerSourceValidation, type MapLayerOptions, MapLayerFormatRegistry,
type MapLayerTokenEndpoint, type MapLayerAuthenticationInfo, type MapLayerAccessToken, type MapLayerAccessTokenParams, type MapLayerAccessClient,
type MapFeatureInfoOptions, MapFeatureInfoRecord, type MapFeatureInfo, type MapLayerFeatureInfo, type MapSubLayerFeatureInfo, type MapLayerFeature, type MapLayerFeatureGeometry, type MapLayerFeatureAttribute, MapLayerFeatureRecord,
MapCartoRectangle,
ImageryMapLayerTreeReference,
EllipsoidTerrainProvider,
getCesiumAssetUrl,
MapTileTreeScaleRangeVisibility, MapTileTree,
type TerrainMeshProviderOptions, type RequestMeshDataArgs, type ReadMeshArgs, TerrainMeshProvider,
type TerrainProvider, TerrainProviderRegistry,
} from "./tile/internal";
export * from "./tools/AccuDrawTool";
export * from "./tools/AccuDrawViewportUI";
export * from "./tools/ClipViewTool";
Expand Down
35 changes: 35 additions & 0 deletions core/frontend/src/internal/cross-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,38 @@ export { PerformanceMetrics } from "./render/webgl/PerformanceMetrics";
export { type GLTimerResult, RenderDiagnostics, type RenderSystemDebugControl } from "./render/RenderSystemDebugControl";
export { formatAnimationBranchId } from "./render/AnimationBranchState";
export { PrimitiveVisibility, type RenderTargetDebugControl } from "./render/RenderTargetDebugControl";

// Used by frontend-tiles, map-layers-formats, frontend-dev-tools
export {
acquireImdlDecoder,
appendQueryParams,
ArcGisErrorCode,
ArcGisGeometryReaderJSON,
type ArcGisGetServiceJsonArgs,
ArcGISImageryProvider,
type ArcGISServiceMetadata,
ArcGisUtilities,
type ArcGisValidateSourceArgs,
createSpatialTileTreeReferences,
deflateCoordinates,
type FeatureAttributeDrivenSymbology,
FeatureGeometryBaseRenderer,
type FeatureGeometryRenderer,
FeatureGraphicsRenderer,
type FeatureSymbolizedRenderer,
type FeatureSymbologyRenderer,
GltfReader,
type GltfReaderArgs,
type GltfReaderResult,
type GraphicsGeometryRenderer,
ImageryMapTileTree,
type ImdlDecoder,
ImdlReader,
type MapLayerInfoFromTileTree,
MapTileTreeReference,
RealityModelTileUtils,
RealityTileLoader,
SpatialTileTreeReferences,
type WGS84Extent,
WmsUtilities,
} from "../tile/internal";
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,16 @@
import { ByteStream, Id64String, JsonUtils } from "@itwin/core-bentley";
import { Point3d, Transform, Vector3d } from "@itwin/core-geometry";
import { B3dmHeader, ColorDef, ElementAlignedBox3d, Feature, FeatureTable, TileReadStatus } from "@itwin/core-common";
import { IModelConnection } from "../IModelConnection";
import { Mesh } from "../common/internal/render/MeshPrimitives";
import { RenderSystem } from "../render/RenderSystem";
import { GltfDataType, GltfMeshPrimitive } from "../common/gltf/GltfSchema";
import { IModelConnection } from "../../IModelConnection";
import { Mesh } from "../../common/internal/render/MeshPrimitives";
import { RenderSystem } from "../../render/RenderSystem";
import { GltfDataType, GltfMeshPrimitive } from "../../common/gltf/GltfSchema";
import {
BatchedTileIdMap, GltfBufferData, GltfReader, GltfReaderProps, GltfReaderResult, ShouldAbortReadGltf,
} from "./internal";
} from "../../tile/internal";

/**
* Deserializes a tile in [b3dm](https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/specification/TileFormats/Batched3DModel) format.
* @internal
*/
export class B3dmReader extends GltfReader {
private _batchIdRemap = new Map<number, number>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@
*/

import { assert, Id64String } from "@itwin/core-bentley";
import { IModelConnection } from "../IModelConnection";
import { BatchTableProperties } from "./internal";
import { IModelConnection } from "../../IModelConnection";
import { BatchTableProperties } from "../../tile/internal";

/**
* Mapping between transient IDs assigned to 3D tiles "features" and batch table properties (and visa versa).
* these properties may be present in batched tile sets.
* @internal
*/
export class BatchedTileIdMap implements BatchTableProperties {
private readonly _iModel: IModelConnection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

/**
* This class provide methods used to interpret url to a cesiumIon asset (RealityDataProvider.CesiumIonAsset)
* @internal
*/
export class CesiumIonAssetProvider {
public static osmBuildingId="OSMBuildings";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ import { compareNumbers, comparePossiblyUndefined, compareStrings, compareString
import {
BatchType, ClassifierTileTreeId, iModelTileTreeIdToString, RenderMode, RenderSchedule, SpatialClassifier, ViewFlagsProperties,
} from "@itwin/core-common";
import { DisplayStyleState } from "../DisplayStyleState";
import { IModelApp } from "../IModelApp";
import { IModelConnection } from "../IModelConnection";
import { GeometricModelState } from "../ModelState";
import { SceneContext } from "../ViewContext";
import { ViewState } from "../ViewState";
import { ActiveSpatialClassifier, SpatialClassifiersState } from "../SpatialClassifiersState";
import { DisplayStyleState } from "../../DisplayStyleState";
import { IModelApp } from "../../IModelApp";
import { IModelConnection } from "../../IModelConnection";
import { GeometricModelState } from "../../ModelState";
import { SceneContext } from "../../ViewContext";
import { ViewState } from "../../ViewState";
import { ActiveSpatialClassifier, SpatialClassifiersState } from "../../SpatialClassifiersState";
import {
DisclosedTileTreeSet, IModelTileTree, iModelTileTreeParamsFromJSON, TileTree, TileTreeLoadStatus, TileTreeOwner, TileTreeReference, TileTreeSupplier,
} from "./internal";
import { _scheduleScriptReference } from "../common/internal/Symbols";
} from "../../tile/internal";
import { _scheduleScriptReference } from "../../common/internal/Symbols";

interface ClassifierTreeId extends ClassifierTileTreeId {
modelId: Id64String;
Expand Down Expand Up @@ -85,15 +85,13 @@ class ClassifierTreeSupplier implements TileTreeSupplier {

const classifierTreeSupplier = new ClassifierTreeSupplier();

/** @internal */
export abstract class SpatialClassifierTileTreeReference extends TileTreeReference {
public abstract get isPlanar(): boolean;
public abstract get activeClassifier(): ActiveSpatialClassifier | undefined;
public abstract get viewFlags(): Partial<ViewFlagsProperties>;
public get transparency(): number | undefined { return undefined; }
}

/** @internal */
class ClassifierTreeReference extends SpatialClassifierTileTreeReference {
private _id: ClassifierTreeId;
private readonly _classifiers: SpatialClassifiersState;
Expand Down Expand Up @@ -185,7 +183,6 @@ class ClassifierTreeReference extends SpatialClassifierTileTreeReference {

}

/** @internal */
export function createClassifierTileTreeReference(classifiers: SpatialClassifiersState, classifiedTree: TileTreeReference, iModel: IModelConnection, source: ViewState | DisplayStyleState): SpatialClassifierTileTreeReference {
return new ClassifierTreeReference(classifiers, classifiedTree, iModel, source);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { RealityDataFormat, RealityDataProvider } from "@itwin/core-common";

/**
* This class provide methods used to interpret url to Project Wise Context Share (RealityDataProvider.ContextShare)
* @internal
*/
export class ContextShareProvider {
/** Return true if this is a supported url to this service provider */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,15 @@ import { Range3d, Transform } from "@itwin/core-geometry";
import {
BatchType, ElementGeometryChange, ElementGraphicsRequestProps, FeatureAppearance, FeatureAppearanceProvider, FeatureAppearanceSource, GeometryClass, TileFormat,
} from "@itwin/core-common";
import { RenderSystem } from "../render/RenderSystem";
import { IModelApp } from "../IModelApp";
import { RenderSystem } from "../../render/RenderSystem";
import { IModelApp } from "../../IModelApp";
import {
ImdlReader, IModelTileTree, RootIModelTile, Tile, TileContent, TileDrawArgs, TileParams, TileRequest, TileRequestChannel, TileTree,
} from "./internal";
} from "../../tile/internal";

/** The root tile for the branch of an [[IModelTileTree]] containing graphics for elements that have been modified during the current
* Not intended for direct consumption - exported for use by [[IModelTileTree]].
* [[GraphicalEditingScope]].
* @internal
*/
export abstract class DynamicIModelTile extends Tile {
protected constructor(params: TileParams, tree: TileTree) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*--------------------------------------------------------------------------------------------*/
import type { FrontendConfigDownloadInput, FrontendConfigUploadInput, FrontendStorage, FrontendUploadInMultiplePartsInput, FrontendUrlDownloadInput, FrontendUrlUploadInput, ObjectReference } from "@itwin/object-storage-core/lib/frontend";

/** @internal */
export class FetchCloudStorage implements FrontendStorage {
public download(input: (FrontendUrlDownloadInput | FrontendConfigDownloadInput) & { transferType: "buffer" }): Promise<ArrayBuffer>;
public download(input: (FrontendUrlDownloadInput | FrontendConfigDownloadInput) & { transferType: "stream" }): Promise<ReadableStream<any>>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@

import { Map4d } from "@itwin/core-geometry";
import { FrustumPlanes } from "@itwin/core-common";
import { GraphicBranch } from "../render/GraphicBranch";
import { RenderGraphic } from "../render/RenderGraphic";
import { SceneContext } from "../ViewContext";
import { TileDrawArgs, TileGraphicType, TileTreeReference } from "./internal";
import { GraphicBranch } from "../../render/GraphicBranch";
import { RenderGraphic } from "../../render/RenderGraphic";
import { SceneContext } from "../../ViewContext";
import { TileDrawArgs, TileGraphicType, TileTreeReference } from "../../tile/internal";

/** @internal */
export interface GraphicsCollector {
addGraphic(graphic: RenderGraphic): void;
}

/** @internal */
export class GraphicsCollectorDrawArgs extends TileDrawArgs {
private _planes: FrustumPlanes;
private _worldToViewMap: Map4d;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
import { ByteStream, Id64String, JsonUtils, utf8ToString } from "@itwin/core-bentley";
import { AxisOrder, Matrix3d, Point3d, Vector3d } from "@itwin/core-geometry";
import { ElementAlignedBox3d, Feature, FeatureTable, I3dmHeader, TileReadStatus } from "@itwin/core-common";
import { IModelConnection } from "../IModelConnection";
import { InstancedGraphicParams } from "../common/render/InstancedGraphicParams";
import { Mesh } from "../common/internal/render/MeshPrimitives";
import { RenderSystem } from "../render/RenderSystem";
import { BatchedTileIdMap, GltfReader, GltfReaderProps, GltfReaderResult, ShouldAbortReadGltf } from "./internal";
import { IModelConnection } from "../../IModelConnection";
import { InstancedGraphicParams } from "../../common/render/InstancedGraphicParams";
import { Mesh } from "../../common/internal/render/MeshPrimitives";
import { RenderSystem } from "../../render/RenderSystem";
import { BatchedTileIdMap, GltfReader, GltfReaderProps, GltfReaderResult, ShouldAbortReadGltf } from "../../tile/internal";

function setTransform(transforms: Float32Array, index: number, rotation: Matrix3d, origin: Point3d): void {
const i = index * 12;
Expand Down Expand Up @@ -44,7 +44,6 @@ function setTransform(transforms: Float32Array, index: number, rotation: Matrix3

/**
* Deserializes a tile in [i3dm](https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/specification/TileFormats/Instanced3DModel) format.
* @internal
*/
export class I3dmReader extends GltfReader {
private _instanceCount = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,20 @@ import { Range3d } from "@itwin/core-geometry";
import {
ColorDef, computeChildTileProps, computeChildTileRanges, computeTileChordTolerance, ElementAlignedBox3d, LinePixels, TileFormat, TileProps,
} from "@itwin/core-common";
import { IModelApp } from "../IModelApp";
import { GraphicBuilder } from "../render/GraphicBuilder";
import { RenderSystem } from "../render/RenderSystem";
import { IModelApp } from "../../IModelApp";
import { GraphicBuilder } from "../../render/GraphicBuilder";
import { RenderSystem } from "../../render/RenderSystem";
import {
addRangeGraphic, IModelTileTree, Tile, TileBoundingBoxes, TileContent, TileDrawArgs, TileLoadStatus, TileParams, TileRequest,
TileRequestChannel, TileTreeLoadStatus, TileVisibility,
} from "./internal";
} from "./../../tile/internal";

/** Parameters used to construct an [[IModelTile]].
* @internal
*/
export interface IModelTileParams extends TileParams {
sizeMultiplier?: number;
}

/** @internal */
export function iModelTileParamsFromJSON(props: TileProps, parent: IModelTile | undefined): IModelTileParams {
const { contentId, maximumSize, isLeaf, sizeMultiplier } = props;
const range = Range3d.fromJSON(props.range);
Expand All @@ -40,14 +38,12 @@ export function iModelTileParamsFromJSON(props: TileProps, parent: IModelTile |

/**
* Indicates whether a parent tile should be drawn in place of a child tile.
* @internal
*/
export enum SelectParent {
No,
Yes,
}

/** @internal */
export interface IModelTileContent extends TileContent {
/** If this tile was produced by refinement, the multiplier applied to its screen size. */
sizeMultiplier?: number;
Expand All @@ -56,7 +52,6 @@ export interface IModelTileContent extends TileContent {
}

/** A tile belonging to an [[IModelTileTree].
* @internal
*/
export class IModelTile extends Tile {
private _sizeMultiplier?: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

import { assert, compareStrings, SortedArray } from "@itwin/core-bentley";
import { TileTreeContentIds } from "@itwin/core-common";
import { IModelApp } from "../IModelApp";
import { IpcApp } from "../IpcApp";
import { IModelConnection } from "../IModelConnection";
import { IModelTile, IModelTileContent, Tile, TileRequest, TileRequestChannel, TileTree } from "./internal";
import { IModelApp } from "../../IModelApp";
import { IpcApp } from "../../IpcApp";
import { IModelConnection } from "../../IModelConnection";
import { IModelTile, IModelTileContent, Tile, TileRequest, TileRequestChannel, TileTree } from "../../tile/internal";

/** Handles requests to the cloud storage tile cache, if one is configured. If a tile's content is not found in the cache, subsequent requests for the same tile will
* use the IModelTileChannel instead.
Expand Down Expand Up @@ -144,7 +144,6 @@ class IModelTileMetadataCacheChannel extends TileRequestChannel {
}

/** TileRequestChannels used for requesting content for IModelTiles.
* @internal
*/
export class IModelTileRequestChannels {
private _cloudStorage: TileRequestChannel;
Expand Down
Loading