@cognite/reveal 2.2.2 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/cad.d.ts +4 -4
- package/core/index.d.ts +7 -7
- package/core/src/datamodels/base/SupportedModelTypes.d.ts +4 -4
- package/core/src/datamodels/base/index.d.ts +6 -6
- package/core/src/datamodels/base/types.d.ts +14 -14
- package/core/src/datamodels/cad/CadManager.d.ts +45 -45
- package/core/src/datamodels/cad/CadModelFactory.d.ts +7 -7
- package/core/src/datamodels/cad/CadModelSectorLoadStatistics.d.ts +38 -38
- package/core/src/datamodels/cad/createCadManager.d.ts +9 -9
- package/core/src/datamodels/cad/picking.d.ts +28 -28
- package/core/src/datamodels/cad/rendering/RenderAlreadyLoadedGeometryProvider.d.ts +10 -10
- package/core/src/datamodels/cad/sector/CadModelClipper.d.ts +10 -10
- package/core/src/datamodels/cad/styling/AssetNodeCollection.d.ts +38 -38
- package/core/src/datamodels/cad/styling/InvertedNodeCollection.d.ts +24 -24
- package/core/src/datamodels/cad/styling/NodeCollectionDeserializer.d.ts +26 -26
- package/core/src/datamodels/cad/styling/PopulateIndexSetFromPagedResponseHelper.d.ts +24 -24
- package/core/src/datamodels/cad/styling/PropertyFilterNodeCollection.d.ts +54 -54
- package/core/src/datamodels/cad/styling/SinglePropertyFilterNodeCollection.d.ts +50 -50
- package/core/src/datamodels/cad/styling/index.d.ts +8 -8
- package/core/src/datamodels/pointcloud/PointCloudFactory.d.ts +9 -9
- package/core/src/datamodels/pointcloud/PointCloudManager.d.ts +26 -26
- package/core/src/datamodels/pointcloud/PointCloudMetadata.d.ts +11 -11
- package/core/src/datamodels/pointcloud/PointCloudMetadataRepository.d.ts +13 -13
- package/core/src/datamodels/pointcloud/PointCloudNode.d.ts +62 -62
- package/core/src/datamodels/pointcloud/PotreeGroupWrapper.d.ts +39 -39
- package/core/src/datamodels/pointcloud/PotreeNodeWrapper.d.ts +38 -38
- package/core/src/datamodels/pointcloud/createPointCloudManager.d.ts +6 -6
- package/core/src/datamodels/pointcloud/index.d.ts +5 -5
- package/core/src/datamodels/pointcloud/picking.d.ts +29 -29
- package/core/src/datamodels/pointcloud/types.d.ts +114 -114
- package/core/src/index.d.ts +19 -19
- package/core/src/internals.d.ts +15 -15
- package/core/src/migration.d.ts +8 -8
- package/core/src/public/RevealManager.d.ts +64 -64
- package/core/src/public/createRevealManager.d.ts +23 -23
- package/core/src/public/migration/Cognite3DModel.d.ts +339 -339
- package/core/src/public/migration/Cognite3DViewer.d.ts +566 -611
- package/core/src/public/migration/CogniteModelBase.d.ts +17 -17
- package/core/src/public/migration/CognitePointCloudModel.d.ts +121 -121
- package/core/src/public/migration/NodeIdAndTreeIndexMaps.d.ts +4 -4
- package/core/src/public/migration/NotSupportedInMigrationWrapperError.d.ts +11 -11
- package/core/src/public/migration/RenderController.d.ts +4 -4
- package/core/src/public/migration/types.d.ts +290 -290
- package/core/src/public/types.d.ts +46 -46
- package/core/src/storage/RevealManagerHelper.d.ts +58 -58
- package/core/src/utilities/BoundingBoxClipper.d.ts +23 -23
- package/core/src/utilities/Spinner.d.ts +27 -27
- package/core/src/utilities/ViewStateHelper.d.ts +37 -33
- package/core/src/utilities/callActionWithIndicesAsync.d.ts +4 -4
- package/core/src/utilities/index.d.ts +8 -8
- package/core/src/utilities/reflection.d.ts +7 -7
- package/core/src/utilities/worldToViewport.d.ts +30 -30
- package/core/utilities.d.ts +4 -4
- package/extensions/datasource.d.ts +9 -9
- package/extensions/datasource.js +6 -6
- package/extensions/datasource.map +1 -1
- package/index.d.ts +9 -8
- package/index.js +101 -91
- package/index.map +1 -1
- package/package.json +2 -2
- package/packages/cad-geometry-loaders/index.d.ts +14 -14
- package/packages/cad-geometry-loaders/src/CadLoadingHints.d.ts +11 -11
- package/packages/cad-geometry-loaders/src/CadModelSectorBudget.d.ts +26 -26
- package/packages/cad-geometry-loaders/src/CadModelUpdateHandler.d.ts +44 -44
- package/packages/cad-geometry-loaders/src/sector/CachedRepository.d.ts +25 -25
- package/packages/cad-geometry-loaders/src/sector/ModelStateHandler.d.ts +12 -12
- package/packages/cad-geometry-loaders/src/sector/Repository.d.ts +9 -9
- package/packages/cad-geometry-loaders/src/sector/SectorLoader.d.ts +28 -28
- package/packages/cad-geometry-loaders/src/sector/SimpleAndDetailedToSector3D.d.ts +20 -20
- package/packages/cad-geometry-loaders/src/sector/culling/ByVisibilityGpuSectorCuller.d.ts +53 -53
- package/packages/cad-geometry-loaders/src/sector/culling/OccludingGeometryProvider.d.ts +6 -6
- package/packages/cad-geometry-loaders/src/sector/culling/OrderSectorsByVisibilityCoverage.d.ts +107 -107
- package/packages/cad-geometry-loaders/src/sector/culling/SectorCuller.d.ts +33 -33
- package/packages/cad-geometry-loaders/src/sector/culling/TakenSectorTree.d.ts +24 -24
- package/packages/cad-geometry-loaders/src/sector/culling/types.d.ts +71 -71
- package/packages/cad-geometry-loaders/src/sector/rxSectorUtilities.d.ts +12 -12
- package/packages/cad-geometry-loaders/src/sector/sectorUtilities.d.ts +20 -20
- package/packages/cad-geometry-loaders/src/utilities/PromiseUtils.d.ts +18 -18
- package/packages/cad-geometry-loaders/src/utilities/arrays.d.ts +5 -5
- package/packages/cad-geometry-loaders/src/utilities/groupMeshesByNumber.d.ts +8 -8
- package/packages/cad-geometry-loaders/src/utilities/rxOperations.d.ts +6 -6
- package/packages/cad-geometry-loaders/src/utilities/types.d.ts +25 -25
- package/packages/cad-parsers/index.d.ts +21 -21
- package/packages/cad-parsers/src/cad/CadSectorParser.d.ts +15 -15
- package/packages/cad-parsers/src/cad/LevelOfDetail.d.ts +8 -8
- package/packages/cad-parsers/src/cad/filterInstanceMesh.d.ts +6 -6
- package/packages/cad-parsers/src/cad/filterPrimitives.d.ts +9 -9
- package/packages/cad-parsers/src/cad/primitiveGeometries.d.ts +31 -31
- package/packages/cad-parsers/src/cad/triangleMeshes.d.ts +6 -6
- package/packages/cad-parsers/src/cad/types.d.ts +56 -56
- package/packages/cad-parsers/src/metadata/CadMetadataParser.d.ts +7 -7
- package/packages/cad-parsers/src/metadata/CadModelMetadata.d.ts +44 -44
- package/packages/cad-parsers/src/metadata/CadModelMetadataRepository.d.ts +16 -16
- package/packages/cad-parsers/src/metadata/MetadataRepository.d.ts +7 -7
- package/packages/cad-parsers/src/metadata/parsers/CadMetadataParserV8.d.ts +51 -51
- package/packages/cad-parsers/src/metadata/types.d.ts +41 -41
- package/packages/cad-parsers/src/sector/RootSectorNode.d.ts +12 -12
- package/packages/cad-parsers/src/sector/SectorNode.d.ts +21 -21
- package/packages/cad-parsers/src/utilities/SectorScene.d.ts +21 -21
- package/packages/cad-parsers/src/utilities/SectorSceneFactory.d.ts +9 -9
- package/packages/cad-parsers/src/utilities/computeBoundingBoxFromAttributes.d.ts +9 -9
- package/packages/cad-parsers/src/utilities/float32BufferToMatrix.d.ts +12 -12
- package/packages/cad-parsers/src/utilities/types.d.ts +48 -48
- package/packages/cad-styling/index.d.ts +9 -9
- package/packages/cad-styling/src/CombineNodeCollectionBase.d.ts +31 -31
- package/packages/cad-styling/src/IntersectionNodeCollection.d.ts +15 -15
- package/packages/cad-styling/src/NodeAppearance.d.ts +62 -62
- package/packages/cad-styling/src/NodeAppearanceProvider.d.ts +33 -33
- package/packages/cad-styling/src/NodeCollectionBase.d.ts +47 -47
- package/packages/cad-styling/src/TreeIndexNodeCollection.d.ts +23 -23
- package/packages/cad-styling/src/UnionNodeCollection.d.ts +15 -15
- package/packages/camera-manager/index.d.ts +6 -4
- package/packages/camera-manager/src/CameraManager.d.ts +85 -0
- package/packages/camera-manager/src/ComboControls.d.ts +102 -100
- package/packages/camera-manager/src/Keyboard.d.ts +17 -17
- package/packages/camera-manager/src/types.d.ts +64 -0
- package/packages/data-source/index.d.ts +6 -6
- package/packages/data-source/src/CdfDataSource.d.ts +19 -19
- package/packages/data-source/src/DataSource.d.ts +26 -26
- package/packages/data-source/src/LocalDataSource.d.ts +15 -15
- package/packages/logger/index.d.ts +5 -5
- package/packages/logger/src/Log.d.ts +5 -5
- package/packages/metrics/index.d.ts +5 -5
- package/packages/metrics/src/MetricsLogger.d.ts +21 -21
- package/packages/metrics/src/types.d.ts +7 -7
- package/packages/modeldata-api/index.d.ts +13 -13
- package/packages/modeldata-api/src/CdfModelDataProvider.d.ts +17 -15
- package/packages/modeldata-api/src/CdfModelIdentifier.d.ts +17 -17
- package/packages/modeldata-api/src/CdfModelMetadataProvider.d.ts +19 -19
- package/packages/modeldata-api/src/CdfModelOutputsProvider.d.ts +15 -15
- package/packages/modeldata-api/src/LocalModelDataProvider.d.ts +10 -10
- package/packages/modeldata-api/src/LocalModelIdentifier.d.ts +14 -14
- package/packages/modeldata-api/src/LocalModelMetadataProvider.d.ts +14 -14
- package/packages/modeldata-api/src/Model3DOutputList.d.ts +17 -17
- package/packages/modeldata-api/src/ModelIdentifier.d.ts +12 -12
- package/packages/modeldata-api/src/ModelMetadataProvider.d.ts +17 -17
- package/packages/modeldata-api/src/applyDefaultModelTransformation.d.ts +6 -6
- package/packages/modeldata-api/src/types.d.ts +41 -41
- package/packages/modeldata-api/src/utilities.d.ts +7 -7
- package/packages/nodes-api/index.d.ts +6 -6
- package/packages/nodes-api/src/NodesApiClient.d.ts +52 -52
- package/packages/nodes-api/src/NodesCdfClient.d.ts +24 -24
- package/packages/nodes-api/src/NodesLocalClient.d.ts +30 -30
- package/packages/nodes-api/src/types.d.ts +10 -10
- package/packages/rendering/index.d.ts +17 -17
- package/packages/rendering/src/CadMaterialManager.d.ts +37 -37
- package/packages/rendering/src/InstancedMeshManager.d.ts +20 -20
- package/packages/rendering/src/cameraconfig.d.ts +12 -12
- package/packages/rendering/src/rendering/EffectRenderManager.d.ts +99 -99
- package/packages/rendering/src/rendering/NodeAppearanceTextureBuilder.d.ts +51 -51
- package/packages/rendering/src/rendering/RenderMode.d.ts +15 -15
- package/packages/rendering/src/rendering/createSimpleGeometryMesh.d.ts +6 -6
- package/packages/rendering/src/rendering/matCapTextureData.d.ts +5 -5
- package/packages/rendering/src/rendering/materials.d.ts +23 -23
- package/packages/rendering/src/rendering/primitives.d.ts +12 -12
- package/packages/rendering/src/rendering/shaders.d.ts +101 -101
- package/packages/rendering/src/rendering/types.d.ts +76 -76
- package/packages/rendering/src/sector/CadNode.d.ts +54 -54
- package/packages/rendering/src/transform/NodeTransformProvider.d.ts +13 -13
- package/packages/rendering/src/transform/NodeTransformTextureBuilder.d.ts +23 -23
- package/packages/rendering/src/transform/TransformOverrideBuffer.d.ts +21 -21
- package/packages/rendering/src/utilities/types.d.ts +26 -26
- package/packages/tools/index.d.ts +15 -15
- package/packages/tools/src/AxisView/AxisViewTool.d.ts +32 -32
- package/packages/tools/src/AxisView/types.d.ts +98 -98
- package/packages/tools/src/Cognite3DViewerToolBase.d.ts +25 -25
- package/packages/tools/src/DebugCameraTool.d.ts +20 -20
- package/packages/tools/src/DebugLoadedSectorsTool.d.ts +23 -23
- package/packages/tools/src/ExplodedViewTool.d.ts +12 -12
- package/packages/tools/src/Geomap/Geomap.d.ts +17 -17
- package/packages/tools/src/Geomap/GeomapTool.d.ts +24 -24
- package/packages/tools/src/Geomap/MapConfig.d.ts +195 -195
- package/packages/tools/src/HtmlOverlay/BucketGrid2D.d.ts +28 -28
- package/packages/tools/src/HtmlOverlay/HtmlOverlayTool.d.ts +159 -159
- package/packages/tools/src/Timeline/Keyframe.d.ts +38 -38
- package/packages/tools/src/Timeline/TimelineTool.d.ts +79 -79
- package/packages/tools/src/Timeline/types.d.ts +13 -13
- package/packages/tools/src/types.d.ts +4 -4
- package/packages/utilities/index.d.ts +24 -24
- package/packages/utilities/src/CameraConfiguration.d.ts +10 -10
- package/packages/utilities/src/IndexSet.d.ts +1 -1
- package/packages/utilities/src/NumericRange.d.ts +22 -22
- package/packages/utilities/src/RandomColors.d.ts +34 -34
- package/packages/utilities/src/WebGLRendererStateHelper.d.ts +15 -15
- package/packages/utilities/src/assertNever.d.ts +7 -7
- package/packages/utilities/src/cache/MemoryRequestCache.d.ts +22 -22
- package/packages/utilities/src/cache/MostFrequentlyUsedCache.d.ts +19 -19
- package/packages/utilities/src/cache/RequestCache.d.ts +13 -13
- package/packages/utilities/src/datastructures/DynamicDefragmentedBuffer.d.ts +22 -22
- package/packages/utilities/src/determinePowerOfTwoDimensions.d.ts +11 -11
- package/packages/utilities/src/disposeAttributeArrayOnUpload.d.ts +17 -17
- package/packages/utilities/src/events/EventTrigger.d.ts +13 -13
- package/packages/utilities/src/events/InputHandler.d.ts +34 -0
- package/packages/utilities/src/events/clickOrTouchEventOffset.d.ts +13 -13
- package/packages/utilities/src/events/index.d.ts +6 -5
- package/packages/utilities/src/indexset/IndexSet.d.ts +26 -26
- package/packages/utilities/src/indexset/IntermediateIndexNode.d.ts +26 -26
- package/packages/utilities/src/indexset/LeafIndexNode.d.ts +16 -16
- package/packages/utilities/src/isMobileOrTablet.d.ts +4 -4
- package/packages/utilities/src/networking/isTheSameDomain.d.ts +11 -11
- package/packages/utilities/src/objectTraversal.d.ts +8 -8
- package/packages/utilities/src/packFloat.d.ts +6 -6
- package/packages/utilities/src/revealEnv.d.ts +10 -10
- package/packages/utilities/src/three/AutoDisposeGroup.d.ts +17 -17
- package/packages/utilities/src/three/BoundingBoxLOD.d.ts +27 -27
- package/packages/utilities/src/three/getBox3CornerPoints.d.ts +5 -5
- package/packages/utilities/src/transformCameraConfiguration.d.ts +6 -6
- package/packages/utilities/src/types.d.ts +10 -10
- package/packages/utilities/src/workers/WorkerPool.d.ts +14 -14
- package/tools.d.ts +7 -7
- package/tools.js +62 -58
- package/tools.map +1 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* State holding information about data being loaded.
|
|
6
|
-
*/
|
|
7
|
-
export declare type LoadingState = {
|
|
8
|
-
/**
|
|
9
|
-
* Indicates if we are currently loading more data.
|
|
10
|
-
*/
|
|
11
|
-
isLoading: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Items loaded so far in this batch.
|
|
14
|
-
*/
|
|
15
|
-
itemsLoaded: number;
|
|
16
|
-
/**
|
|
17
|
-
* Totals number of items to load in this batch.
|
|
18
|
-
*/
|
|
19
|
-
itemsRequested: number;
|
|
20
|
-
/**
|
|
21
|
-
* Number of items that has been 'culled' (i.e. deemed not necessary
|
|
22
|
-
* to load) so far in this batch.
|
|
23
|
-
*/
|
|
24
|
-
itemsCulled: number;
|
|
25
|
-
};
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* State holding information about data being loaded.
|
|
6
|
+
*/
|
|
7
|
+
export declare type LoadingState = {
|
|
8
|
+
/**
|
|
9
|
+
* Indicates if we are currently loading more data.
|
|
10
|
+
*/
|
|
11
|
+
isLoading: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Items loaded so far in this batch.
|
|
14
|
+
*/
|
|
15
|
+
itemsLoaded: number;
|
|
16
|
+
/**
|
|
17
|
+
* Totals number of items to load in this batch.
|
|
18
|
+
*/
|
|
19
|
+
itemsRequested: number;
|
|
20
|
+
/**
|
|
21
|
+
* Number of items that has been 'culled' (i.e. deemed not necessary
|
|
22
|
+
* to load) so far in this batch.
|
|
23
|
+
*/
|
|
24
|
+
itemsCulled: number;
|
|
25
|
+
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
export { CadMetadataParser } from './src/metadata/CadMetadataParser';
|
|
5
|
-
export { MetadataRepository } from './src/metadata/MetadataRepository';
|
|
6
|
-
export { CadModelMetadataRepository } from './src/metadata/CadModelMetadataRepository';
|
|
7
|
-
export { CadModelMetadata } from './src/metadata/CadModelMetadata';
|
|
8
|
-
export { SectorSceneImpl } from './src/utilities/SectorScene';
|
|
9
|
-
export { SectorSceneFactory } from './src/utilities/SectorSceneFactory';
|
|
10
|
-
export { SectorScene } from './src/utilities/types';
|
|
11
|
-
export { SectorMetadataIndexFileSection, SectorMetadataFacesFileSection, SectorMetadata } from './src/metadata/types';
|
|
12
|
-
export { SectorNode } from './src/sector/SectorNode';
|
|
13
|
-
export { RootSectorNode } from './src/sector/RootSectorNode';
|
|
14
|
-
export { CadSectorParser } from './src/cad/CadSectorParser';
|
|
15
|
-
export { LevelOfDetail } from './src/cad/LevelOfDetail';
|
|
16
|
-
export { filterPrimitivesOutsideClipBoxByBaseBoundsAndInstanceMatrix, filterPrimitivesOutsideClipBoxByCenterAndRadius, filterPrimitivesOutsideClipBoxByEllipse, filterPrimitivesOutsideClipBoxByVertices } from './src/cad/filterPrimitives';
|
|
17
|
-
export { filterInstanceMesh } from './src/cad/filterInstanceMesh';
|
|
18
|
-
export { boxGeometry, quadGeometry, coneGeometry, trapeziumGeometry, nutGeometry, torusLodGeometries, boxGeometryBoundingBox, quadGeometryBoundingBox,
|
|
19
|
-
export { SectorGeometry, InstancedMeshFile, InstancedMesh, TriangleMesh, WantedSector, ConsumedSector } from './src/cad/types';
|
|
20
|
-
export { WellKnownDistanceToMeterConversionFactors } from './src/utilities/types';
|
|
21
|
-
export { createTriangleMeshes } from './src/cad/triangleMeshes';
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
export { CadMetadataParser } from './src/metadata/CadMetadataParser';
|
|
5
|
+
export { MetadataRepository } from './src/metadata/MetadataRepository';
|
|
6
|
+
export { CadModelMetadataRepository } from './src/metadata/CadModelMetadataRepository';
|
|
7
|
+
export { CadModelMetadata } from './src/metadata/CadModelMetadata';
|
|
8
|
+
export { SectorSceneImpl } from './src/utilities/SectorScene';
|
|
9
|
+
export { SectorSceneFactory } from './src/utilities/SectorSceneFactory';
|
|
10
|
+
export { SectorScene } from './src/utilities/types';
|
|
11
|
+
export { SectorMetadataIndexFileSection, SectorMetadataFacesFileSection, SectorMetadata } from './src/metadata/types';
|
|
12
|
+
export { SectorNode } from './src/sector/SectorNode';
|
|
13
|
+
export { RootSectorNode } from './src/sector/RootSectorNode';
|
|
14
|
+
export { CadSectorParser } from './src/cad/CadSectorParser';
|
|
15
|
+
export { LevelOfDetail } from './src/cad/LevelOfDetail';
|
|
16
|
+
export { filterPrimitivesOutsideClipBoxByBaseBoundsAndInstanceMatrix, filterPrimitivesOutsideClipBoxByCenterAndRadius, filterPrimitivesOutsideClipBoxByEllipse, filterPrimitivesOutsideClipBoxByVertices } from './src/cad/filterPrimitives';
|
|
17
|
+
export { filterInstanceMesh } from './src/cad/filterInstanceMesh';
|
|
18
|
+
export { boxGeometry, quadGeometry, coneGeometry, trapeziumGeometry, nutGeometry, torusLodGeometries, boxGeometryBoundingBox, quadGeometryBoundingBox, nutGeometryBoundingBox } from './src/cad/primitiveGeometries';
|
|
19
|
+
export { SectorGeometry, InstancedMeshFile, InstancedMesh, TriangleMesh, WantedSector, ConsumedSector } from './src/cad/types';
|
|
20
|
+
export { WellKnownDistanceToMeterConversionFactors } from './src/utilities/types';
|
|
21
|
+
export { createTriangleMeshes } from './src/cad/triangleMeshes';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import { WorkerPool } from '../../../utilities';
|
|
5
|
-
import { ParseSectorResult, ParseCtmResult, SectorQuads } from '@cognite/reveal-parser-worker';
|
|
6
|
-
export declare class CadSectorParser {
|
|
7
|
-
private readonly workerPool;
|
|
8
|
-
constructor(workerPool?: WorkerPool);
|
|
9
|
-
parseI3D(data: Uint8Array): Promise<ParseSectorResult>;
|
|
10
|
-
parseF3D(data: Uint8Array): Promise<SectorQuads>;
|
|
11
|
-
parseCTM(data: Uint8Array): Promise<ParseCtmResult>;
|
|
12
|
-
private parseSimple;
|
|
13
|
-
private parseDetailed;
|
|
14
|
-
private parseCtm;
|
|
15
|
-
}
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { WorkerPool } from '../../../utilities';
|
|
5
|
+
import { ParseSectorResult, ParseCtmResult, SectorQuads } from '@cognite/reveal-parser-worker';
|
|
6
|
+
export declare class CadSectorParser {
|
|
7
|
+
private readonly workerPool;
|
|
8
|
+
constructor(workerPool?: WorkerPool);
|
|
9
|
+
parseI3D(data: Uint8Array): Promise<ParseSectorResult>;
|
|
10
|
+
parseF3D(data: Uint8Array): Promise<SectorQuads>;
|
|
11
|
+
parseCTM(data: Uint8Array): Promise<ParseCtmResult>;
|
|
12
|
+
private parseSimple;
|
|
13
|
+
private parseDetailed;
|
|
14
|
+
private parseCtm;
|
|
15
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
export declare enum LevelOfDetail {
|
|
5
|
-
Discarded = 0,
|
|
6
|
-
Simple = 1,
|
|
7
|
-
Detailed = 2
|
|
8
|
-
}
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
export declare enum LevelOfDetail {
|
|
5
|
+
Discarded = 0,
|
|
6
|
+
Simple = 1,
|
|
7
|
+
Detailed = 2
|
|
8
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import * as THREE from 'three';
|
|
5
|
-
import { InstancedMesh } from './types';
|
|
6
|
-
export declare function filterInstanceMesh(vertices: Float32Array, indices: Uint32Array, instanceMesh: InstancedMesh, geometryClipBox: THREE.Box3 | null): InstancedMesh;
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import * as THREE from 'three';
|
|
5
|
+
import { InstancedMesh } from './types';
|
|
6
|
+
export declare function filterInstanceMesh(vertices: Float32Array, indices: Uint32Array, instanceMesh: InstancedMesh, geometryClipBox: THREE.Box3 | null): InstancedMesh;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import * as THREE from 'three';
|
|
5
|
-
import { ParsePrimitiveAttribute } from '@cognite/reveal-parser-worker';
|
|
6
|
-
export declare function filterPrimitivesOutsideClipBoxByBaseBoundsAndInstanceMatrix(attributesByteValues: Uint8Array, attributes: Map<string, ParsePrimitiveAttribute>, baseBox: THREE.Box3, geometryClipBox: THREE.Box3 | null): Uint8Array;
|
|
7
|
-
export declare function filterPrimitivesOutsideClipBoxByCenterAndRadius(attributesByteValues: Uint8Array, attributes: Map<string, ParsePrimitiveAttribute>, geometryClipBox: THREE.Box3 | null, radiusAattributeName?: string, radiusBattributeName?: string): Uint8Array;
|
|
8
|
-
export declare function filterPrimitivesOutsideClipBoxByVertices(attributesByteValues: Uint8Array, attributes: Map<string, ParsePrimitiveAttribute>, geometryClipBox: THREE.Box3 | null): Uint8Array;
|
|
9
|
-
export declare function filterPrimitivesOutsideClipBoxByEllipse(attributesByteValues: Uint8Array, attributes: Map<string, ParsePrimitiveAttribute>, geometryClipBox: THREE.Box3 | null, radius1AttributeName?: string, radius2AttributeName?: string): Uint8Array;
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import * as THREE from 'three';
|
|
5
|
+
import { ParsePrimitiveAttribute } from '@cognite/reveal-parser-worker';
|
|
6
|
+
export declare function filterPrimitivesOutsideClipBoxByBaseBoundsAndInstanceMatrix(attributesByteValues: Uint8Array, attributes: Map<string, ParsePrimitiveAttribute>, baseBox: THREE.Box3, geometryClipBox: THREE.Box3 | null): Uint8Array;
|
|
7
|
+
export declare function filterPrimitivesOutsideClipBoxByCenterAndRadius(attributesByteValues: Uint8Array, attributes: Map<string, ParsePrimitiveAttribute>, geometryClipBox: THREE.Box3 | null, radiusAattributeName?: string, radiusBattributeName?: string): Uint8Array;
|
|
8
|
+
export declare function filterPrimitivesOutsideClipBoxByVertices(attributesByteValues: Uint8Array, attributes: Map<string, ParsePrimitiveAttribute>, geometryClipBox: THREE.Box3 | null): Uint8Array;
|
|
9
|
+
export declare function filterPrimitivesOutsideClipBoxByEllipse(attributesByteValues: Uint8Array, attributes: Map<string, ParsePrimitiveAttribute>, geometryClipBox: THREE.Box3 | null, radius1AttributeName?: string, radius2AttributeName?: string): Uint8Array;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import * as THREE from 'three';
|
|
5
|
-
export declare const boxGeometry: {
|
|
6
|
-
index: THREE.BufferAttribute | null;
|
|
7
|
-
position: THREE.BufferAttribute | THREE.InterleavedBufferAttribute;
|
|
8
|
-
normal: THREE.BufferAttribute | THREE.InterleavedBufferAttribute;
|
|
9
|
-
}, boxGeometryBoundingBox: THREE.Box3;
|
|
10
|
-
export declare const quadGeometry: {
|
|
11
|
-
index: THREE.BufferAttribute | null;
|
|
12
|
-
position: THREE.BufferAttribute | THREE.InterleavedBufferAttribute;
|
|
13
|
-
normal: THREE.BufferAttribute | THREE.InterleavedBufferAttribute;
|
|
14
|
-
}, quadGeometryBoundingBox: THREE.Box3;
|
|
15
|
-
export declare const trapeziumGeometry: {
|
|
16
|
-
index: THREE.BufferAttribute;
|
|
17
|
-
position: THREE.BufferAttribute;
|
|
18
|
-
}, trapeziumGeometryBoundingBox: THREE.Box3;
|
|
19
|
-
export declare const coneGeometry: {
|
|
20
|
-
index: THREE.BufferAttribute;
|
|
21
|
-
position: THREE.BufferAttribute;
|
|
22
|
-
}, coneGeometryBoundingBox: THREE.Box3;
|
|
23
|
-
export declare const torusLodGeometries: {
|
|
24
|
-
index: THREE.Uint16BufferAttribute;
|
|
25
|
-
position: THREE.Float32BufferAttribute;
|
|
26
|
-
}[]
|
|
27
|
-
export declare const nutGeometry: {
|
|
28
|
-
index: THREE.BufferAttribute | null;
|
|
29
|
-
position: THREE.BufferAttribute | THREE.InterleavedBufferAttribute;
|
|
30
|
-
normal: THREE.BufferAttribute | THREE.InterleavedBufferAttribute;
|
|
31
|
-
}, nutGeometryBoundingBox: THREE.Box3;
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import * as THREE from 'three';
|
|
5
|
+
export declare const boxGeometry: {
|
|
6
|
+
index: THREE.BufferAttribute | null;
|
|
7
|
+
position: THREE.BufferAttribute | THREE.InterleavedBufferAttribute;
|
|
8
|
+
normal: THREE.BufferAttribute | THREE.InterleavedBufferAttribute;
|
|
9
|
+
}, boxGeometryBoundingBox: THREE.Box3;
|
|
10
|
+
export declare const quadGeometry: {
|
|
11
|
+
index: THREE.BufferAttribute | null;
|
|
12
|
+
position: THREE.BufferAttribute | THREE.InterleavedBufferAttribute;
|
|
13
|
+
normal: THREE.BufferAttribute | THREE.InterleavedBufferAttribute;
|
|
14
|
+
}, quadGeometryBoundingBox: THREE.Box3;
|
|
15
|
+
export declare const trapeziumGeometry: {
|
|
16
|
+
index: THREE.BufferAttribute;
|
|
17
|
+
position: THREE.BufferAttribute;
|
|
18
|
+
}, trapeziumGeometryBoundingBox: THREE.Box3;
|
|
19
|
+
export declare const coneGeometry: {
|
|
20
|
+
index: THREE.BufferAttribute;
|
|
21
|
+
position: THREE.BufferAttribute;
|
|
22
|
+
}, coneGeometryBoundingBox: THREE.Box3;
|
|
23
|
+
export declare const torusLodGeometries: {
|
|
24
|
+
index: THREE.Uint16BufferAttribute;
|
|
25
|
+
position: THREE.Float32BufferAttribute;
|
|
26
|
+
}[];
|
|
27
|
+
export declare const nutGeometry: {
|
|
28
|
+
index: THREE.BufferAttribute | null;
|
|
29
|
+
position: THREE.BufferAttribute | THREE.InterleavedBufferAttribute;
|
|
30
|
+
normal: THREE.BufferAttribute | THREE.InterleavedBufferAttribute;
|
|
31
|
+
}, nutGeometryBoundingBox: THREE.Box3;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import * as THREE from 'three';
|
|
5
|
-
import { TriangleMesh } from '../../../cad-parsers';
|
|
6
|
-
export declare function createTriangleMeshes(triangleMeshes: TriangleMesh[], bounds: THREE.Box3, material: THREE.ShaderMaterial, geometryClipBox: THREE.Box3 | null): THREE.Mesh[];
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import * as THREE from 'three';
|
|
5
|
+
import { TriangleMesh } from '../../../cad-parsers';
|
|
6
|
+
export declare function createTriangleMeshes(triangleMeshes: TriangleMesh[], bounds: THREE.Box3, material: THREE.ShaderMaterial, geometryClipBox: THREE.Box3 | null): THREE.Mesh[];
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import * as THREE from 'three';
|
|
5
|
-
import { AutoDisposeGroup } from '../../../utilities';
|
|
6
|
-
import { ParsedPrimitives, ParseSectorResult, ParseCtmResult, SectorQuads } from '@cognite/reveal-parser-worker';
|
|
7
|
-
import { SectorMetadata } from '../metadata/types';
|
|
8
|
-
import { LevelOfDetail } from './LevelOfDetail';
|
|
9
|
-
export declare type TriangleMesh = {
|
|
10
|
-
readonly fileId: number;
|
|
11
|
-
readonly indices: Uint32Array;
|
|
12
|
-
readonly treeIndices: Float32Array;
|
|
13
|
-
readonly vertices: Float32Array;
|
|
14
|
-
readonly normals: Float32Array | undefined;
|
|
15
|
-
readonly colors: Uint8Array;
|
|
16
|
-
};
|
|
17
|
-
export declare type InstancedMeshFile = {
|
|
18
|
-
readonly fileId: number;
|
|
19
|
-
readonly indices: Uint32Array;
|
|
20
|
-
readonly vertices: Float32Array;
|
|
21
|
-
readonly instances: InstancedMesh[];
|
|
22
|
-
};
|
|
23
|
-
export declare type InstancedMesh = {
|
|
24
|
-
readonly triangleCount: number;
|
|
25
|
-
readonly triangleOffset: number;
|
|
26
|
-
readonly colors: Uint8Array;
|
|
27
|
-
readonly instanceMatrices: Float32Array;
|
|
28
|
-
readonly treeIndices: Float32Array;
|
|
29
|
-
};
|
|
30
|
-
export interface SectorGeometry {
|
|
31
|
-
readonly nodeIdToTreeIndexMap: Map<number, number>;
|
|
32
|
-
readonly treeIndexToNodeIdMap: Map<number, number>;
|
|
33
|
-
readonly primitives: ParsedPrimitives;
|
|
34
|
-
readonly instanceMeshes: InstancedMeshFile[];
|
|
35
|
-
readonly triangleMeshes: TriangleMesh[];
|
|
36
|
-
}
|
|
37
|
-
export interface ConsumedSector {
|
|
38
|
-
modelIdentifier: string;
|
|
39
|
-
metadata: SectorMetadata;
|
|
40
|
-
levelOfDetail: LevelOfDetail;
|
|
41
|
-
group: AutoDisposeGroup | undefined;
|
|
42
|
-
instancedMeshes: InstancedMeshFile[] | undefined;
|
|
43
|
-
}
|
|
44
|
-
export interface ParsedSector {
|
|
45
|
-
modelIdentifier: string;
|
|
46
|
-
metadata: SectorMetadata;
|
|
47
|
-
data: null | ParseSectorResult | ParseCtmResult | SectorGeometry | SectorQuads;
|
|
48
|
-
levelOfDetail: LevelOfDetail;
|
|
49
|
-
}
|
|
50
|
-
export interface WantedSector {
|
|
51
|
-
modelIdentifier: string;
|
|
52
|
-
modelBaseUrl: string;
|
|
53
|
-
geometryClipBox: THREE.Box3 | null;
|
|
54
|
-
levelOfDetail: LevelOfDetail;
|
|
55
|
-
metadata: SectorMetadata;
|
|
56
|
-
}
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import * as THREE from 'three';
|
|
5
|
+
import { AutoDisposeGroup } from '../../../utilities';
|
|
6
|
+
import { ParsedPrimitives, ParseSectorResult, ParseCtmResult, SectorQuads } from '@cognite/reveal-parser-worker';
|
|
7
|
+
import { SectorMetadata } from '../metadata/types';
|
|
8
|
+
import { LevelOfDetail } from './LevelOfDetail';
|
|
9
|
+
export declare type TriangleMesh = {
|
|
10
|
+
readonly fileId: number;
|
|
11
|
+
readonly indices: Uint32Array;
|
|
12
|
+
readonly treeIndices: Float32Array;
|
|
13
|
+
readonly vertices: Float32Array;
|
|
14
|
+
readonly normals: Float32Array | undefined;
|
|
15
|
+
readonly colors: Uint8Array;
|
|
16
|
+
};
|
|
17
|
+
export declare type InstancedMeshFile = {
|
|
18
|
+
readonly fileId: number;
|
|
19
|
+
readonly indices: Uint32Array;
|
|
20
|
+
readonly vertices: Float32Array;
|
|
21
|
+
readonly instances: InstancedMesh[];
|
|
22
|
+
};
|
|
23
|
+
export declare type InstancedMesh = {
|
|
24
|
+
readonly triangleCount: number;
|
|
25
|
+
readonly triangleOffset: number;
|
|
26
|
+
readonly colors: Uint8Array;
|
|
27
|
+
readonly instanceMatrices: Float32Array;
|
|
28
|
+
readonly treeIndices: Float32Array;
|
|
29
|
+
};
|
|
30
|
+
export interface SectorGeometry {
|
|
31
|
+
readonly nodeIdToTreeIndexMap: Map<number, number>;
|
|
32
|
+
readonly treeIndexToNodeIdMap: Map<number, number>;
|
|
33
|
+
readonly primitives: ParsedPrimitives;
|
|
34
|
+
readonly instanceMeshes: InstancedMeshFile[];
|
|
35
|
+
readonly triangleMeshes: TriangleMesh[];
|
|
36
|
+
}
|
|
37
|
+
export interface ConsumedSector {
|
|
38
|
+
modelIdentifier: string;
|
|
39
|
+
metadata: SectorMetadata;
|
|
40
|
+
levelOfDetail: LevelOfDetail;
|
|
41
|
+
group: AutoDisposeGroup | undefined;
|
|
42
|
+
instancedMeshes: InstancedMeshFile[] | undefined;
|
|
43
|
+
}
|
|
44
|
+
export interface ParsedSector {
|
|
45
|
+
modelIdentifier: string;
|
|
46
|
+
metadata: SectorMetadata;
|
|
47
|
+
data: null | ParseSectorResult | ParseCtmResult | SectorGeometry | SectorQuads;
|
|
48
|
+
levelOfDetail: LevelOfDetail;
|
|
49
|
+
}
|
|
50
|
+
export interface WantedSector {
|
|
51
|
+
modelIdentifier: string;
|
|
52
|
+
modelBaseUrl: string;
|
|
53
|
+
geometryClipBox: THREE.Box3 | null;
|
|
54
|
+
levelOfDetail: LevelOfDetail;
|
|
55
|
+
metadata: SectorMetadata;
|
|
56
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import { SectorScene } from '../utilities/types';
|
|
5
|
-
export declare class CadMetadataParser {
|
|
6
|
-
parse(parsedJson: any): SectorScene;
|
|
7
|
-
}
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { SectorScene } from '../utilities/types';
|
|
5
|
+
export declare class CadMetadataParser {
|
|
6
|
+
parse(parsedJson: any): SectorScene;
|
|
7
|
+
}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import * as THREE from 'three';
|
|
5
|
-
import { SectorScene } from '../utilities/types';
|
|
6
|
-
import { CameraConfiguration } from '../../../utilities';
|
|
7
|
-
export interface CadModelMetadata {
|
|
8
|
-
/**
|
|
9
|
-
* A unique identifier of the model.
|
|
10
|
-
*/
|
|
11
|
-
readonly modelIdentifier: string;
|
|
12
|
-
/**
|
|
13
|
-
* Base URL of the model.
|
|
14
|
-
*/
|
|
15
|
-
readonly modelBaseUrl: string;
|
|
16
|
-
/**
|
|
17
|
-
* If not null, geometry outside this box might be clipped
|
|
18
|
-
* away to avoid representing unused geometry. Will typically
|
|
19
|
-
* be used with geometry filters where only a part of the model
|
|
20
|
-
* is loaded.
|
|
21
|
-
* Note that the coordinates of this box is in "model space" and
|
|
22
|
-
* not in "viewer space". To use this to e.g. create clip planes
|
|
23
|
-
* around the geometry, it must be transformed to "viewer space"
|
|
24
|
-
* first.
|
|
25
|
-
*/
|
|
26
|
-
readonly geometryClipBox: THREE.Box3 | null;
|
|
27
|
-
/**
|
|
28
|
-
* Matrix transforming from coordinates of the model to ThreeJS
|
|
29
|
-
* coordinates.
|
|
30
|
-
*/
|
|
31
|
-
readonly modelMatrix: THREE.Matrix4;
|
|
32
|
-
/**
|
|
33
|
-
* Inverse of {@see modelMatrix}.
|
|
34
|
-
*/
|
|
35
|
-
readonly inverseModelMatrix: THREE.Matrix4;
|
|
36
|
-
/**
|
|
37
|
-
* Description of the tree structure holding geometry.
|
|
38
|
-
*/
|
|
39
|
-
readonly scene: SectorScene;
|
|
40
|
-
/**
|
|
41
|
-
* Camera configuration stored in CDF (if any).
|
|
42
|
-
*/
|
|
43
|
-
readonly cameraConfiguration?: CameraConfiguration;
|
|
44
|
-
}
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import * as THREE from 'three';
|
|
5
|
+
import { SectorScene } from '../utilities/types';
|
|
6
|
+
import { CameraConfiguration } from '../../../utilities';
|
|
7
|
+
export interface CadModelMetadata {
|
|
8
|
+
/**
|
|
9
|
+
* A unique identifier of the model.
|
|
10
|
+
*/
|
|
11
|
+
readonly modelIdentifier: string;
|
|
12
|
+
/**
|
|
13
|
+
* Base URL of the model.
|
|
14
|
+
*/
|
|
15
|
+
readonly modelBaseUrl: string;
|
|
16
|
+
/**
|
|
17
|
+
* If not null, geometry outside this box might be clipped
|
|
18
|
+
* away to avoid representing unused geometry. Will typically
|
|
19
|
+
* be used with geometry filters where only a part of the model
|
|
20
|
+
* is loaded.
|
|
21
|
+
* Note that the coordinates of this box is in "model space" and
|
|
22
|
+
* not in "viewer space". To use this to e.g. create clip planes
|
|
23
|
+
* around the geometry, it must be transformed to "viewer space"
|
|
24
|
+
* first.
|
|
25
|
+
*/
|
|
26
|
+
readonly geometryClipBox: THREE.Box3 | null;
|
|
27
|
+
/**
|
|
28
|
+
* Matrix transforming from coordinates of the model to ThreeJS
|
|
29
|
+
* coordinates.
|
|
30
|
+
*/
|
|
31
|
+
readonly modelMatrix: THREE.Matrix4;
|
|
32
|
+
/**
|
|
33
|
+
* Inverse of {@see modelMatrix}.
|
|
34
|
+
*/
|
|
35
|
+
readonly inverseModelMatrix: THREE.Matrix4;
|
|
36
|
+
/**
|
|
37
|
+
* Description of the tree structure holding geometry.
|
|
38
|
+
*/
|
|
39
|
+
readonly scene: SectorScene;
|
|
40
|
+
/**
|
|
41
|
+
* Camera configuration stored in CDF (if any).
|
|
42
|
+
*/
|
|
43
|
+
readonly cameraConfiguration?: CameraConfiguration;
|
|
44
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import { CadMetadataParser } from './CadMetadataParser';
|
|
5
|
-
import { CadModelMetadata } from './CadModelMetadata';
|
|
6
|
-
import { MetadataRepository } from './MetadataRepository';
|
|
7
|
-
import { ModelDataProvider, ModelMetadataProvider, ModelIdentifier } from '../../../modeldata-api';
|
|
8
|
-
export declare class CadModelMetadataRepository implements MetadataRepository<Promise<CadModelMetadata>> {
|
|
9
|
-
private readonly _modelMetadataProvider;
|
|
10
|
-
private readonly _modelDataProvider;
|
|
11
|
-
private readonly _cadSceneParser;
|
|
12
|
-
private readonly _blobFileName;
|
|
13
|
-
private _currentModelIdentifier;
|
|
14
|
-
constructor(modelMetadataProvider: ModelMetadataProvider, modelDataProvider: ModelDataProvider, cadMetadataParser: CadMetadataParser, blobFileName?: string);
|
|
15
|
-
loadData(modelIdentifier: ModelIdentifier): Promise<CadModelMetadata>;
|
|
16
|
-
}
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { CadMetadataParser } from './CadMetadataParser';
|
|
5
|
+
import { CadModelMetadata } from './CadModelMetadata';
|
|
6
|
+
import { MetadataRepository } from './MetadataRepository';
|
|
7
|
+
import { ModelDataProvider, ModelMetadataProvider, ModelIdentifier } from '../../../modeldata-api';
|
|
8
|
+
export declare class CadModelMetadataRepository implements MetadataRepository<Promise<CadModelMetadata>> {
|
|
9
|
+
private readonly _modelMetadataProvider;
|
|
10
|
+
private readonly _modelDataProvider;
|
|
11
|
+
private readonly _cadSceneParser;
|
|
12
|
+
private readonly _blobFileName;
|
|
13
|
+
private _currentModelIdentifier;
|
|
14
|
+
constructor(modelMetadataProvider: ModelMetadataProvider, modelDataProvider: ModelDataProvider, cadMetadataParser: CadMetadataParser, blobFileName?: string);
|
|
15
|
+
loadData(modelIdentifier: ModelIdentifier): Promise<CadModelMetadata>;
|
|
16
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import { ModelIdentifier } from '../../../modeldata-api';
|
|
5
|
-
export interface MetadataRepository<Output> {
|
|
6
|
-
loadData(modelIdentifier: ModelIdentifier): Output;
|
|
7
|
-
}
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { ModelIdentifier } from '../../../modeldata-api';
|
|
5
|
+
export interface MetadataRepository<Output> {
|
|
6
|
+
loadData(modelIdentifier: ModelIdentifier): Output;
|
|
7
|
+
}
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import { SectorScene } from '../../utilities/types';
|
|
5
|
-
export interface CadSectorMetadataV8 {
|
|
6
|
-
readonly id: number;
|
|
7
|
-
readonly parentId: number;
|
|
8
|
-
readonly path: string;
|
|
9
|
-
readonly depth: number;
|
|
10
|
-
readonly estimatedDrawCallCount: number;
|
|
11
|
-
readonly estimatedTriangleCount: number;
|
|
12
|
-
readonly boundingBox: {
|
|
13
|
-
readonly min: {
|
|
14
|
-
x: number;
|
|
15
|
-
y: number;
|
|
16
|
-
z: number;
|
|
17
|
-
};
|
|
18
|
-
readonly max: {
|
|
19
|
-
x: number;
|
|
20
|
-
y: number;
|
|
21
|
-
z: number;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
readonly indexFile: {
|
|
25
|
-
readonly fileName: string;
|
|
26
|
-
readonly peripheralFiles: string[];
|
|
27
|
-
readonly downloadSize: number;
|
|
28
|
-
};
|
|
29
|
-
readonly facesFile: {
|
|
30
|
-
readonly quadSize: number;
|
|
31
|
-
readonly coverageFactors: {
|
|
32
|
-
xy: number;
|
|
33
|
-
yz: number;
|
|
34
|
-
xz: number;
|
|
35
|
-
};
|
|
36
|
-
readonly recursiveCoverageFactors: {
|
|
37
|
-
xy: number;
|
|
38
|
-
yz: number;
|
|
39
|
-
xz: number;
|
|
40
|
-
} | undefined;
|
|
41
|
-
readonly fileName: string | null;
|
|
42
|
-
readonly downloadSize: number;
|
|
43
|
-
} | null;
|
|
44
|
-
}
|
|
45
|
-
export interface CadMetadataV8 {
|
|
46
|
-
readonly version: 8;
|
|
47
|
-
readonly maxTreeIndex: number;
|
|
48
|
-
readonly sectors: CadSectorMetadataV8[];
|
|
49
|
-
readonly unit: string | null;
|
|
50
|
-
}
|
|
51
|
-
export declare function parseCadMetadataV8(metadata: CadMetadataV8): SectorScene;
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { SectorScene } from '../../utilities/types';
|
|
5
|
+
export interface CadSectorMetadataV8 {
|
|
6
|
+
readonly id: number;
|
|
7
|
+
readonly parentId: number;
|
|
8
|
+
readonly path: string;
|
|
9
|
+
readonly depth: number;
|
|
10
|
+
readonly estimatedDrawCallCount: number;
|
|
11
|
+
readonly estimatedTriangleCount: number;
|
|
12
|
+
readonly boundingBox: {
|
|
13
|
+
readonly min: {
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
z: number;
|
|
17
|
+
};
|
|
18
|
+
readonly max: {
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
21
|
+
z: number;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
readonly indexFile: {
|
|
25
|
+
readonly fileName: string;
|
|
26
|
+
readonly peripheralFiles: string[];
|
|
27
|
+
readonly downloadSize: number;
|
|
28
|
+
};
|
|
29
|
+
readonly facesFile: {
|
|
30
|
+
readonly quadSize: number;
|
|
31
|
+
readonly coverageFactors: {
|
|
32
|
+
xy: number;
|
|
33
|
+
yz: number;
|
|
34
|
+
xz: number;
|
|
35
|
+
};
|
|
36
|
+
readonly recursiveCoverageFactors: {
|
|
37
|
+
xy: number;
|
|
38
|
+
yz: number;
|
|
39
|
+
xz: number;
|
|
40
|
+
} | undefined;
|
|
41
|
+
readonly fileName: string | null;
|
|
42
|
+
readonly downloadSize: number;
|
|
43
|
+
} | null;
|
|
44
|
+
}
|
|
45
|
+
export interface CadMetadataV8 {
|
|
46
|
+
readonly version: 8;
|
|
47
|
+
readonly maxTreeIndex: number;
|
|
48
|
+
readonly sectors: CadSectorMetadataV8[];
|
|
49
|
+
readonly unit: string | null;
|
|
50
|
+
}
|
|
51
|
+
export declare function parseCadMetadataV8(metadata: CadMetadataV8): SectorScene;
|