@itwin/core-orbitgt 5.4.0-dev.7 → 5.4.1
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/CHANGELOG.md +36 -1
- package/lib/cjs/core-orbitgt.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/AttributeMask.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/AttributeReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/BlockRecord.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/ContainerFile.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/ContainerFilePart.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/DirectoryReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/DirectoryRecord.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/EmbeddedAttributeReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/FileAccess.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/FileReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/FileRecord.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/GeometryReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/GeometryRecord.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/OPCReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/PointReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/TileReadBuffer.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/TileRecord.js.map +1 -1
- package/lib/cjs/pointcloud/model/AttributeTypes.js.map +1 -1
- package/lib/cjs/pointcloud/model/AttributeValue.js.map +1 -1
- package/lib/cjs/pointcloud/model/BlockIndex.js.map +1 -1
- package/lib/cjs/pointcloud/model/CloudPoint.js.map +1 -1
- package/lib/cjs/pointcloud/model/Grid.js.map +1 -1
- package/lib/cjs/pointcloud/model/GridIndex.js.map +1 -1
- package/lib/cjs/pointcloud/model/PointAttribute.js.map +1 -1
- package/lib/cjs/pointcloud/model/PointCloudReader.js.map +1 -1
- package/lib/cjs/pointcloud/model/PointData.js.map +1 -1
- package/lib/cjs/pointcloud/model/PointDataRaw.js.map +1 -1
- package/lib/cjs/pointcloud/model/ReadRequest.js.map +1 -1
- package/lib/cjs/pointcloud/model/StandardAttributes.js.map +1 -1
- package/lib/cjs/pointcloud/model/TileIndex.js.map +1 -1
- package/lib/cjs/pointcloud/render/AViewRequest.js.map +1 -1
- package/lib/cjs/pointcloud/render/Block.js.map +1 -1
- package/lib/cjs/pointcloud/render/DataManager.js.map +1 -1
- package/lib/cjs/pointcloud/render/FrameData.js.map +1 -1
- package/lib/cjs/pointcloud/render/Level.js.map +1 -1
- package/lib/cjs/pointcloud/render/TileLoadSorter.js.map +1 -1
- package/lib/cjs/pointcloud/render/ViewTree.js.map +1 -1
- package/lib/cjs/spatial/crs/CRSEngine.js.map +1 -1
- package/lib/cjs/spatial/crs/CRSManager.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Axis.js.map +1 -1
- package/lib/cjs/spatial/ecrs/CRS.js.map +1 -1
- package/lib/cjs/spatial/ecrs/CoordinateSystem.js.map +1 -1
- package/lib/cjs/spatial/ecrs/DataFileUnit.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Datum.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Ellipsoid.js.map +1 -1
- package/lib/cjs/spatial/ecrs/OnlineEngine.js.map +1 -1
- package/lib/cjs/spatial/ecrs/OnlineRegistry.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Operation.js.map +1 -1
- package/lib/cjs/spatial/ecrs/OperationMethod.js.map +1 -1
- package/lib/cjs/spatial/ecrs/ParameterValue.js.map +1 -1
- package/lib/cjs/spatial/ecrs/ParameterValueList.js.map +1 -1
- package/lib/cjs/spatial/ecrs/PrimeMeridian.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Registry.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Transform.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Unit.js.map +1 -1
- package/lib/cjs/spatial/ecrs/VerticalModel.js.map +1 -1
- package/lib/cjs/spatial/ecrs/WellKnownText.js.map +1 -1
- package/lib/cjs/spatial/ecrs/WellKnownTextNode.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/HotineObliqueMercator.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/KrovakObliqueConformalConic.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/KrovakObliqueConformalConicEN.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/LambertConical1SP.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/LambertConical2SP.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/Mercator1SP.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/ObliqueMercator.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/ObliqueStereographic.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/TransverseMercator.js.map +1 -1
- package/lib/cjs/spatial/ecrs/transformation/PositionVector.js.map +1 -1
- package/lib/cjs/spatial/geom/Bounds.js.map +1 -1
- package/lib/cjs/spatial/geom/Coordinate.js.map +1 -1
- package/lib/cjs/spatial/geom/Line.js.map +1 -1
- package/lib/cjs/spatial/geom/Transform.js.map +1 -1
- package/lib/cjs/system/buffer/ABuffer.js.map +1 -1
- package/lib/cjs/system/buffer/Float32Buffer.js.map +1 -1
- package/lib/cjs/system/buffer/LittleEndian.js.map +1 -1
- package/lib/cjs/system/buffer/Uint16Buffer.js.map +1 -1
- package/lib/cjs/system/buffer/Uint8Buffer.js.map +1 -1
- package/lib/cjs/system/collection/AList.js.map +1 -1
- package/lib/cjs/system/collection/IntMap.js.map +1 -1
- package/lib/cjs/system/collection/StringMap.js.map +1 -1
- package/lib/cjs/system/io/ABufferInStream.js.map +1 -1
- package/lib/cjs/system/io/InStream.js.map +1 -1
- package/lib/cjs/system/io/OutStream.js.map +1 -1
- package/lib/cjs/system/runtime/ALong.js.map +1 -1
- package/lib/cjs/system/runtime/ASystem.js.map +1 -1
- package/lib/cjs/system/runtime/Downloader.js.map +1 -1
- package/lib/cjs/system/runtime/DownloaderNode.js.map +1 -1
- package/lib/cjs/system/runtime/DownloaderXhr.js.map +1 -1
- package/lib/cjs/system/runtime/Message.js.map +1 -1
- package/lib/cjs/system/runtime/Numbers.js.map +1 -1
- package/lib/cjs/system/runtime/Strings.js.map +1 -1
- package/lib/cjs/system/runtime/iComparator.js.map +1 -1
- package/lib/cjs/system/storage/CacheList.js.map +1 -1
- package/lib/cjs/system/storage/CachedItem.js.map +1 -1
- package/lib/cjs/system/storage/ContentLoader.js.map +1 -1
- package/lib/cjs/system/storage/FileContent.js.map +1 -1
- package/lib/cjs/system/storage/FileRange.js.map +1 -1
- package/lib/cjs/system/storage/FileStorage.js.map +1 -1
- package/lib/cjs/system/storage/NodeFS.js.map +1 -1
- package/lib/cjs/system/storage/PageCachedFile.js.map +1 -1
- package/lib/cjs/system/storage/UrlFS.js.map +1 -1
- package/lib/esm/core-orbitgt.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/AttributeMask.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/AttributeReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/BlockRecord.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/ContainerFile.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/ContainerFilePart.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/DirectoryReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/DirectoryRecord.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/EmbeddedAttributeReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/FileAccess.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/FileReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/FileRecord.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/GeometryReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/GeometryRecord.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/OPCReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/PointReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/TileReadBuffer.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/TileRecord.js.map +1 -1
- package/lib/esm/pointcloud/model/AttributeTypes.js.map +1 -1
- package/lib/esm/pointcloud/model/AttributeValue.js.map +1 -1
- package/lib/esm/pointcloud/model/BlockIndex.js.map +1 -1
- package/lib/esm/pointcloud/model/CloudPoint.js.map +1 -1
- package/lib/esm/pointcloud/model/Grid.js.map +1 -1
- package/lib/esm/pointcloud/model/GridIndex.js.map +1 -1
- package/lib/esm/pointcloud/model/PointAttribute.js.map +1 -1
- package/lib/esm/pointcloud/model/PointCloudReader.js.map +1 -1
- package/lib/esm/pointcloud/model/PointData.js.map +1 -1
- package/lib/esm/pointcloud/model/PointDataRaw.js.map +1 -1
- package/lib/esm/pointcloud/model/ReadRequest.js.map +1 -1
- package/lib/esm/pointcloud/model/StandardAttributes.js.map +1 -1
- package/lib/esm/pointcloud/model/TileIndex.js.map +1 -1
- package/lib/esm/pointcloud/render/AViewRequest.js.map +1 -1
- package/lib/esm/pointcloud/render/Block.js.map +1 -1
- package/lib/esm/pointcloud/render/DataManager.js.map +1 -1
- package/lib/esm/pointcloud/render/FrameData.js.map +1 -1
- package/lib/esm/pointcloud/render/Level.js.map +1 -1
- package/lib/esm/pointcloud/render/TileLoadSorter.js.map +1 -1
- package/lib/esm/pointcloud/render/ViewTree.js.map +1 -1
- package/lib/esm/spatial/crs/CRSEngine.js.map +1 -1
- package/lib/esm/spatial/crs/CRSManager.js.map +1 -1
- package/lib/esm/spatial/ecrs/Axis.js.map +1 -1
- package/lib/esm/spatial/ecrs/CRS.js.map +1 -1
- package/lib/esm/spatial/ecrs/CoordinateSystem.js.map +1 -1
- package/lib/esm/spatial/ecrs/DataFileUnit.js.map +1 -1
- package/lib/esm/spatial/ecrs/Datum.js.map +1 -1
- package/lib/esm/spatial/ecrs/Ellipsoid.js.map +1 -1
- package/lib/esm/spatial/ecrs/OnlineEngine.js.map +1 -1
- package/lib/esm/spatial/ecrs/OnlineRegistry.js.map +1 -1
- package/lib/esm/spatial/ecrs/Operation.js.map +1 -1
- package/lib/esm/spatial/ecrs/OperationMethod.js.map +1 -1
- package/lib/esm/spatial/ecrs/ParameterValue.js.map +1 -1
- package/lib/esm/spatial/ecrs/ParameterValueList.js.map +1 -1
- package/lib/esm/spatial/ecrs/PrimeMeridian.js.map +1 -1
- package/lib/esm/spatial/ecrs/Registry.js.map +1 -1
- package/lib/esm/spatial/ecrs/Transform.js.map +1 -1
- package/lib/esm/spatial/ecrs/Unit.js.map +1 -1
- package/lib/esm/spatial/ecrs/VerticalModel.js.map +1 -1
- package/lib/esm/spatial/ecrs/WellKnownText.js.map +1 -1
- package/lib/esm/spatial/ecrs/WellKnownTextNode.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/HotineObliqueMercator.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/KrovakObliqueConformalConic.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/KrovakObliqueConformalConicEN.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/LambertConical1SP.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/LambertConical2SP.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/Mercator1SP.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/ObliqueMercator.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/ObliqueStereographic.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/TransverseMercator.js.map +1 -1
- package/lib/esm/spatial/ecrs/transformation/PositionVector.js.map +1 -1
- package/lib/esm/spatial/geom/Bounds.js.map +1 -1
- package/lib/esm/spatial/geom/Coordinate.js.map +1 -1
- package/lib/esm/spatial/geom/Line.js.map +1 -1
- package/lib/esm/spatial/geom/Transform.js.map +1 -1
- package/lib/esm/system/buffer/ABuffer.js.map +1 -1
- package/lib/esm/system/buffer/Float32Buffer.js.map +1 -1
- package/lib/esm/system/buffer/LittleEndian.js.map +1 -1
- package/lib/esm/system/buffer/Uint16Buffer.js.map +1 -1
- package/lib/esm/system/buffer/Uint8Buffer.js.map +1 -1
- package/lib/esm/system/collection/AList.js.map +1 -1
- package/lib/esm/system/collection/IntMap.js.map +1 -1
- package/lib/esm/system/collection/StringMap.js.map +1 -1
- package/lib/esm/system/io/ABufferInStream.js.map +1 -1
- package/lib/esm/system/io/InStream.js.map +1 -1
- package/lib/esm/system/io/OutStream.js.map +1 -1
- package/lib/esm/system/runtime/ALong.js.map +1 -1
- package/lib/esm/system/runtime/ASystem.js.map +1 -1
- package/lib/esm/system/runtime/Downloader.js.map +1 -1
- package/lib/esm/system/runtime/DownloaderNode.js.map +1 -1
- package/lib/esm/system/runtime/DownloaderXhr.js.map +1 -1
- package/lib/esm/system/runtime/Message.js.map +1 -1
- package/lib/esm/system/runtime/Numbers.js.map +1 -1
- package/lib/esm/system/runtime/Strings.js.map +1 -1
- package/lib/esm/system/runtime/iComparator.js.map +1 -1
- package/lib/esm/system/storage/CacheList.js.map +1 -1
- package/lib/esm/system/storage/CachedItem.js.map +1 -1
- package/lib/esm/system/storage/ContentLoader.js.map +1 -1
- package/lib/esm/system/storage/FileContent.js.map +1 -1
- package/lib/esm/system/storage/FileRange.js.map +1 -1
- package/lib/esm/system/storage/FileStorage.js.map +1 -1
- package/lib/esm/system/storage/NodeFS.js.map +1 -1
- package/lib/esm/system/storage/PageCachedFile.js.map +1 -1
- package/lib/esm/system/storage/UrlFS.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReadRequest.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/ReadRequest.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAWH,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,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1B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACI,WAAW;QACd,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED;;OAEG;IACI,aAAa;QAChB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC;QAC5B,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC;IAC/B,CAAC;IAED;;;OAGG;IACI,mBAAmB;QACtB,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAClC,CAAC;IAED;;;OAGG;IACI,eAAe,CAAC,IAAW;QAC9B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACtD,CAAC;IAED;;;OAGG;IACI,eAAe;QAClB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED;;OAEG;IACI,iBAAiB;QACpB,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,IAAI,CAAC;IACpC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.pointcloud.model;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { Bounds } from \"../../spatial/geom/Bounds\";\nimport { AList } from \"../../system/collection/AList\";\nimport { ALong } from \"../../system/runtime/ALong\";\nimport { Strings } from \"../../system/runtime/Strings\";\n\n/**\n * Class ReadRequest allows selective reading of information from a point cloud file.\n *\n * @version 1.0 December 2011\n */\n/** @internal */\nexport class ReadRequest {\n /** The request to only read the geometry */\n public static readonly READ_GEOMETRY: ReadRequest = ReadRequest.getGeometry();\n /** The request to only read the geometry and color */\n public static readonly READ_GEOMETRY_AND_COLOR: ReadRequest = ReadRequest.getGeometryAndColor();\n /** The request to read geometry and attributes */\n public static readonly READ_ALL: ReadRequest = ReadRequest.getGeometryAndAttributes();\n\n /** Should the geometry be read? */\n private _readGeometryAttribute: boolean;\n /** Should the color be read? */\n private _readColorAttribute: boolean;\n /** Should the intensity be read? */\n private _readIntensityAttribute: boolean;\n /** Should the weight be read? */\n private _readWeightAttribute: boolean;\n /** Should thinning be used? */\n private _thinning: int32;\n /** The list of extra attributes that should be read */\n private _extraAttributes: AList<string>;\n /** Should the deleted points be read as well? */\n private _readDeletedAttribute: boolean;\n\n /** An optional 2D area to filter */\n private _areaFilter: Bounds;\n\n /** The number read transactions */\n private _dataTransactions: int32;\n /** The number of bytes read for this request */\n private _dataSize: ALong;\n /** The number of nanoseconds spent reading data */\n private _dataReadTime: ALong;\n\n /**\n * Create a new request to read all data (geometry and attributes) (except deleted points).\n */\n public constructor() {\n /* Read the geometry */\n this._readGeometryAttribute = true;\n /* Read all standard attributes */\n this._readColorAttribute = true;\n this._readIntensityAttribute = true;\n this._readWeightAttribute = true;\n this._thinning = 0;\n /* Read all extra attributes */\n this._extraAttributes = new AList<string>();\n this._extraAttributes.add(\"*\");\n /* Default to not reading deleted points */\n this._readDeletedAttribute = false;\n /* Clear */\n this._areaFilter = null;\n this._dataTransactions = 0;\n this._dataSize = ALong.ZERO;\n this._dataReadTime = ALong.ZERO;\n }\n\n /**\n * Create a new request.\n * @param readColor should the color be read?\n * @param readIntensity should the intensity be read?\n * @param readWeight should the weight be read?\n * @param thinning should thinning be used?\n */\n public static create(readColor: boolean, readIntensity: boolean, readWeight: boolean, thinning: int32): ReadRequest {\n let request: ReadRequest = new ReadRequest();\n request._readColorAttribute = readColor;\n request._readIntensityAttribute = readIntensity;\n request._readWeightAttribute = readWeight;\n request._thinning = thinning;\n request._extraAttributes.clear();\n return request;\n }\n\n /**\n * Create the request to only read the geometry.\n * @return the request.\n */\n public static getGeometry(): ReadRequest {\n return ReadRequest.create(false/*color*/, false/*intensity*/, false/*weight*/, 0/*thinning*/);\n }\n\n /**\n * Create the request to only read the geometry and colot.\n * @return the request.\n */\n public static getGeometryAndColor(): ReadRequest {\n return ReadRequest.create(true/*color*/, false/*intensity*/, false/*weight*/, 0/*thinning*/);\n }\n\n /**\n * Create the request to read the full geometry and all attributes.\n * @return the request.\n */\n public static getGeometryAndAttributes(): ReadRequest {\n return new ReadRequest();\n }\n\n /**\n * Should the geometry be read?\n * @return true if it should be read.\n */\n public readGeometry(): boolean {\n return this._readGeometryAttribute;\n }\n\n /**\n * Should the geometry be read?\n * @param read true if it should be read.\n */\n public setReadGeometry(read: boolean): void {\n this._readGeometryAttribute = read;\n }\n\n /**\n * Should the color be read?\n * @return true if it should be read.\n */\n public readColor(): boolean {\n return this._readColorAttribute;\n }\n\n /**\n * Should the intensity be read?\n * @return true if it should be read.\n */\n public readIntensity(): boolean {\n return this._readIntensityAttribute;\n }\n\n /**\n * Should the weight be read?\n * @return true if it should be read.\n */\n public readWeight(): boolean {\n return this._readWeightAttribute;\n }\n\n /**\n * Should thinning be used?\n * @return the thinning factor.\n */\n public getThinning(): int32 {\n return this._thinning;\n }\n\n /**\n * Should the deleted points be read?\n * @return true if they should be read.\n */\n public readDeleted(): boolean {\n return this._readDeletedAttribute;\n }\n\n /**\n * Should the deleted points be read?\n * @param read true if they should be read.\n */\n public setReadDeleted(read: boolean): void {\n this._readDeletedAttribute = read;\n }\n\n /**\n * Should all extra attributes be read?\n * @return true if all extra attribute should be read.\n */\n public readAllExtraAttributes(): boolean {\n if (this._extraAttributes.size() != 1) return false;\n let extraAttribute: string = this._extraAttributes.get(0);\n return Strings.equals(extraAttribute, \"*\");\n }\n\n /**\n * Get the list of extra attributes to read.\n * @return the list of extra attributes to read.\n */\n public getExtraAttributes(): AList<string> {\n return this._extraAttributes;\n }\n\n /**\n * Set the list of extra attributes to read.\n * @param list the list of extra attributes to read.\n */\n public setExtraAttributes(list: AList<string>): void {\n this._extraAttributes = list;\n }\n\n /**\n * Add the name of an extra attribute to read.\n * @param attributeName the name of the attribute to read.\n * @return this request for convenient chaining.\n */\n public addExtraAttribute(attributeName: string): ReadRequest {\n this._extraAttributes.add(attributeName);\n return this;\n }\n\n /**\n * Get the area filter.\n * @return the area filter.\n */\n public getAreaFilter(): Bounds {\n return this._areaFilter;\n }\n\n /**\n * Set the area filter.\n * @param filter the new area filter.\n */\n public setAreaFilter(filter: Bounds): void {\n this._areaFilter = filter;\n }\n\n /**\n * Add a number of bytes to the data size.\n * @param size the number of bytes.\n */\n public addDataSize(size: int32): void {\n this._dataSize = this._dataSize.addInt(size);\n this._dataTransactions++;\n }\n\n /**\n * Get the data size of the request.\n * @return the number of bytes.\n */\n public getDataSize(): ALong {\n return this._dataSize;\n }\n\n /**\n * Clear the data size of the request.\n */\n public clearDataSize(): void {\n this._dataSize = ALong.ZERO;\n this._dataTransactions = 0;\n }\n\n /**\n * Get the number of data transactions.\n * @return the number of data transactions.\n */\n public getDataTransactions(): int32 {\n return this._dataTransactions;\n }\n\n /**\n * Add a number of nanoseconds to the data read time.\n * @param time the number of nanoseconds.\n */\n public addDataReadTime(time: ALong): void {\n this._dataReadTime = this._dataReadTime.add(time);\n }\n\n /**\n * Get the data read time of the request.\n * @return the number of nanoseconds.\n */\n public getDataReadTime(): ALong {\n return this._dataReadTime;\n }\n\n /**\n * Clear the data read time of the request.\n */\n public clearDataReadTime(): void {\n this._dataReadTime = ALong.ZERO;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ReadRequest.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/ReadRequest.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAWH,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAEvD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,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACI,WAAW;QACd,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED;;OAEG;IACI,aAAa;QAChB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC;QAC5B,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC;IAC/B,CAAC;IAED;;;OAGG;IACI,mBAAmB;QACtB,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAClC,CAAC;IAED;;;OAGG;IACI,eAAe,CAAC,IAAW;QAC9B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACtD,CAAC;IAED;;;OAGG;IACI,eAAe;QAClB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED;;OAEG;IACI,iBAAiB;QACpB,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,IAAI,CAAC;IACpC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\n//package orbitgt.pointcloud.model;\r\n\r\ntype int8 = number;\r\ntype int16 = number;\r\ntype int32 = number;\r\ntype float32 = number;\r\ntype float64 = number;\r\n\r\nimport { Bounds } from \"../../spatial/geom/Bounds\";\r\nimport { AList } from \"../../system/collection/AList\";\r\nimport { ALong } from \"../../system/runtime/ALong\";\r\nimport { Strings } from \"../../system/runtime/Strings\";\r\n\r\n/**\r\n * Class ReadRequest allows selective reading of information from a point cloud file.\r\n *\r\n * @version 1.0 December 2011\r\n */\r\n/** @internal */\r\nexport class ReadRequest {\r\n /** The request to only read the geometry */\r\n public static readonly READ_GEOMETRY: ReadRequest = ReadRequest.getGeometry();\r\n /** The request to only read the geometry and color */\r\n public static readonly READ_GEOMETRY_AND_COLOR: ReadRequest = ReadRequest.getGeometryAndColor();\r\n /** The request to read geometry and attributes */\r\n public static readonly READ_ALL: ReadRequest = ReadRequest.getGeometryAndAttributes();\r\n\r\n /** Should the geometry be read? */\r\n private _readGeometryAttribute: boolean;\r\n /** Should the color be read? */\r\n private _readColorAttribute: boolean;\r\n /** Should the intensity be read? */\r\n private _readIntensityAttribute: boolean;\r\n /** Should the weight be read? */\r\n private _readWeightAttribute: boolean;\r\n /** Should thinning be used? */\r\n private _thinning: int32;\r\n /** The list of extra attributes that should be read */\r\n private _extraAttributes: AList<string>;\r\n /** Should the deleted points be read as well? */\r\n private _readDeletedAttribute: boolean;\r\n\r\n /** An optional 2D area to filter */\r\n private _areaFilter: Bounds;\r\n\r\n /** The number read transactions */\r\n private _dataTransactions: int32;\r\n /** The number of bytes read for this request */\r\n private _dataSize: ALong;\r\n /** The number of nanoseconds spent reading data */\r\n private _dataReadTime: ALong;\r\n\r\n /**\r\n * Create a new request to read all data (geometry and attributes) (except deleted points).\r\n */\r\n public constructor() {\r\n /* Read the geometry */\r\n this._readGeometryAttribute = true;\r\n /* Read all standard attributes */\r\n this._readColorAttribute = true;\r\n this._readIntensityAttribute = true;\r\n this._readWeightAttribute = true;\r\n this._thinning = 0;\r\n /* Read all extra attributes */\r\n this._extraAttributes = new AList<string>();\r\n this._extraAttributes.add(\"*\");\r\n /* Default to not reading deleted points */\r\n this._readDeletedAttribute = false;\r\n /* Clear */\r\n this._areaFilter = null;\r\n this._dataTransactions = 0;\r\n this._dataSize = ALong.ZERO;\r\n this._dataReadTime = ALong.ZERO;\r\n }\r\n\r\n /**\r\n * Create a new request.\r\n * @param readColor should the color be read?\r\n * @param readIntensity should the intensity be read?\r\n * @param readWeight should the weight be read?\r\n * @param thinning should thinning be used?\r\n */\r\n public static create(readColor: boolean, readIntensity: boolean, readWeight: boolean, thinning: int32): ReadRequest {\r\n let request: ReadRequest = new ReadRequest();\r\n request._readColorAttribute = readColor;\r\n request._readIntensityAttribute = readIntensity;\r\n request._readWeightAttribute = readWeight;\r\n request._thinning = thinning;\r\n request._extraAttributes.clear();\r\n return request;\r\n }\r\n\r\n /**\r\n * Create the request to only read the geometry.\r\n * @return the request.\r\n */\r\n public static getGeometry(): ReadRequest {\r\n return ReadRequest.create(false/*color*/, false/*intensity*/, false/*weight*/, 0/*thinning*/);\r\n }\r\n\r\n /**\r\n * Create the request to only read the geometry and colot.\r\n * @return the request.\r\n */\r\n public static getGeometryAndColor(): ReadRequest {\r\n return ReadRequest.create(true/*color*/, false/*intensity*/, false/*weight*/, 0/*thinning*/);\r\n }\r\n\r\n /**\r\n * Create the request to read the full geometry and all attributes.\r\n * @return the request.\r\n */\r\n public static getGeometryAndAttributes(): ReadRequest {\r\n return new ReadRequest();\r\n }\r\n\r\n /**\r\n * Should the geometry be read?\r\n * @return true if it should be read.\r\n */\r\n public readGeometry(): boolean {\r\n return this._readGeometryAttribute;\r\n }\r\n\r\n /**\r\n * Should the geometry be read?\r\n * @param read true if it should be read.\r\n */\r\n public setReadGeometry(read: boolean): void {\r\n this._readGeometryAttribute = read;\r\n }\r\n\r\n /**\r\n * Should the color be read?\r\n * @return true if it should be read.\r\n */\r\n public readColor(): boolean {\r\n return this._readColorAttribute;\r\n }\r\n\r\n /**\r\n * Should the intensity be read?\r\n * @return true if it should be read.\r\n */\r\n public readIntensity(): boolean {\r\n return this._readIntensityAttribute;\r\n }\r\n\r\n /**\r\n * Should the weight be read?\r\n * @return true if it should be read.\r\n */\r\n public readWeight(): boolean {\r\n return this._readWeightAttribute;\r\n }\r\n\r\n /**\r\n * Should thinning be used?\r\n * @return the thinning factor.\r\n */\r\n public getThinning(): int32 {\r\n return this._thinning;\r\n }\r\n\r\n /**\r\n * Should the deleted points be read?\r\n * @return true if they should be read.\r\n */\r\n public readDeleted(): boolean {\r\n return this._readDeletedAttribute;\r\n }\r\n\r\n /**\r\n * Should the deleted points be read?\r\n * @param read true if they should be read.\r\n */\r\n public setReadDeleted(read: boolean): void {\r\n this._readDeletedAttribute = read;\r\n }\r\n\r\n /**\r\n * Should all extra attributes be read?\r\n * @return true if all extra attribute should be read.\r\n */\r\n public readAllExtraAttributes(): boolean {\r\n if (this._extraAttributes.size() != 1) return false;\r\n let extraAttribute: string = this._extraAttributes.get(0);\r\n return Strings.equals(extraAttribute, \"*\");\r\n }\r\n\r\n /**\r\n * Get the list of extra attributes to read.\r\n * @return the list of extra attributes to read.\r\n */\r\n public getExtraAttributes(): AList<string> {\r\n return this._extraAttributes;\r\n }\r\n\r\n /**\r\n * Set the list of extra attributes to read.\r\n * @param list the list of extra attributes to read.\r\n */\r\n public setExtraAttributes(list: AList<string>): void {\r\n this._extraAttributes = list;\r\n }\r\n\r\n /**\r\n * Add the name of an extra attribute to read.\r\n * @param attributeName the name of the attribute to read.\r\n * @return this request for convenient chaining.\r\n */\r\n public addExtraAttribute(attributeName: string): ReadRequest {\r\n this._extraAttributes.add(attributeName);\r\n return this;\r\n }\r\n\r\n /**\r\n * Get the area filter.\r\n * @return the area filter.\r\n */\r\n public getAreaFilter(): Bounds {\r\n return this._areaFilter;\r\n }\r\n\r\n /**\r\n * Set the area filter.\r\n * @param filter the new area filter.\r\n */\r\n public setAreaFilter(filter: Bounds): void {\r\n this._areaFilter = filter;\r\n }\r\n\r\n /**\r\n * Add a number of bytes to the data size.\r\n * @param size the number of bytes.\r\n */\r\n public addDataSize(size: int32): void {\r\n this._dataSize = this._dataSize.addInt(size);\r\n this._dataTransactions++;\r\n }\r\n\r\n /**\r\n * Get the data size of the request.\r\n * @return the number of bytes.\r\n */\r\n public getDataSize(): ALong {\r\n return this._dataSize;\r\n }\r\n\r\n /**\r\n * Clear the data size of the request.\r\n */\r\n public clearDataSize(): void {\r\n this._dataSize = ALong.ZERO;\r\n this._dataTransactions = 0;\r\n }\r\n\r\n /**\r\n * Get the number of data transactions.\r\n * @return the number of data transactions.\r\n */\r\n public getDataTransactions(): int32 {\r\n return this._dataTransactions;\r\n }\r\n\r\n /**\r\n * Add a number of nanoseconds to the data read time.\r\n * @param time the number of nanoseconds.\r\n */\r\n public addDataReadTime(time: ALong): void {\r\n this._dataReadTime = this._dataReadTime.add(time);\r\n }\r\n\r\n /**\r\n * Get the data read time of the request.\r\n * @return the number of nanoseconds.\r\n */\r\n public getDataReadTime(): ALong {\r\n return this._dataReadTime;\r\n }\r\n\r\n /**\r\n * Clear the data read time of the request.\r\n */\r\n public clearDataReadTime(): void {\r\n this._dataReadTime = ALong.ZERO;\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StandardAttributes.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/StandardAttributes.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAUH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;GAIG;AACH,gBAAgB;AAChB,MAAM,OAAO,kBAAkB;IAC3B,qCAAqC;IAC9B,MAAM,CAAU,KAAK,GAAmB,IAAI,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,cAAc,CAAC,UAAU,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IACtJ,yCAAyC;IAClC,MAAM,CAAU,SAAS,GAAmB,IAAI,cAAc,CAAC,WAAW,EAAE,0BAA0B,EAAE,cAAc,CAAC,SAAS,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IACvK,wCAAwC;IACjC,MAAM,CAAU,QAAQ,GAAmB,IAAI,cAAc,CAAC,SAAS,EAAE,oCAAoC,EAAE,cAAc,CAAC,WAAW,EAAE,cAAc,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IACpL,sCAAsC;IAC/B,MAAM,CAAU,MAAM,GAAmB,IAAI,cAAc,CAAC,QAAQ,EAAE,wCAAwC,EAAE,cAAc,CAAC,SAAS,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/K,yCAAyC;IAClC,MAAM,CAAU,SAAS,GAAmB,IAAI,cAAc,CAAC,WAAW,EAAE,4CAA4C,EAAE,cAAc,CAAC,WAAW,EAAE,cAAc,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/L,uCAAuC;IAChC,MAAM,CAAU,OAAO,GAAmB,IAAI,cAAc,CAAC,SAAS,EAAE,4BAA4B,EAAE,cAAc,CAAC,WAAW,EAAE,cAAc,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,kBAAkB;IAC9L,wCAAwC;IACjC,MAAM,CAAU,QAAQ,GAAmB,IAAI,cAAc,CAAC,SAAS,EAAE,4CAA4C,EAAE,cAAc,CAAC,WAAW,EAAE,cAAc,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IAE5L,6CAA6C;IACtC,MAAM,CAAU,gBAAgB,GAAmB,cAAc,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAE3F;2EACuE;IAChE,MAAM,CAAU,eAAe,GAAY,KAAK,CAAC;IACxD,kDAAkD;IAC3C,MAAM,CAAU,gBAAgB,GAAY,QAAQ,CAAC;IAE5D;;OAEG;IACH,gBAAwB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.pointcloud.model;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { AttributeTypes } from \"./AttributeTypes\";\nimport { AttributeValue } from \"./AttributeValue\";\nimport { PointAttribute } from \"./PointAttribute\";\n\n/**\n * Class StandardAttributes defines some common attributes for pointclouds.\n *\n * @version 1.0 October 2013\n */\n/** @internal */\nexport class StandardAttributes {\n /** The standard \"color\" attribute */\n public static readonly COLOR: PointAttribute = new PointAttribute(\"Color\", \"The RGB color\", AttributeTypes.TYPE_COLOR, AttributeValue.createColor(0));\n /** The standard \"intensity\" attribute */\n public static readonly INTENSITY: PointAttribute = new PointAttribute(\"Intensity\", \"The reflection intensity\", AttributeTypes.TYPE_INT2, AttributeValue.createInt2(0));\n /** The standard \"gps-time\" attribute */\n public static readonly GPS_TIME: PointAttribute = new PointAttribute(\"GPSTime\", \"The registration time of the point\", AttributeTypes.TYPE_FLOAT8, AttributeValue.createFloat8(0.0));\n /** The standard \"weight\" attribute */\n public static readonly WEIGHT: PointAttribute = new PointAttribute(\"Weight\", \"The weight of a multi-resolution point\", AttributeTypes.TYPE_INT4, AttributeValue.createInt4(0));\n /** The standard \"clearance\" attribute */\n public static readonly CLEARANCE: PointAttribute = new PointAttribute(\"Clearance\", \"The vertical clearance of a bridge or road\", AttributeTypes.TYPE_FLOAT4, AttributeValue.createFloat4(0.0));\n /** The standard \"rutting\" attribute */\n public static readonly RUTTING: PointAttribute = new PointAttribute(\"Rutting\", \"The road deformation angle\", AttributeTypes.TYPE_FLOAT4, AttributeValue.createFloat4(0.0)); // range 0..90 deg\n /** The standard \"color-by\" attribute */\n public static readonly COLOR_BY: PointAttribute = new PointAttribute(\"ColorBy\", \"The attribute to modulate the point colors\", AttributeTypes.TYPE_FLOAT4, AttributeValue.createFloat4(0.0));\n\n /** The default \"gps-time\" attribute value */\n public static readonly DEFAULT_GPS_TIME: AttributeValue = AttributeValue.createFloat8(0.0);\n\n /** The \"adjusted\" gps time offset (The offset moves the time back to near zero to improve floating point resolution).\n See the \"GPS Time Type\" field in \"LAS SPECIFICATION VERSION 1.3\" */\n public static readonly GPS_TIME_OFFSET: float64 = 1.0e9;\n /** The number of seconds in a week (7*24*3600) */\n public static readonly GPS_WEEK_SECONDS: float64 = 604800.0;\n\n /**\n * No instances.\n */\n private constructor() { }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"StandardAttributes.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/StandardAttributes.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAUH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;GAIG;AACH,gBAAgB;AAChB,MAAM,OAAO,kBAAkB;IAC3B,qCAAqC;IAC9B,MAAM,CAAU,KAAK,GAAmB,IAAI,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,cAAc,CAAC,UAAU,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IACtJ,yCAAyC;IAClC,MAAM,CAAU,SAAS,GAAmB,IAAI,cAAc,CAAC,WAAW,EAAE,0BAA0B,EAAE,cAAc,CAAC,SAAS,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IACvK,wCAAwC;IACjC,MAAM,CAAU,QAAQ,GAAmB,IAAI,cAAc,CAAC,SAAS,EAAE,oCAAoC,EAAE,cAAc,CAAC,WAAW,EAAE,cAAc,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IACpL,sCAAsC;IAC/B,MAAM,CAAU,MAAM,GAAmB,IAAI,cAAc,CAAC,QAAQ,EAAE,wCAAwC,EAAE,cAAc,CAAC,SAAS,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/K,yCAAyC;IAClC,MAAM,CAAU,SAAS,GAAmB,IAAI,cAAc,CAAC,WAAW,EAAE,4CAA4C,EAAE,cAAc,CAAC,WAAW,EAAE,cAAc,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/L,uCAAuC;IAChC,MAAM,CAAU,OAAO,GAAmB,IAAI,cAAc,CAAC,SAAS,EAAE,4BAA4B,EAAE,cAAc,CAAC,WAAW,EAAE,cAAc,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,kBAAkB;IAC9L,wCAAwC;IACjC,MAAM,CAAU,QAAQ,GAAmB,IAAI,cAAc,CAAC,SAAS,EAAE,4CAA4C,EAAE,cAAc,CAAC,WAAW,EAAE,cAAc,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IAE5L,6CAA6C;IACtC,MAAM,CAAU,gBAAgB,GAAmB,cAAc,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAE3F;2EACuE;IAChE,MAAM,CAAU,eAAe,GAAY,KAAK,CAAC;IACxD,kDAAkD;IAC3C,MAAM,CAAU,gBAAgB,GAAY,QAAQ,CAAC;IAE5D;;OAEG;IACH,gBAAwB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\n//package orbitgt.pointcloud.model;\r\n\r\ntype int8 = number;\r\ntype int16 = number;\r\ntype int32 = number;\r\ntype float32 = number;\r\ntype float64 = number;\r\n\r\nimport { AttributeTypes } from \"./AttributeTypes\";\r\nimport { AttributeValue } from \"./AttributeValue\";\r\nimport { PointAttribute } from \"./PointAttribute\";\r\n\r\n/**\r\n * Class StandardAttributes defines some common attributes for pointclouds.\r\n *\r\n * @version 1.0 October 2013\r\n */\r\n/** @internal */\r\nexport class StandardAttributes {\r\n /** The standard \"color\" attribute */\r\n public static readonly COLOR: PointAttribute = new PointAttribute(\"Color\", \"The RGB color\", AttributeTypes.TYPE_COLOR, AttributeValue.createColor(0));\r\n /** The standard \"intensity\" attribute */\r\n public static readonly INTENSITY: PointAttribute = new PointAttribute(\"Intensity\", \"The reflection intensity\", AttributeTypes.TYPE_INT2, AttributeValue.createInt2(0));\r\n /** The standard \"gps-time\" attribute */\r\n public static readonly GPS_TIME: PointAttribute = new PointAttribute(\"GPSTime\", \"The registration time of the point\", AttributeTypes.TYPE_FLOAT8, AttributeValue.createFloat8(0.0));\r\n /** The standard \"weight\" attribute */\r\n public static readonly WEIGHT: PointAttribute = new PointAttribute(\"Weight\", \"The weight of a multi-resolution point\", AttributeTypes.TYPE_INT4, AttributeValue.createInt4(0));\r\n /** The standard \"clearance\" attribute */\r\n public static readonly CLEARANCE: PointAttribute = new PointAttribute(\"Clearance\", \"The vertical clearance of a bridge or road\", AttributeTypes.TYPE_FLOAT4, AttributeValue.createFloat4(0.0));\r\n /** The standard \"rutting\" attribute */\r\n public static readonly RUTTING: PointAttribute = new PointAttribute(\"Rutting\", \"The road deformation angle\", AttributeTypes.TYPE_FLOAT4, AttributeValue.createFloat4(0.0)); // range 0..90 deg\r\n /** The standard \"color-by\" attribute */\r\n public static readonly COLOR_BY: PointAttribute = new PointAttribute(\"ColorBy\", \"The attribute to modulate the point colors\", AttributeTypes.TYPE_FLOAT4, AttributeValue.createFloat4(0.0));\r\n\r\n /** The default \"gps-time\" attribute value */\r\n public static readonly DEFAULT_GPS_TIME: AttributeValue = AttributeValue.createFloat8(0.0);\r\n\r\n /** The \"adjusted\" gps time offset (The offset moves the time back to near zero to improve floating point resolution).\r\n See the \"GPS Time Type\" field in \"LAS SPECIFICATION VERSION 1.3\" */\r\n public static readonly GPS_TIME_OFFSET: float64 = 1.0e9;\r\n /** The number of seconds in a week (7*24*3600) */\r\n public static readonly GPS_WEEK_SECONDS: float64 = 604800.0;\r\n\r\n /**\r\n * No instances.\r\n */\r\n private constructor() { }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TileIndex.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/TileIndex.ts"],"names":[],"mappings":"AAAA;;;+F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AC,CAAC,CAAC;IACvG,CAAC;CACJ","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.pointcloud.model;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\n\nimport { ALong } from \"../../system/runtime/ALong\";\nimport { GridIndex } from \"./GridIndex\";\n\n/**\n * Class TileIndex defines a tile index in a pointcloud file.\n *\n * @version 1.0 January 2014\n */\n/** @internal */\nexport class TileIndex {\n /** The level */\n public level: int32;\n /** The unique key of the block */\n public key: string;\n /** The index of the tile in the level */\n public index: int32;\n /** The grid index */\n public gridIndex: GridIndex;\n /** The index of the first point in the tile (derived) */\n public pointIndex: ALong;\n /** The point count */\n public pointCount: int32;\n /** The children */\n public children: Array<TileIndex>;\n /** The last access time */\n public accessTime: float64;\n\n /**\n * Create a new index.\n */\n public constructor(level: int32, index: int32, gridIndex: GridIndex, pointIndex: ALong, pointCount: int32) {\n this.level = level;\n this.index = index;\n this.gridIndex = gridIndex;\n this.pointIndex = pointIndex;\n this.pointCount = pointCount;\n this.children = null;\n this.accessTime = 0.0;\n this.key = (\"L\" + this.level + \",T:\" + this.index);\n }\n\n /**\n * Check if two indexes are the same.\n * @param other another index.\n * @return true if same.\n */\n public same(other: TileIndex): boolean {\n return (other.level == this.level) && (other.index == this.index);\n }\n\n /**\n * Get the unique key of the tile in the pointcloud file.\n * @return the unique key (combines level and grid index).\n */\n public getKey(): string {\n return \"T\" + this.level + \"/\" + this.gridIndex.x + \"/\" + this.gridIndex.y + \"/\" + this.gridIndex.z;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"TileIndex.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/TileIndex.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;A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CAAC;CACJ","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\n//package orbitgt.pointcloud.model;\r\n\r\ntype int8 = number;\r\ntype int16 = number;\r\ntype int32 = number;\r\ntype float32 = number;\r\ntype float64 = number;\r\n\r\n\r\nimport { ALong } from \"../../system/runtime/ALong\";\r\nimport { GridIndex } from \"./GridIndex\";\r\n\r\n/**\r\n * Class TileIndex defines a tile index in a pointcloud file.\r\n *\r\n * @version 1.0 January 2014\r\n */\r\n/** @internal */\r\nexport class TileIndex {\r\n /** The level */\r\n public level: int32;\r\n /** The unique key of the block */\r\n public key: string;\r\n /** The index of the tile in the level */\r\n public index: int32;\r\n /** The grid index */\r\n public gridIndex: GridIndex;\r\n /** The index of the first point in the tile (derived) */\r\n public pointIndex: ALong;\r\n /** The point count */\r\n public pointCount: int32;\r\n /** The children */\r\n public children: Array<TileIndex>;\r\n /** The last access time */\r\n public accessTime: float64;\r\n\r\n /**\r\n * Create a new index.\r\n */\r\n public constructor(level: int32, index: int32, gridIndex: GridIndex, pointIndex: ALong, pointCount: int32) {\r\n this.level = level;\r\n this.index = index;\r\n this.gridIndex = gridIndex;\r\n this.pointIndex = pointIndex;\r\n this.pointCount = pointCount;\r\n this.children = null;\r\n this.accessTime = 0.0;\r\n this.key = (\"L\" + this.level + \",T:\" + this.index);\r\n }\r\n\r\n /**\r\n * Check if two indexes are the same.\r\n * @param other another index.\r\n * @return true if same.\r\n */\r\n public same(other: TileIndex): boolean {\r\n return (other.level == this.level) && (other.index == this.index);\r\n }\r\n\r\n /**\r\n * Get the unique key of the tile in the pointcloud file.\r\n * @return the unique key (combines level and grid index).\r\n */\r\n public getKey(): string {\r\n return \"T\" + this.level + \"/\" + this.gridIndex.x + \"/\" + this.gridIndex.y + \"/\" + this.gridIndex.z;\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AViewRequest.js","sourceRoot":"","sources":["../../../../src/pointcloud/render/AViewRequest.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAcH;;;;GAIG;AACH,gBAAgB;AAChB,MAAM,OAAgB,YAAY;IACjC;;OAEG;IACH;IACA,CAAC;CAsBD","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.pointcloud.render;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { Bounds } from \"../../spatial/geom/Bounds\";\nimport { TileIndex } from \"../model/TileIndex\";\nimport { Level } from \"./Level\";\n\n/**\n * Class AViewRequest defines a abstract request the render a view.\n *\n * @version 1.0 November 2015\n */\n/** @internal */\nexport abstract class AViewRequest {\n\t/**\n\t * Make a new request.\n\t */\n\tpublic constructor() {\n\t}\n\n\t/**\n\t * Get the frame time.\n\t * @return the frame time.\n\t */\n\tpublic abstract getFrameTime(): float64;\n\n\t/**\n\t * Check if bounds are visible.\n\t * @param bounds the bounds (in model space).\n\t * @return true if visible.\n\t */\n\tpublic abstract isVisibleBox(bounds: Bounds): boolean;\n\n\t/**\n\t * Should a tile be split?\n * @param level the level of the tile.\n * @param tile the tile index.\n\t * @return true if the tile should be split into its children.\n\t */\n\tpublic abstract shouldSplit(level: Level, tile: TileIndex): boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AViewRequest.js","sourceRoot":"","sources":["../../../../src/pointcloud/render/AViewRequest.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAcH;;;;GAIG;AACH,gBAAgB;AAChB,MAAM,OAAgB,YAAY;IACjC;;OAEG;IACH;IACA,CAAC;CAsBD","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\n//package orbitgt.pointcloud.render;\r\n\r\ntype int8 = number;\r\ntype int16 = number;\r\ntype int32 = number;\r\ntype float32 = number;\r\ntype float64 = number;\r\n\r\nimport { Bounds } from \"../../spatial/geom/Bounds\";\r\nimport { TileIndex } from \"../model/TileIndex\";\r\nimport { Level } from \"./Level\";\r\n\r\n/**\r\n * Class AViewRequest defines a abstract request the render a view.\r\n *\r\n * @version 1.0 November 2015\r\n */\r\n/** @internal */\r\nexport abstract class AViewRequest {\r\n\t/**\r\n\t * Make a new request.\r\n\t */\r\n\tpublic constructor() {\r\n\t}\r\n\r\n\t/**\r\n\t * Get the frame time.\r\n\t * @return the frame time.\r\n\t */\r\n\tpublic abstract getFrameTime(): float64;\r\n\r\n\t/**\r\n\t * Check if bounds are visible.\r\n\t * @param bounds the bounds (in model space).\r\n\t * @return true if visible.\r\n\t */\r\n\tpublic abstract isVisibleBox(bounds: Bounds): boolean;\r\n\r\n\t/**\r\n\t * Should a tile be split?\r\n * @param level the level of the tile.\r\n * @param tile the tile index.\r\n\t * @return true if the tile should be split into its children.\r\n\t */\r\n\tpublic abstract shouldSplit(level: Level, tile: TileIndex): boolean;\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Block.js","sourceRoot":"","sources":["../../../../src/pointcloud/render/Block.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAYH,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAMxD;;;;GAIG;AACH,gBAAgB;AAChB,MAAM,OAAO,KAAK;IACjB,6BAA6B;IACrB,MAAM,CAAa;IAC3B,6FAA6F;IAC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C,KAAK,CAAC,CAAC;QAC/C,IAAI,IAAI,IAAI,IAAI;YAAE,OAAO,IAAI,CAAC;QAC9B,IAAI,KAAK,GAAU,aAAa,CAAC,CAAC,CAAC;QACnC,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;CACD","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.pointcloud.render;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { Bounds } from \"../../spatial/geom/Bounds\";\nimport { AList } from \"../../system/collection/AList\";\nimport { IntMap } from \"../../system/collection/IntMap\";\nimport { BlockIndex } from \"../model/BlockIndex\";\nimport { GridIndex } from \"../model/GridIndex\";\nimport { TileIndex } from \"../model/TileIndex\";\nimport { Level } from \"./Level\";\n\n/**\n * Class Block defines a block of tiles.\n *\n * @version 1.0 November 2015\n */\n/** @internal */\nexport class Block {\n\t/** The index of the block */\n\tprivate _index: BlockIndex;\n\t/** The full list of tiles in the block (can be null if the tile-list has not been loaded) */\n\tprivate _tileList: Array<TileIndex>;\n\t/** The map of tiles in the block */\n\tprivate _tileMap: IntMap<IntMap<IntMap<TileIndex>>>;\n\n\t/**\n\t * Create a new block.\n\t * @param index the index of the block.\n\t */\n\tpublic constructor(index: BlockIndex) {\n\t\tthis._index = index;\n\t\tthis._tileList = null;\n\t\tthis._tileMap = null;\n\t}\n\n\t/**\n\t * Get the index of the block.\n\t * @return the index of the block.\n\t */\n\tpublic getBlockIndex(): BlockIndex {\n\t\treturn this._index;\n\t}\n\n\t/**\n\t * Get the spatial bounds of the block.\n\t * @param level the level to which the block belongs.\n\t * @return the spatial bounds of the block.\n\t */\n\tpublic getBlockBounds(level: Level): Bounds {\n\t\treturn level.getBlockGrid().getCellBounds(this._index.gridIndex);\n\t}\n\n\t/**\n\t * Add a block to the list of blocks to load.\n * @param blocksToLoad the list of blocks to load.\n * @param block the block to add.\n */\n\tprivate static addToLoadList(blocksToLoad: AList<BlockIndex>, block: BlockIndex): void {\n\t\tfor (let i: number = 0; i < blocksToLoad.size(); i++) if (blocksToLoad.get(i).same(block)) return;\n\t\tblocksToLoad.add(block);\n\t}\n\n\t/**\n\t * Set the tiles in the block.\n\t * @param tileList the list of tiles.\n\t */\n\tpublic setTiles(tileList: Array<TileIndex>): void {\n\t\t/* Store the list */\n\t\tthis._tileList = tileList;\n\t\t/* Make the map */\n\t\tthis._tileMap = new IntMap<IntMap<IntMap<TileIndex>>>();\n\t\tfor (let tile of this._tileList) {\n\t\t\tlet tileX: int32 = tile.gridIndex.x;\n\t\t\tlet yzMap: IntMap<IntMap<TileIndex>> = this._tileMap.get(tileX);\n\t\t\tif (yzMap == null) {\n\t\t\t\tyzMap = new IntMap<IntMap<TileIndex>>();\n\t\t\t\tthis._tileMap.set(tileX, yzMap);\n\t\t\t}\n\t\t\tlet tileY: int32 = tile.gridIndex.y;\n\t\t\tlet zMap: IntMap<TileIndex> = yzMap.get(tileY);\n\t\t\tif (zMap == null) {\n\t\t\t\tzMap = new IntMap<TileIndex>();\n\t\t\t\tyzMap.set(tileY, zMap);\n\t\t\t}\n\t\t\tlet tileZ: int32 = tile.gridIndex.z;\n\t\t\tzMap.set(tileZ, tile);\n\t\t}\n\t}\n\n\t/**\n\t * Have the tiles been set?\n\t * @return true if the tiles have been set.\n\t */\n\tpublic hasTiles(): boolean {\n\t\treturn (this._tileList != null);\n\t}\n\n\t/**\n\t * List all tiles.\n * @param blocksToLoad the list of blocks to load.\n\t * @return all tiles (null if tiles are not loaded).\n\t */\n\tpublic getTiles(blocksToLoad: AList<BlockIndex>): Array<TileIndex> {\n\t\tif (this._tileList == null) {\n\t\t\tBlock.addToLoadList(blocksToLoad, this._index);\n\t\t\treturn null;\n\t\t}\n\t\treturn this._tileList;\n\t}\n\n\t/**\n\t * Find a tile.\n * @param tileGridIndex the grid index of the tile.\n\t * @return the tile (null if not found).\n\t */\n\tpublic findTile(tileGridIndex: GridIndex): TileIndex {\n\t\tif (this._tileMap == null) return null;\n\t\tlet tileX: int32 = tileGridIndex.x;\n\t\tlet yzMap: IntMap<IntMap<TileIndex>> = this._tileMap.get(tileX);\n\t\tif (yzMap == null) return null;\n\t\tlet tileY: int32 = tileGridIndex.y;\n\t\tlet zMap: IntMap<TileIndex> = yzMap.get(tileY);\n\t\tif (zMap == null) return null;\n\t\tlet tileZ: int32 = tileGridIndex.z;\n\t\treturn zMap.get(tileZ);\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Block.js","sourceRoot":"","sources":["../../../../src/pointcloud/render/Block.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAYH,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAMxD;;;;GAIG;AACH,gBAAgB;AAChB,MAAM,OAAO,KAAK;IACjB,6BAA6B;IACrB,MAAM,CAAa;IAC3B,6FAA6F;IACrF,SAAS,CAAmB;IACpC,oCAAoC;IAC5B,QAAQ,CAAoC;IAEpD;;;OAGG;IACH,YAAmB,KAAiB;QACnC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACtB,CAAC;IAED;;;OAGG;IACI,aAAa;QACnB,OAAO,IAAI,CAAC,MAAM,CAAC;IACpB,CAAC;IAED;;;;OAIG;IACI,cAAc,CAAC,KAAY;QACjC,OAAO,KAAK,CAAC,YAAY,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAClE,CAAC;IAED;;;;OAIM;IACE,MAAM,CAAC,aAAa,CAAC,YAA+B,EAAE,KAAiB;QAC9E,KAAK,IAAI,CAAC,GAAW,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IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC;IACjC,CAAC;IAED;;;;OAIG;IACI,QAAQ,CAAC,YAA+B;QAC9C,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,EAAE,CAAC;YAC5B,KAAK,CAAC,aAAa,CAAC,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;YAC/C,OAAO,IAAI,CAAC;QACb,CAAC;QACD,OAAO,IAAI,CAAC,SAAS,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,QAAQ,CAAC,aAAwB;QACvC,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI;YAAE,OAAO,IAAI,CAAC;QACvC,IAAI,KAAK,GAAU,aAAa,CAAC,CAAC,CAAC;QACnC,IAAI,KAAK,GAA8B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAChE,IAAI,KAAK,IAAI,IAAI;YAAE,OAAO,IAAI,CAAC;QAC/B,IAAI,KAAK,GAAU,aAAa,CAAC,CAAC,CAAC;QACnC,IAAI,IAAI,GAAsB,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC/C,IAAI,IAAI,IAAI,IAAI;YAAE,OAAO,IAAI,CAAC;QAC9B,IAAI,KAAK,GAAU,aAAa,CAAC,CAAC,CAAC;QACnC,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;CACD","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\n//package orbitgt.pointcloud.render;\r\n\r\ntype int8 = number;\r\ntype int16 = number;\r\ntype int32 = number;\r\ntype float32 = number;\r\ntype float64 = number;\r\n\r\nimport { Bounds } from \"../../spatial/geom/Bounds\";\r\nimport { AList } from \"../../system/collection/AList\";\r\nimport { IntMap } from \"../../system/collection/IntMap\";\r\nimport { BlockIndex } from \"../model/BlockIndex\";\r\nimport { GridIndex } from \"../model/GridIndex\";\r\nimport { TileIndex } from \"../model/TileIndex\";\r\nimport { Level } from \"./Level\";\r\n\r\n/**\r\n * Class Block defines a block of tiles.\r\n *\r\n * @version 1.0 November 2015\r\n */\r\n/** @internal */\r\nexport class Block {\r\n\t/** The index of the block */\r\n\tprivate _index: BlockIndex;\r\n\t/** The full list of tiles in the block (can be null if the tile-list has not been loaded) */\r\n\tprivate _tileList: Array<TileIndex>;\r\n\t/** The map of tiles in the block */\r\n\tprivate _tileMap: IntMap<IntMap<IntMap<TileIndex>>>;\r\n\r\n\t/**\r\n\t * Create a new block.\r\n\t * @param index the index of the block.\r\n\t */\r\n\tpublic constructor(index: BlockIndex) {\r\n\t\tthis._index = index;\r\n\t\tthis._tileList = null;\r\n\t\tthis._tileMap = null;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the index of the block.\r\n\t * @return the index of the block.\r\n\t */\r\n\tpublic getBlockIndex(): BlockIndex {\r\n\t\treturn this._index;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the spatial bounds of the block.\r\n\t * @param level the level to which the block belongs.\r\n\t * @return the spatial bounds of the block.\r\n\t */\r\n\tpublic getBlockBounds(level: Level): Bounds {\r\n\t\treturn level.getBlockGrid().getCellBounds(this._index.gridIndex);\r\n\t}\r\n\r\n\t/**\r\n\t * Add a block to the list of blocks to load.\r\n * @param blocksToLoad the list of blocks to load.\r\n * @param block the block to add.\r\n */\r\n\tprivate static addToLoadList(blocksToLoad: AList<BlockIndex>, block: BlockIndex): void {\r\n\t\tfor (let i: number = 0; i < blocksToLoad.size(); i++) if (blocksToLoad.get(i).same(block)) return;\r\n\t\tblocksToLoad.add(block);\r\n\t}\r\n\r\n\t/**\r\n\t * Set the tiles in the block.\r\n\t * @param tileList the list of tiles.\r\n\t */\r\n\tpublic setTiles(tileList: Array<TileIndex>): void {\r\n\t\t/* Store the list */\r\n\t\tthis._tileList = tileList;\r\n\t\t/* Make the map */\r\n\t\tthis._tileMap = new IntMap<IntMap<IntMap<TileIndex>>>();\r\n\t\tfor (let tile of this._tileList) {\r\n\t\t\tlet tileX: int32 = tile.gridIndex.x;\r\n\t\t\tlet yzMap: IntMap<IntMap<TileIndex>> = this._tileMap.get(tileX);\r\n\t\t\tif (yzMap == null) {\r\n\t\t\t\tyzMap = new IntMap<IntMap<TileIndex>>();\r\n\t\t\t\tthis._tileMap.set(tileX, yzMap);\r\n\t\t\t}\r\n\t\t\tlet tileY: int32 = tile.gridIndex.y;\r\n\t\t\tlet zMap: IntMap<TileIndex> = yzMap.get(tileY);\r\n\t\t\tif (zMap == null) {\r\n\t\t\t\tzMap = new IntMap<TileIndex>();\r\n\t\t\t\tyzMap.set(tileY, zMap);\r\n\t\t\t}\r\n\t\t\tlet tileZ: int32 = tile.gridIndex.z;\r\n\t\t\tzMap.set(tileZ, tile);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Have the tiles been set?\r\n\t * @return true if the tiles have been set.\r\n\t */\r\n\tpublic hasTiles(): boolean {\r\n\t\treturn (this._tileList != null);\r\n\t}\r\n\r\n\t/**\r\n\t * List all tiles.\r\n * @param blocksToLoad the list of blocks to load.\r\n\t * @return all tiles (null if tiles are not loaded).\r\n\t */\r\n\tpublic getTiles(blocksToLoad: AList<BlockIndex>): Array<TileIndex> {\r\n\t\tif (this._tileList == null) {\r\n\t\t\tBlock.addToLoadList(blocksToLoad, this._index);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn this._tileList;\r\n\t}\r\n\r\n\t/**\r\n\t * Find a tile.\r\n * @param tileGridIndex the grid index of the tile.\r\n\t * @return the tile (null if not found).\r\n\t */\r\n\tpublic findTile(tileGridIndex: GridIndex): TileIndex {\r\n\t\tif (this._tileMap == null) return null;\r\n\t\tlet tileX: int32 = tileGridIndex.x;\r\n\t\tlet yzMap: IntMap<IntMap<TileIndex>> = this._tileMap.get(tileX);\r\n\t\tif (yzMap == null) return null;\r\n\t\tlet tileY: int32 = tileGridIndex.y;\r\n\t\tlet zMap: IntMap<TileIndex> = yzMap.get(tileY);\r\n\t\tif (zMap == null) return null;\r\n\t\tlet tileZ: int32 = tileGridIndex.z;\r\n\t\treturn zMap.get(tileZ);\r\n\t}\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataManager.js","sourceRoot":"","sources":["../../../../src/pointcloud/render/DataManager.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAYH,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAMnE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;GAIG;AACH,gBAAgB;AAChB,MAAM,OAAO,WAAW;IACvB,8BAA8B;IACtB,MAAM,CAAU,MAAM,GAAW,aAAa,CAAC;IAEvD,wDAAwD;IAChD,MAAM,CAAU,qBAAqB,GAAU,GAAG,GAAG,IAAI,CAAC;IAClE,4DAA4D;IACpD,MAAM,CAAU,qBAAqB,GAAY,CAAC,GAAG,IAAI,CAAC;IAElE,mCAAmC;IAC3B,iBAAiB,CAAmB;IAC5C,iCAAiC;IACzB,cAAc,CAAS;IAC/B,8BAA8B;IACtB,WAAW,CAAQ;IAE3B,wBAAwB;IAChB,cAAc,CAAW;IACjC,oBAAoB;IACZ,SAAS,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AAQ,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;YAClD,uBAAuB;YACvB,IAAI,OAAO,GAAW,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACtC,IAAI,SAAS,GAAc,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YACvD,cAAc;YACd,IAAI,SAAS,CAAC,SAAS,CAAC,UAAU,GAAG,UAAU,EAAE,CAAC;gBACjD,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBAC/B,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBAClC,SAAS,EAAE,CAAC;YACb,CAAC;QACF,CAAC;QACD,UAAU;QACV,IAAI,SAAS,GAAG,CAAC;YAAE,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,EAAE,4BAA4B,GAAG,SAAS,GAAG,QAAQ,CAAC,CAAC;IAC3G,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.pointcloud.render;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { Bounds } from \"../../spatial/geom/Bounds\";\nimport { Transform } from \"../../spatial/geom/Transform\";\nimport { AList } from \"../../system/collection/AList\";\nimport { StringMap } from \"../../system/collection/StringMap\";\nimport { ALong } from \"../../system/runtime/ALong\";\nimport { ASystem } from \"../../system/runtime/ASystem\";\nimport { Message } from \"../../system/runtime/Message\";\nimport { ContentLoader } from \"../../system/storage/ContentLoader\";\nimport { BlockIndex } from \"../model/BlockIndex\";\nimport { Grid } from \"../model/Grid\";\nimport { PointCloudReader } from \"../model/PointCloudReader\";\nimport { PointData } from \"../model/PointData\";\nimport { TileIndex } from \"../model/TileIndex\";\nimport { Block } from \"./Block\";\nimport { FrameData } from \"./FrameData\";\nimport { Level } from \"./Level\";\nimport { ViewTree } from \"./ViewTree\";\n\n/**\n * Class DataManager manages the (shared) data model part of the rendering in multiple layers (see the CLOUD-461 issue).\n *\n * @version 1.0 December 2017\n */\n/** @internal */\nexport class DataManager {\n\t/** The name of this module */\n\tprivate static readonly MODULE: string = \"DataManager\";\n\n\t/** The maximum size of a single file-content request */\n\tprivate static readonly MAX_FILE_CONTENT_SIZE: int32 = 128 * 1024;\n\t/** The expire time to unload unused point data (seconds) */\n\tprivate static readonly POINT_DATA_EXIRE_TIME: float64 = 5 * 60.0;\n\n\t/** The reader of the pointcloud */\n\tprivate _pointCloudReader: PointCloudReader;\n\t/*** The CRS of the pointcloud */\n\tprivate _pointCloudCRS: string;\n\t/** The data format to read */\n\tprivate _dataFormat: int32;\n\n\t/** The spatial index */\n\tprivate _fileTileIndex: ViewTree;\n\t/** The data pool */\n\tprivate _dataPool: StringMap<PointData>;\n\t/** The set of levels we requested (index) */\n\tprivate _levelsLoading: StringMap<Level>;\n\t/** The set of levels we received (index) */\n\tprivate _levelsLoaded: StringMap<Level>;\n\t/** The set of blocks we requested (key) */\n\tprivate _blocksLoading: StringMap<BlockIndex>;\n\t/** The set of blocks we received (key) */\n\tprivate _blocksLoaded: StringMap<BlockIndex>;\n\t/** The set of tiles we requested (key) */\n\tprivate _tilesLoading: StringMap<TileIndex>;\n\t/** The set of tiles we received (key) */\n\tprivate _tilesLoaded: StringMap<TileIndex>;\n\t/** Is new data being loaded? */\n\tprivate _loadingData: boolean;\n\t/** The time when the data loading stopped */\n\tprivate _loadedDataTime: float64;\n\t/** The total size of data that has been loaded */\n\tprivate _dataLoadSize: ALong;\n\n\t/** The last garbage collection time */\n\tprivate _lastGarbageCollectTime: float64;\n\n\t/**\n\t * Create a new data model (to be shared between different views).\n\t * @param pointCloudReader the reader of the pointcloud file.\n\t * @param pointCloudCRS the CRS of the point cloud.\n\t * @param dataFormat the requested data format to load point data (PointDataRaw.TYPE for example).\n\t */\n\tpublic constructor(pointCloudReader: PointCloudReader, pointCloudCRS: string, dataFormat: int32) {\n\t\t/* Store the parameters */\n\t\tthis._pointCloudReader = pointCloudReader;\n\t\tthis._pointCloudCRS = pointCloudCRS;\n\t\tthis._dataFormat = dataFormat;\n\t\t/* Initialize */\n\t\tif (this._pointCloudCRS == null) this._pointCloudCRS = this._pointCloudReader.getFileCRS();\n\t\t/* Clear */\n\t\tthis._fileTileIndex = this.createSpatialIndex();\n\t\tthis._dataPool = new StringMap<PointData>();\n\t\tthis._levelsLoading = new StringMap<Level>();\n\t\tthis._levelsLoaded = new StringMap<Level>();\n\t\tthis._blocksLoading = new StringMap<BlockIndex>();\n\t\tthis._blocksLoaded = new StringMap<BlockIndex>();\n\t\tthis._tilesLoading = new StringMap<TileIndex>();\n\t\tthis._tilesLoaded = new StringMap<TileIndex>();\n\t\tthis._loadingData = false;\n\t\tthis._loadedDataTime = 0.0;\n\t\tthis._dataLoadSize = ALong.ZERO;\n\t\tthis._lastGarbageCollectTime = 0.0;\n\t\t/* Log */\n\t\tMessage.print(DataManager.MODULE, \"Pointcloud CRS is \" + this._pointCloudCRS);\n\t}\n\n\t/**\n\t * Close the data model.\n\t */\n\tpublic close(): void {\n\t\tif (this._pointCloudReader != null) {\n\t\t\tthis._pointCloudReader.close();\n\t\t\tthis._pointCloudReader = null;\n\t\t}\n\t\tthis._fileTileIndex = null;\n\t\tthis._dataPool.clear();\n\t\tthis._levelsLoading.clear();\n\t\tthis._levelsLoaded.clear();\n\t\tthis._blocksLoading.clear();\n\t\tthis._blocksLoaded.clear();\n\t\tthis._tilesLoading.clear();\n\t\tthis._tilesLoaded.clear();\n\t}\n\n\t/**\n\t * Create a spatial index of a pointcloud.\n\t * @return the spatial index.\n\t */\n\tprivate createSpatialIndex(): ViewTree {\n\t\t/* Create the levels */\n\t\tMessage.print(DataManager.MODULE, \"Creating pointcloud spatial index\");\n\t\tlet levels: Array<Level> = new Array<Level>(this._pointCloudReader.getLevelCount());\n\t\tfor (let i: number = 0; i < levels.length; i++) {\n\t\t\t/* Get the grids */\n\t\t\tlet blockGrid: Grid = this._pointCloudReader.getLevelBlockGrid(i);\n\t\t\tlet tileGrid: Grid = this._pointCloudReader.getLevelTileGrid(i);\n\t\t\t/* Get the blocks */\n\t\t\tlet blockIndexes: Array<BlockIndex> = this._pointCloudReader.peekBlockIndexes(i);\n\t\t\tlet blockList: Array<Block> = new Array<Block>(blockIndexes.length);\n\t\t\tfor (let j: number = 0; j < blockList.length; j++) blockList[j] = new Block(blockIndexes[j]);\n\t\t\t/* Create the level */\n\t\t\tlevels[i] = new Level(i, blockGrid, tileGrid, blockList);\n\t\t\tMessage.print(DataManager.MODULE, \"Level \" + i + \" has \" + blockList.length + \" blocks\");\n\t\t}\n\t\t/* Get the data bounds */\n\t\tlet dataBounds: Bounds = this._pointCloudReader.getFileBounds();\n\t\tMessage.print(DataManager.MODULE, \"The data bounds are \" + dataBounds);\n\t\t/* Return a new spatial index */\n\t\treturn new ViewTree(this, levels, dataBounds);\n\t}\n\n\t/**\n\t * Get the pointcloud reader.\n\t * @return the pointcloud reader.\n\t */\n\tpublic getPointCloudReader(): PointCloudReader {\n\t\treturn this._pointCloudReader;\n\t}\n\n\t/**\n\t * Get the pointcloud CRS.\n\t * @return the pointcloud CRS.\n\t */\n\tpublic getPointCloudCRS(): string {\n\t\treturn this._pointCloudCRS;\n\t}\n\n\t/**\n\t * Get the bounds of the data.\n\t * @return the bounds of the data.\n\t */\n\tpublic getPointCloudBounds(): Bounds {\n\t\treturn this._pointCloudReader.getFileBounds();\n\t}\n\n\t/**\n\t * Get the spatial index.\n\t * @return the spatial index.\n\t */\n\tpublic getViewTree(): ViewTree {\n\t\treturn this._fileTileIndex;\n\t}\n\n\t/**\n\t * Check if a tile has been loaded to the data pool.\n\t * @param tileIndex the index of the tile.\n\t * @return the point data if loaded, null otherwise.\n\t */\n\tpublic isTileLoaded(tileIndex: TileIndex): PointData {\n\t\treturn this._dataPool.get(tileIndex.key);\n\t}\n\n\t/**\n\t * Is the model loading data?\n\t * @return true when loading data.\n\t */\n\tpublic isLoadingData(): boolean {\n\t\treturn this._loadingData;\n\t}\n\n\t/**\n\t * Get the size of the loaded data.\n\t * @return the size of the loaded data.\n\t */\n\tpublic getDataLoadSize(): ALong {\n\t\treturn this._dataLoadSize;\n\t}\n\n\t/**\n\t * Filter the list of blocks and tiles that should be loaded.\n\t * @param levelsToLoad the list of levels to load.\n\t * @param blocksToLoad the list of blocks to load.\n\t * @param tilesToLoad the list of tiles to load.\n\t * @param levelList the filtered list of levels to load.\n\t * @param blockList the filtered list of blocks to load.\n\t * @param tileList the filtered list of tiles to load.\n\t */\n\tpublic filterLoadList(levelsToLoad: AList<Level>, blocksToLoad: AList<BlockIndex>, tilesToLoad: AList<TileIndex>, levelList: AList<Level>, blockList: AList<BlockIndex>, tileList: AList<TileIndex>): void {\n\t\t/* Filter the levels to load */\n\t\tfor (let i: number = 0; i < levelsToLoad.size(); i++) {\n\t\t\t/* Do not request the same level twice */\n\t\t\tlet level: Level = levelsToLoad.get(i);\n\t\t\tif (this._levelsLoading.contains(level.getKey())) continue;\n\t\t\tif (this._levelsLoaded.contains(level.getKey())) continue;\n\t\t\t/* Add the level */\n\t\t\tlevelList.add(level);\n\t\t}\n\t\tlevelsToLoad.clear();\n\t\t/* Filter the blocks to load */\n\t\tfor (let i: number = 0; i < blocksToLoad.size(); i++) {\n\t\t\t/* Do not request the same block twice */\n\t\t\tlet blockIndex: BlockIndex = blocksToLoad.get(i);\n\t\t\tif (this._blocksLoading.contains(blockIndex.key)) continue;\n\t\t\tif (this._blocksLoaded.contains(blockIndex.key)) continue;\n\t\t\t/* Add the block */\n\t\t\tblockList.add(blockIndex);\n\t\t}\n\t\tblocksToLoad.clear();\n\t\t/* Filter the tiles to load */\n\t\tfor (let i: number = 0; i < tilesToLoad.size(); i++) {\n\t\t\t/* Do not request the same tile twice */\n\t\t\tlet tileIndex: TileIndex = tilesToLoad.get(i);\n\t\t\tif (this._tilesLoading.contains(tileIndex.key)) continue;\n\t\t\tif (this._tilesLoaded.contains(tileIndex.key)) continue;\n\t\t\t/* Add the tile */\n\t\t\ttileList.add(tileIndex);\n\t\t}\n\t\ttilesToLoad.clear();\n\t}\n\n\t/**\n\t * Load blocks and tiles.\n\t * @param layer the layer requesting the load.\n\t * @param levelList the filtered list of levels to load.\n\t * @param blockList the filtered list of blocks to load.\n\t * @param tileList the filtered list of tiles to load.\n\t * @return the data model.\n\t */\n\tpublic async loadData(frameData: FrameData): Promise<FrameData> {\n\t\t/* No data to load? */\n\t\tif (frameData.hasMissingData() == false) return frameData;\n\t\t/* Do not make overlapping load requests */\n\t\tif (this._loadingData) return frameData;\n\t\tthis._loadingData = true;\n\t\t/* Log */\n\t\tlet levelList: AList<Level> = frameData.levelsToLoad;\n\t\tlet blockList: AList<BlockIndex> = frameData.blocksToLoad;\n\t\tlet tileList: AList<TileIndex> = frameData.tilesToLoad;\n\t\t//\t\tMessage.print(MODULE,\"Loading \"+levelList.size()+\" levels, \"+blockList.size()+\" blocks and \"+tileList.size()+\" tiles\");\n\t\t//\t\tMessage.print(MODULE,\"Already loaded \"+this._blocksLoaded.size()+\" blocks\");\n\t\t//\t\tMessage.print(MODULE,\"Already loading \"+this._blocksLoading.size()+\" blocks\");\n\t\t//\t\tMessage.print(MODULE,\"Already loaded \"+this._tilesLoaded.size()+\" tiles\");\n\t\t//\t\tMessage.print(MODULE,\"Already loading \"+this._tilesLoading.size()+\" tiles\");\n\t\t/* Define the content we are going to need */\n\t\tlet loadTime: float64 = ASystem.time();\n\t\tlet fileContents: ContentLoader = new ContentLoader(this._pointCloudReader.getFileStorage(), this._pointCloudReader.getFileName());\n\t\t/* Prepare the loading of the levels */\n\t\tfor (let i: number = 0; i < levelList.size(); i++) {\n\t\t\t/* Prepare to load the block */\n\t\t\tlet level: Level = levelList.get(i);\n\t\t\tthis._levelsLoading.set(level.getKey(), level);\n\t\t\tthis._pointCloudReader.readBlockIndexes(level.getIndex(), fileContents);\n\t\t\tMessage.print(DataManager.MODULE, \"Loading level \" + level.getIndex());\n\t\t}\n\t\t/* Prepare the loading of the blocks */\n\t\tfor (let i: number = 0; i < blockList.size(); i++) {\n\t\t\t/* Prepare to load the block */\n\t\t\tlet blockIndex: BlockIndex = blockList.get(i);\n\t\t\tthis._blocksLoading.set(blockIndex.key, blockIndex);\n\t\t\tthis._pointCloudReader.readTileIndexes(blockIndex, fileContents);\n\t\t}\n\t\t/* Prepare the loading of the tiles */\n\t\tlet loadTileCount: int32 = 0;\n\t\tfor (let i: number = 0; i < tileList.size(); i++) {\n\t\t\t/* Prepare to load the tile */\n\t\t\tlet tileIndex: TileIndex = tileList.get(i);\n\t\t\tthis._tilesLoading.set(tileIndex.key, tileIndex);\n\t\t\tthis._pointCloudReader.readPointData(tileIndex, this._dataFormat, loadTime, fileContents);\n\t\t\tloadTileCount++;\n\t\t\t/* Do not load too many tiles at once */\n\t\t\tif (fileContents.getTotalRequestSize() > DataManager.MAX_FILE_CONTENT_SIZE) {\n\t\t\t\t/* Stop loading tiles */\n\t\t\t\tMessage.print(DataManager.MODULE, \"Limited pointcloud content load request to \" + fileContents.getTotalRequestSize() + \" bytes\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t/* Log */\n\t\tMessage.print(DataManager.MODULE, \"Loading of \" + blockList.size() + \" blocks, \" + loadTileCount + \"/\" + tileList.size() + \" tiles, \" + fileContents.getTotalRequestSize() + \" bytes\");\n\t\t/* Load the data */\n\t\tthis._dataLoadSize = this._dataLoadSize.addInt(fileContents.getTotalRequestSize());\n\t\tfileContents = await fileContents.load();\n\t\t//Message.print(MODULE,\"Creating \"+blockList.size()+\" blocks and \"+tileList.size()+\" tiles\");\n\t\t/* Load the levels */\n\t\tfor (let i: number = 0; i < levelList.size(); i++) {\n\t\t\t/* Load the block list */\n\t\t\tlet level: Level = levelList.get(i);\n\t\t\tthis._levelsLoaded.set(level.getKey(), level);\n\t\t\tthis._levelsLoading.remove(level.getKey());\n\t\t\tlet blockIndexes: Array<BlockIndex> = this._pointCloudReader.readBlockIndexes(level.getIndex(), fileContents);\n\t\t\t/* Add the blocks */\n\t\t\tthis._fileTileIndex.setLevelBlocks(level, blockIndexes);\n\t\t}\n\t\t/* Load the blocks */\n\t\tfor (let i: number = 0; i < blockList.size(); i++) {\n\t\t\t/* Load the block */\n\t\t\tlet blockIndex: BlockIndex = blockList.get(i);\n\t\t\tthis._blocksLoaded.set(blockIndex.key, blockIndex);\n\t\t\tthis._blocksLoading.remove(blockIndex.key);\n\t\t\tlet tileIndexes: Array<TileIndex> = this._pointCloudReader.readTileIndexes(blockIndex, fileContents);\n\t\t\t/* Add the block */\n\t\t\tthis._fileTileIndex.setBlockTiles(blockIndex, tileIndexes);\n\t\t}\n\t\t/* Load the tiles */\n\t\tlet newTiles: AList<TileIndex> = new AList<TileIndex>();\n\t\tfor (let i: number = 0; i < loadTileCount; i++) {\n\t\t\t/* Get the next tile */\n\t\t\tlet tileIndex: TileIndex = tileList.get(i);\n\t\t\tnewTiles.add(tileIndex);\n\t\t\t/* Load the tile */\n\t\t\tthis._tilesLoaded.set(tileIndex.key, tileIndex);\n\t\t\tthis._tilesLoading.remove(tileIndex.key);\n\t\t\tlet pointData: PointData = this._pointCloudReader.readPointData(tileIndex, this._dataFormat, loadTime, fileContents);\n\t\t\t/* Add the tile */\n\t\t\tthis._dataPool.set(tileIndex.key, pointData);\n\t\t}\n\t\t/* We stopped loading */\n\t\tthis._loadingData = false;\n\t\tthis._loadedDataTime = ASystem.time();\n\t\t/* Log */\n\t\tMessage.print(DataManager.MODULE, \"Created \" + blockList.size() + \" blocks and \" + loadTileCount + \" tiles\");\n\t\t/* Return the frame data */\n\t\treturn frameData;\n\t}\n\n\t/**\n\t * Do a garbage collect (this method can be called often, it throttles itself to once per minute).\n\t * @param time the current time.\n\t */\n\tpublic doGarbageCollect(time: float64): void {\n\t\t/* First call? */\n\t\tif (this._lastGarbageCollectTime == 0.0) this._lastGarbageCollectTime = time;\n\t\t/* Throttle to one per minute */\n\t\tif (time < this._lastGarbageCollectTime + 60.0) return;\n\t\tthis._lastGarbageCollectTime = time;\n\t\t/* Define the expire time */\n\t\tlet expireTime: float64 = (time - DataManager.POINT_DATA_EXIRE_TIME);\n\t\t/* Check all loaded tiles */\n\t\tlet dropCount: int32 = 0;\n\t\tlet dataKeys: AList<string> = this._dataPool.keys();\n\t\tfor (let i: number = 0; i < dataKeys.size(); i++) {\n\t\t\t/* Get the next tile */\n\t\t\tlet tileKey: string = dataKeys.get(i);\n\t\t\tlet pointData: PointData = this._dataPool.get(tileKey);\n\t\t\t/* Expired? */\n\t\t\tif (pointData.tileIndex.accessTime < expireTime) {\n\t\t\t\tthis._dataPool.remove(tileKey);\n\t\t\t\tthis._tilesLoaded.remove(tileKey);\n\t\t\t\tdropCount++;\n\t\t\t}\n\t\t}\n\t\t/* Log? */\n\t\tif (dropCount > 0) Message.print(DataManager.MODULE, \"Dropped the point data of \" + dropCount + \" tiles\");\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"DataManager.js","sourceRoot":"","sources":["../../../../src/pointcloud/render/DataManager.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAYH,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAMnE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MA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E,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC;QAC7E,gCAAgC;QAChC,IAAI,IAAI,GAAG,IAAI,CAAC,uBAAuB,GAAG,IAAI;YAAE,OAAO;QACvD,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC;QACpC,4BAA4B;QAC5B,IAAI,UAAU,GAAY,CAAC,IAAI,GAAG,WAAW,CAAC,qBAAqB,CAAC,CAAC;QACrE,4BAA4B;QAC5B,IAAI,SAAS,GAAU,CAAC,CAAC;QACzB,IAAI,QAAQ,GAAkB,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QACpD,KAAK,IAAI,CAAC,GAAW,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;YAClD,uBAAuB;YACvB,IAAI,OAAO,GAAW,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACtC,IAAI,SAAS,GAAc,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YACvD,cAAc;YACd,IAAI,SAAS,CAAC,SAAS,CAAC,UAAU,GAAG,UAAU,EAAE,CAAC;gBACjD,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBAC/B,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBAClC,SAAS,EAAE,CAAC;YACb,CAAC;QACF,CAAC;QACD,UAAU;QACV,IAAI,SAAS,GAAG,CAAC;YAAE,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,EAAE,4BAA4B,GAAG,SAAS,GAAG,QAAQ,CAAC,CAAC;IAC3G,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\n//package orbitgt.pointcloud.render;\r\n\r\ntype int8 = number;\r\ntype int16 = number;\r\ntype int32 = number;\r\ntype float32 = number;\r\ntype float64 = number;\r\n\r\nimport { Bounds } from \"../../spatial/geom/Bounds\";\r\nimport { Transform } from \"../../spatial/geom/Transform\";\r\nimport { AList } from \"../../system/collection/AList\";\r\nimport { StringMap } from \"../../system/collection/StringMap\";\r\nimport { ALong } from \"../../system/runtime/ALong\";\r\nimport { ASystem } from \"../../system/runtime/ASystem\";\r\nimport { Message } from \"../../system/runtime/Message\";\r\nimport { ContentLoader } from \"../../system/storage/ContentLoader\";\r\nimport { BlockIndex } from \"../model/BlockIndex\";\r\nimport { Grid } from \"../model/Grid\";\r\nimport { PointCloudReader } from \"../model/PointCloudReader\";\r\nimport { PointData } from \"../model/PointData\";\r\nimport { TileIndex } from \"../model/TileIndex\";\r\nimport { Block } from \"./Block\";\r\nimport { FrameData } from \"./FrameData\";\r\nimport { Level } from \"./Level\";\r\nimport { ViewTree } from \"./ViewTree\";\r\n\r\n/**\r\n * Class DataManager manages the (shared) data model part of the rendering in multiple layers (see the CLOUD-461 issue).\r\n *\r\n * @version 1.0 December 2017\r\n */\r\n/** @internal */\r\nexport class DataManager {\r\n\t/** The name of this module */\r\n\tprivate static readonly MODULE: string = \"DataManager\";\r\n\r\n\t/** The maximum size of a single file-content request */\r\n\tprivate static readonly MAX_FILE_CONTENT_SIZE: int32 = 128 * 1024;\r\n\t/** The expire time to unload unused point data (seconds) */\r\n\tprivate static readonly POINT_DATA_EXIRE_TIME: float64 = 5 * 60.0;\r\n\r\n\t/** The reader of the pointcloud */\r\n\tprivate _pointCloudReader: PointCloudReader;\r\n\t/*** The CRS of the pointcloud */\r\n\tprivate _pointCloudCRS: string;\r\n\t/** The data format to read */\r\n\tprivate _dataFormat: int32;\r\n\r\n\t/** The spatial index */\r\n\tprivate _fileTileIndex: ViewTree;\r\n\t/** The data pool */\r\n\tprivate _dataPool: StringMap<PointData>;\r\n\t/** The set of levels we requested (index) */\r\n\tprivate _levelsLoading: StringMap<Level>;\r\n\t/** The set of levels we received (index) */\r\n\tprivate _levelsLoaded: StringMap<Level>;\r\n\t/** The set of blocks we requested (key) */\r\n\tprivate _blocksLoading: StringMap<BlockIndex>;\r\n\t/** The set of blocks we received (key) */\r\n\tprivate _blocksLoaded: StringMap<BlockIndex>;\r\n\t/** The set of tiles we requested (key) */\r\n\tprivate _tilesLoading: StringMap<TileIndex>;\r\n\t/** The set of tiles we received (key) */\r\n\tprivate _tilesLoaded: StringMap<TileIndex>;\r\n\t/** Is new data being loaded? */\r\n\tprivate _loadingData: boolean;\r\n\t/** The time when the data loading stopped */\r\n\tprivate _loadedDataTime: float64;\r\n\t/** The total size of data that has been loaded */\r\n\tprivate _dataLoadSize: ALong;\r\n\r\n\t/** The last garbage collection time */\r\n\tprivate _lastGarbageCollectTime: float64;\r\n\r\n\t/**\r\n\t * Create a new data model (to be shared between different views).\r\n\t * @param pointCloudReader the reader of the pointcloud file.\r\n\t * @param pointCloudCRS the CRS of the point cloud.\r\n\t * @param dataFormat the requested data format to load point data (PointDataRaw.TYPE for example).\r\n\t */\r\n\tpublic constructor(pointCloudReader: PointCloudReader, pointCloudCRS: string, dataFormat: int32) {\r\n\t\t/* Store the parameters */\r\n\t\tthis._pointCloudReader = pointCloudReader;\r\n\t\tthis._pointCloudCRS = pointCloudCRS;\r\n\t\tthis._dataFormat = dataFormat;\r\n\t\t/* Initialize */\r\n\t\tif (this._pointCloudCRS == null) this._pointCloudCRS = this._pointCloudReader.getFileCRS();\r\n\t\t/* Clear */\r\n\t\tthis._fileTileIndex = this.createSpatialIndex();\r\n\t\tthis._dataPool = new StringMap<PointData>();\r\n\t\tthis._levelsLoading = new StringMap<Level>();\r\n\t\tthis._levelsLoaded = new StringMap<Level>();\r\n\t\tthis._blocksLoading = new StringMap<BlockIndex>();\r\n\t\tthis._blocksLoaded = new StringMap<BlockIndex>();\r\n\t\tthis._tilesLoading = new StringMap<TileIndex>();\r\n\t\tthis._tilesLoaded = new StringMap<TileIndex>();\r\n\t\tthis._loadingData = false;\r\n\t\tthis._loadedDataTime = 0.0;\r\n\t\tthis._dataLoadSize = ALong.ZERO;\r\n\t\tthis._lastGarbageCollectTime = 0.0;\r\n\t\t/* Log */\r\n\t\tMessage.print(DataManager.MODULE, \"Pointcloud CRS is \" + this._pointCloudCRS);\r\n\t}\r\n\r\n\t/**\r\n\t * Close the data model.\r\n\t */\r\n\tpublic close(): void {\r\n\t\tif (this._pointCloudReader != null) {\r\n\t\t\tthis._pointCloudReader.close();\r\n\t\t\tthis._pointCloudReader = null;\r\n\t\t}\r\n\t\tthis._fileTileIndex = null;\r\n\t\tthis._dataPool.clear();\r\n\t\tthis._levelsLoading.clear();\r\n\t\tthis._levelsLoaded.clear();\r\n\t\tthis._blocksLoading.clear();\r\n\t\tthis._blocksLoaded.clear();\r\n\t\tthis._tilesLoading.clear();\r\n\t\tthis._tilesLoaded.clear();\r\n\t}\r\n\r\n\t/**\r\n\t * Create a spatial index of a pointcloud.\r\n\t * @return the spatial index.\r\n\t */\r\n\tprivate createSpatialIndex(): ViewTree {\r\n\t\t/* Create the levels */\r\n\t\tMessage.print(DataManager.MODULE, \"Creating pointcloud spatial index\");\r\n\t\tlet levels: Array<Level> = new Array<Level>(this._pointCloudReader.getLevelCount());\r\n\t\tfor (let i: number = 0; i < levels.length; i++) {\r\n\t\t\t/* Get the grids */\r\n\t\t\tlet blockGrid: Grid = this._pointCloudReader.getLevelBlockGrid(i);\r\n\t\t\tlet tileGrid: Grid = this._pointCloudReader.getLevelTileGrid(i);\r\n\t\t\t/* Get the blocks */\r\n\t\t\tlet blockIndexes: Array<BlockIndex> = this._pointCloudReader.peekBlockIndexes(i);\r\n\t\t\tlet blockList: Array<Block> = new Array<Block>(blockIndexes.length);\r\n\t\t\tfor (let j: number = 0; j < blockList.length; j++) blockList[j] = new Block(blockIndexes[j]);\r\n\t\t\t/* Create the level */\r\n\t\t\tlevels[i] = new Level(i, blockGrid, tileGrid, blockList);\r\n\t\t\tMessage.print(DataManager.MODULE, \"Level \" + i + \" has \" + blockList.length + \" blocks\");\r\n\t\t}\r\n\t\t/* Get the data bounds */\r\n\t\tlet dataBounds: Bounds = this._pointCloudReader.getFileBounds();\r\n\t\tMessage.print(DataManager.MODULE, \"The data bounds are \" + dataBounds);\r\n\t\t/* Return a new spatial index */\r\n\t\treturn new ViewTree(this, levels, dataBounds);\r\n\t}\r\n\r\n\t/**\r\n\t * Get the pointcloud reader.\r\n\t * @return the pointcloud reader.\r\n\t */\r\n\tpublic getPointCloudReader(): PointCloudReader {\r\n\t\treturn this._pointCloudReader;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the pointcloud CRS.\r\n\t * @return the pointcloud CRS.\r\n\t */\r\n\tpublic getPointCloudCRS(): string {\r\n\t\treturn this._pointCloudCRS;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the bounds of the data.\r\n\t * @return the bounds of the data.\r\n\t */\r\n\tpublic getPointCloudBounds(): Bounds {\r\n\t\treturn this._pointCloudReader.getFileBounds();\r\n\t}\r\n\r\n\t/**\r\n\t * Get the spatial index.\r\n\t * @return the spatial index.\r\n\t */\r\n\tpublic getViewTree(): ViewTree {\r\n\t\treturn this._fileTileIndex;\r\n\t}\r\n\r\n\t/**\r\n\t * Check if a tile has been loaded to the data pool.\r\n\t * @param tileIndex the index of the tile.\r\n\t * @return the point data if loaded, null otherwise.\r\n\t */\r\n\tpublic isTileLoaded(tileIndex: TileIndex): PointData {\r\n\t\treturn this._dataPool.get(tileIndex.key);\r\n\t}\r\n\r\n\t/**\r\n\t * Is the model loading data?\r\n\t * @return true when loading data.\r\n\t */\r\n\tpublic isLoadingData(): boolean {\r\n\t\treturn this._loadingData;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the size of the loaded data.\r\n\t * @return the size of the loaded data.\r\n\t */\r\n\tpublic getDataLoadSize(): ALong {\r\n\t\treturn this._dataLoadSize;\r\n\t}\r\n\r\n\t/**\r\n\t * Filter the list of blocks and tiles that should be loaded.\r\n\t * @param levelsToLoad the list of levels to load.\r\n\t * @param blocksToLoad the list of blocks to load.\r\n\t * @param tilesToLoad the list of tiles to load.\r\n\t * @param levelList the filtered list of levels to load.\r\n\t * @param blockList the filtered list of blocks to load.\r\n\t * @param tileList the filtered list of tiles to load.\r\n\t */\r\n\tpublic filterLoadList(levelsToLoad: AList<Level>, blocksToLoad: AList<BlockIndex>, tilesToLoad: AList<TileIndex>, levelList: AList<Level>, blockList: AList<BlockIndex>, tileList: AList<TileIndex>): void {\r\n\t\t/* Filter the levels to load */\r\n\t\tfor (let i: number = 0; i < levelsToLoad.size(); i++) {\r\n\t\t\t/* Do not request the same level twice */\r\n\t\t\tlet level: Level = levelsToLoad.get(i);\r\n\t\t\tif (this._levelsLoading.contains(level.getKey())) continue;\r\n\t\t\tif (this._levelsLoaded.contains(level.getKey())) continue;\r\n\t\t\t/* Add the level */\r\n\t\t\tlevelList.add(level);\r\n\t\t}\r\n\t\tlevelsToLoad.clear();\r\n\t\t/* Filter the blocks to load */\r\n\t\tfor (let i: number = 0; i < blocksToLoad.size(); i++) {\r\n\t\t\t/* Do not request the same block twice */\r\n\t\t\tlet blockIndex: BlockIndex = blocksToLoad.get(i);\r\n\t\t\tif (this._blocksLoading.contains(blockIndex.key)) continue;\r\n\t\t\tif (this._blocksLoaded.contains(blockIndex.key)) continue;\r\n\t\t\t/* Add the block */\r\n\t\t\tblockList.add(blockIndex);\r\n\t\t}\r\n\t\tblocksToLoad.clear();\r\n\t\t/* Filter the tiles to load */\r\n\t\tfor (let i: number = 0; i < tilesToLoad.size(); i++) {\r\n\t\t\t/* Do not request the same tile twice */\r\n\t\t\tlet tileIndex: TileIndex = tilesToLoad.get(i);\r\n\t\t\tif (this._tilesLoading.contains(tileIndex.key)) continue;\r\n\t\t\tif (this._tilesLoaded.contains(tileIndex.key)) continue;\r\n\t\t\t/* Add the tile */\r\n\t\t\ttileList.add(tileIndex);\r\n\t\t}\r\n\t\ttilesToLoad.clear();\r\n\t}\r\n\r\n\t/**\r\n\t * Load blocks and tiles.\r\n\t * @param layer the layer requesting the load.\r\n\t * @param levelList the filtered list of levels to load.\r\n\t * @param blockList the filtered list of blocks to load.\r\n\t * @param tileList the filtered list of tiles to load.\r\n\t * @return the data model.\r\n\t */\r\n\tpublic async loadData(frameData: FrameData): Promise<FrameData> {\r\n\t\t/* No data to load? */\r\n\t\tif (frameData.hasMissingData() == false) return frameData;\r\n\t\t/* Do not make overlapping load requests */\r\n\t\tif (this._loadingData) return frameData;\r\n\t\tthis._loadingData = true;\r\n\t\t/* Log */\r\n\t\tlet levelList: AList<Level> = frameData.levelsToLoad;\r\n\t\tlet blockList: AList<BlockIndex> = frameData.blocksToLoad;\r\n\t\tlet tileList: AList<TileIndex> = frameData.tilesToLoad;\r\n\t\t//\t\tMessage.print(MODULE,\"Loading \"+levelList.size()+\" levels, \"+blockList.size()+\" blocks and \"+tileList.size()+\" tiles\");\r\n\t\t//\t\tMessage.print(MODULE,\"Already loaded \"+this._blocksLoaded.size()+\" blocks\");\r\n\t\t//\t\tMessage.print(MODULE,\"Already loading \"+this._blocksLoading.size()+\" blocks\");\r\n\t\t//\t\tMessage.print(MODULE,\"Already loaded \"+this._tilesLoaded.size()+\" tiles\");\r\n\t\t//\t\tMessage.print(MODULE,\"Already loading \"+this._tilesLoading.size()+\" tiles\");\r\n\t\t/* Define the content we are going to need */\r\n\t\tlet loadTime: float64 = ASystem.time();\r\n\t\tlet fileContents: ContentLoader = new ContentLoader(this._pointCloudReader.getFileStorage(), this._pointCloudReader.getFileName());\r\n\t\t/* Prepare the loading of the levels */\r\n\t\tfor (let i: number = 0; i < levelList.size(); i++) {\r\n\t\t\t/* Prepare to load the block */\r\n\t\t\tlet level: Level = levelList.get(i);\r\n\t\t\tthis._levelsLoading.set(level.getKey(), level);\r\n\t\t\tthis._pointCloudReader.readBlockIndexes(level.getIndex(), fileContents);\r\n\t\t\tMessage.print(DataManager.MODULE, \"Loading level \" + level.getIndex());\r\n\t\t}\r\n\t\t/* Prepare the loading of the blocks */\r\n\t\tfor (let i: number = 0; i < blockList.size(); i++) {\r\n\t\t\t/* Prepare to load the block */\r\n\t\t\tlet blockIndex: BlockIndex = blockList.get(i);\r\n\t\t\tthis._blocksLoading.set(blockIndex.key, blockIndex);\r\n\t\t\tthis._pointCloudReader.readTileIndexes(blockIndex, fileContents);\r\n\t\t}\r\n\t\t/* Prepare the loading of the tiles */\r\n\t\tlet loadTileCount: int32 = 0;\r\n\t\tfor (let i: number = 0; i < tileList.size(); i++) {\r\n\t\t\t/* Prepare to load the tile */\r\n\t\t\tlet tileIndex: TileIndex = tileList.get(i);\r\n\t\t\tthis._tilesLoading.set(tileIndex.key, tileIndex);\r\n\t\t\tthis._pointCloudReader.readPointData(tileIndex, this._dataFormat, loadTime, fileContents);\r\n\t\t\tloadTileCount++;\r\n\t\t\t/* Do not load too many tiles at once */\r\n\t\t\tif (fileContents.getTotalRequestSize() > DataManager.MAX_FILE_CONTENT_SIZE) {\r\n\t\t\t\t/* Stop loading tiles */\r\n\t\t\t\tMessage.print(DataManager.MODULE, \"Limited pointcloud content load request to \" + fileContents.getTotalRequestSize() + \" bytes\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t/* Log */\r\n\t\tMessage.print(DataManager.MODULE, \"Loading of \" + blockList.size() + \" blocks, \" + loadTileCount + \"/\" + tileList.size() + \" tiles, \" + fileContents.getTotalRequestSize() + \" bytes\");\r\n\t\t/* Load the data */\r\n\t\tthis._dataLoadSize = this._dataLoadSize.addInt(fileContents.getTotalRequestSize());\r\n\t\tfileContents = await fileContents.load();\r\n\t\t//Message.print(MODULE,\"Creating \"+blockList.size()+\" blocks and \"+tileList.size()+\" tiles\");\r\n\t\t/* Load the levels */\r\n\t\tfor (let i: number = 0; i < levelList.size(); i++) {\r\n\t\t\t/* Load the block list */\r\n\t\t\tlet level: Level = levelList.get(i);\r\n\t\t\tthis._levelsLoaded.set(level.getKey(), level);\r\n\t\t\tthis._levelsLoading.remove(level.getKey());\r\n\t\t\tlet blockIndexes: Array<BlockIndex> = this._pointCloudReader.readBlockIndexes(level.getIndex(), fileContents);\r\n\t\t\t/* Add the blocks */\r\n\t\t\tthis._fileTileIndex.setLevelBlocks(level, blockIndexes);\r\n\t\t}\r\n\t\t/* Load the blocks */\r\n\t\tfor (let i: number = 0; i < blockList.size(); i++) {\r\n\t\t\t/* Load the block */\r\n\t\t\tlet blockIndex: BlockIndex = blockList.get(i);\r\n\t\t\tthis._blocksLoaded.set(blockIndex.key, blockIndex);\r\n\t\t\tthis._blocksLoading.remove(blockIndex.key);\r\n\t\t\tlet tileIndexes: Array<TileIndex> = this._pointCloudReader.readTileIndexes(blockIndex, fileContents);\r\n\t\t\t/* Add the block */\r\n\t\t\tthis._fileTileIndex.setBlockTiles(blockIndex, tileIndexes);\r\n\t\t}\r\n\t\t/* Load the tiles */\r\n\t\tlet newTiles: AList<TileIndex> = new AList<TileIndex>();\r\n\t\tfor (let i: number = 0; i < loadTileCount; i++) {\r\n\t\t\t/* Get the next tile */\r\n\t\t\tlet tileIndex: TileIndex = tileList.get(i);\r\n\t\t\tnewTiles.add(tileIndex);\r\n\t\t\t/* Load the tile */\r\n\t\t\tthis._tilesLoaded.set(tileIndex.key, tileIndex);\r\n\t\t\tthis._tilesLoading.remove(tileIndex.key);\r\n\t\t\tlet pointData: PointData = this._pointCloudReader.readPointData(tileIndex, this._dataFormat, loadTime, fileContents);\r\n\t\t\t/* Add the tile */\r\n\t\t\tthis._dataPool.set(tileIndex.key, pointData);\r\n\t\t}\r\n\t\t/* We stopped loading */\r\n\t\tthis._loadingData = false;\r\n\t\tthis._loadedDataTime = ASystem.time();\r\n\t\t/* Log */\r\n\t\tMessage.print(DataManager.MODULE, \"Created \" + blockList.size() + \" blocks and \" + loadTileCount + \" tiles\");\r\n\t\t/* Return the frame data */\r\n\t\treturn frameData;\r\n\t}\r\n\r\n\t/**\r\n\t * Do a garbage collect (this method can be called often, it throttles itself to once per minute).\r\n\t * @param time the current time.\r\n\t */\r\n\tpublic doGarbageCollect(time: float64): void {\r\n\t\t/* First call? */\r\n\t\tif (this._lastGarbageCollectTime == 0.0) this._lastGarbageCollectTime = time;\r\n\t\t/* Throttle to one per minute */\r\n\t\tif (time < this._lastGarbageCollectTime + 60.0) return;\r\n\t\tthis._lastGarbageCollectTime = time;\r\n\t\t/* Define the expire time */\r\n\t\tlet expireTime: float64 = (time - DataManager.POINT_DATA_EXIRE_TIME);\r\n\t\t/* Check all loaded tiles */\r\n\t\tlet dropCount: int32 = 0;\r\n\t\tlet dataKeys: AList<string> = this._dataPool.keys();\r\n\t\tfor (let i: number = 0; i < dataKeys.size(); i++) {\r\n\t\t\t/* Get the next tile */\r\n\t\t\tlet tileKey: string = dataKeys.get(i);\r\n\t\t\tlet pointData: PointData = this._dataPool.get(tileKey);\r\n\t\t\t/* Expired? */\r\n\t\t\tif (pointData.tileIndex.accessTime < expireTime) {\r\n\t\t\t\tthis._dataPool.remove(tileKey);\r\n\t\t\t\tthis._tilesLoaded.remove(tileKey);\r\n\t\t\t\tdropCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t/* Log? */\r\n\t\tif (dropCount > 0) Message.print(DataManager.MODULE, \"Dropped the point data of \" + dropCount + \" tiles\");\r\n\t}\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrameData.js","sourceRoot":"","sources":["../../../../src/pointcloud/render/FrameData.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAWH,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAMtD;;GAEG;AACH,gBAAgB;AAChB,MAAM,OAAO,SAAS;IAClB,sEAAsE;IAC/D,aAAa,CAAmB;IACvC,8DAA8D;IACvD,YAAY,CAAe;IAClC,6DAA6D;IACtD,YAAY,CAAoB;IACvC,sDAAsD;IAC/C,WAAW,CAAmB;IAErC;;OAEG;IACH;QACI,IAAI,CAAC,aAAa,GAAG,IAAI,KAAK,EAAa,CAAC;QAC5C,IAAI,CAAC,YAAY,GAAG,IAAI,KAAK,EAAS,CAAC;QACvC,IAAI,CAAC,YAAY,GAAG,IAAI,KAAK,EAAc,CAAC;QAC5C,IAAI,CAAC,WAAW,GAAG,IAAI,KAAK,EAAa,CAAC;IAC9C,CAAC;IAED;;OAEG;IACI,cAAc;QACjB,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC;YAAE,OAAO,IAAI,CAAC;QAC9C,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC;YAAE,OAAO,IAAI,CAAC;QAC9C,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC;YAAE,OAAO,IAAI,CAAC;QAC7C,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.pointcloud.render;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\n\nimport { AList } from \"../../system/collection/AList\";\nimport { BlockIndex } from \"../model/BlockIndex\";\nimport { PointData } from \"../model/PointData\";\nimport { TileIndex } from \"../model/TileIndex\";\nimport { Level } from \"./Level\";\n\n/**\n * Class FrameData bundles the data needed to render a certain view, some data is available, some data needs to be loaded.\n */\n/** @internal */\nexport class FrameData {\n /** The list of tiles that have been loaded and need to be rendered */\n public tilesToRender: AList<PointData>;\n /** The levels of which the block indexes need to be loaded */\n public levelsToLoad: AList<Level>;\n /** The blocks of which the tile indexes need to be loaded */\n public blocksToLoad: AList<BlockIndex>;\n /** The tiles of which the points need to be loaded */\n public tilesToLoad: AList<TileIndex>;\n\n /**\n * Create a new frame data holder.\n */\n public constructor() {\n this.tilesToRender = new AList<PointData>();\n this.levelsToLoad = new AList<Level>();\n this.blocksToLoad = new AList<BlockIndex>();\n this.tilesToLoad = new AList<TileIndex>();\n }\n\n /**\n * Is frame data missing? (so a data load is needed).\n */\n public hasMissingData(): boolean {\n if (this.levelsToLoad.size() > 0) return true;\n if (this.blocksToLoad.size() > 0) return true;\n if (this.tilesToLoad.size() > 0) return true;\n return false;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"FrameData.js","sourceRoot":"","sources":["../../../../src/pointcloud/render/FrameData.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAWH,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAMtD;;GAEG;AACH,gBAAgB;AAChB,MAAM,OAAO,SAAS;IAClB,sEAAsE;IAC/D,aAAa,CAAmB;IACvC,8DAA8D;IACvD,YAAY,CAAe;IAClC,6DAA6D;IACtD,YAAY,CAAoB;IACvC,sDAAsD;IAC/C,WAAW,CAAmB;IAErC;;OAEG;IACH;QACI,IAAI,CAAC,aAAa,GAAG,IAAI,KAAK,EAAa,CAAC;QAC5C,IAAI,CAAC,YAAY,GAAG,IAAI,KAAK,EAAS,CAAC;QACvC,IAAI,CAAC,YAAY,GAAG,IAAI,KAAK,EAAc,CAAC;QAC5C,IAAI,CAAC,WAAW,GAAG,IAAI,KAAK,EAAa,CAAC;IAC9C,CAAC;IAED;;OAEG;IACI,cAAc;QACjB,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC;YAAE,OAAO,IAAI,CAAC;QAC9C,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC;YAAE,OAAO,IAAI,CAAC;QAC9C,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC;YAAE,OAAO,IAAI,CAAC;QAC7C,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\n//package orbitgt.pointcloud.render;\r\n\r\ntype int8 = number;\r\ntype int16 = number;\r\ntype int32 = number;\r\ntype float32 = number;\r\ntype float64 = number;\r\n\r\n\r\nimport { AList } from \"../../system/collection/AList\";\r\nimport { BlockIndex } from \"../model/BlockIndex\";\r\nimport { PointData } from \"../model/PointData\";\r\nimport { TileIndex } from \"../model/TileIndex\";\r\nimport { Level } from \"./Level\";\r\n\r\n/**\r\n * Class FrameData bundles the data needed to render a certain view, some data is available, some data needs to be loaded.\r\n */\r\n/** @internal */\r\nexport class FrameData {\r\n /** The list of tiles that have been loaded and need to be rendered */\r\n public tilesToRender: AList<PointData>;\r\n /** The levels of which the block indexes need to be loaded */\r\n public levelsToLoad: AList<Level>;\r\n /** The blocks of which the tile indexes need to be loaded */\r\n public blocksToLoad: AList<BlockIndex>;\r\n /** The tiles of which the points need to be loaded */\r\n public tilesToLoad: AList<TileIndex>;\r\n\r\n /**\r\n * Create a new frame data holder.\r\n */\r\n public constructor() {\r\n this.tilesToRender = new AList<PointData>();\r\n this.levelsToLoad = new AList<Level>();\r\n this.blocksToLoad = new AList<BlockIndex>();\r\n this.tilesToLoad = new AList<TileIndex>();\r\n }\r\n\r\n /**\r\n * Is frame data missing? (so a data load is needed).\r\n */\r\n public hasMissingData(): boolean {\r\n if (this.levelsToLoad.size() > 0) return true;\r\n if (this.blocksToLoad.size() > 0) return true;\r\n if (this.tilesToLoad.size() > 0) return true;\r\n return false;\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Level.js","sourceRoot":"","sources":["../../../../src/pointcloud/render/Level.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAWH,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAm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ED;;;OAGG;IACI,SAAS;QACf,OAAO,IAAI,CAAC,UAAU,CAAC;IACxB,CAAC;IAED;;;OAGG;IACI,aAAa;QACnB,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;IAC/B,CAAC;IAED;;;;OAIG;IACI,SAAS,CAAC,UAAsB;QACtC,KAAK,IAAI,KAAK,IAAI,IAAI,CAAC,UAAU;YAAE,IAAI,KAAK,CAAC,aAAa,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC;gBAAE,OAAO,KAAK,CAAC;QAC5F,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;;;OAIG;IACI,kBAAkB,CAAC,UAAqB;QAC9C,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;IAChD,CAAC;IAED;;;;OAIG;IACI,gBAAgB,CAAC,aAAwB;QAC/C,yBAAyB;QACzB,IAAI,UAAU,GAAe,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;QACzE,IAAI,cAAc,GAAc,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;QACzE,2BAA2B;QAC3B,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC;IACpD,CAAC;CACD","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.pointcloud.render;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { Coordinate } from \"../../spatial/geom/Coordinate\";\nimport { StringMap } from \"../../system/collection/StringMap\";\nimport { BlockIndex } from \"../model/BlockIndex\";\nimport { Grid } from \"../model/Grid\";\nimport { GridIndex } from \"../model/GridIndex\";\nimport { Block } from \"./Block\";\n\n/**\n * Class Level defines a resolution level of a pointcloud.\n *\n * @version 1.0 November 2015\n */\n/** @internal */\nexport class Level {\n\t/** The index of the level */\n\tprivate _index: int32;\n\t/** The unique key of the level */\n\tprivate _key: string;\n\t/** The grid of the blocks */\n\tprivate _blockGrid: Grid;\n\t/** The grid of the tiles */\n\tprivate _tileGrid: Grid;\n\t/** The list of blocks */\n\tprivate _blockList: Array<Block>;\n\t/** The map of blocks */\n\tprivate _blockMap: StringMap<Block>;\n\n\t/**\n\t * Create a new level.\n\t * @param index the index of the level.\n\t * @param blockGrid the grid of the blocks.\n\t * @param tileGrid the grid of the tiles.\n\t * @param blockList the list of blocks.\n\t */\n\tpublic constructor(index: int32, blockGrid: Grid, tileGrid: Grid, blockList: Array<Block>) {\n\t\t/* Store the parameters */\n\t\tthis._index = index;\n\t\tthis._key = (\"L\" + index);\n\t\tthis._blockGrid = blockGrid;\n\t\tthis._tileGrid = tileGrid;\n\t\tthis.setBlockList(blockList);\n\t}\n\n\t/**\n\t * Set the block list.\n\t * @param blockList the list of blocks.\n\t */\n\tpublic setBlockList(blockList: Array<Block>): void {\n\t\tthis._blockList = blockList;\n\t\t/* Map the blocks */\n\t\tthis._blockMap = new StringMap<Block>();\n\t\tfor (let block of this._blockList) this._blockMap.set(block.getBlockIndex().gridIndex.getKey(), block);\n\t}\n\n\t/**\n\t * Get the index of the level.\n\t * @return the index of the level.\n\t */\n\tpublic getIndex(): int32 {\n\t\treturn this._index;\n\t}\n\n\t/**\n\t * Get the unique key of the level.\n\t * @return the unique key of the level.\n\t */\n\tpublic getKey(): string {\n\t\treturn this._key;\n\t}\n\n\t/**\n\t * Get the block grid.\n\t * @return the block grid.\n\t */\n\tpublic getBlockGrid(): Grid {\n\t\treturn this._blockGrid;\n\t}\n\n\t/**\n\t * Get the tile grid.\n\t * @return the tile grid.\n\t */\n\tpublic getTileGrid(): Grid {\n\t\treturn this._tileGrid;\n\t}\n\n\t/**\n\t * List all blocks.\n\t * @return all blocks.\n\t */\n\tpublic getBlocks(): Array<Block> {\n\t\treturn this._blockList;\n\t}\n\n\t/**\n\t * Get the number of blocks.\n\t * @return the number of blocks.\n\t */\n\tpublic getBlockCount(): int32 {\n\t\treturn this._blockList.length;\n\t}\n\n\t/**\n\t * Find a block.\n\t * @param blockIndex the index of the block to find.\n\t * @return the block.\n\t */\n\tpublic findBlock(blockIndex: BlockIndex): Block {\n\t\tfor (let block of this._blockList) if (block.getBlockIndex().same(blockIndex)) return block;\n\t\treturn null;\n\t}\n\n\t/**\n\t * Find a block index.\n\t * @param blockIndex the index of the block to find.\n\t * @return the block (can be null).\n\t */\n\tpublic findBlockGridIndex(blockIndex: GridIndex): Block {\n\t\treturn this._blockMap.get(blockIndex.getKey());\n\t}\n\n\t/**\n\t * Find the block for a tile.\n\t * @param tileGridIndex the grid index of the tile.\n\t * @return the block (can be null).\n\t */\n\tpublic findBlockForTile(tileGridIndex: GridIndex): Block {\n\t\t/* Get the block index */\n\t\tlet tileCenter: Coordinate = this._tileGrid.getCellCenter(tileGridIndex);\n\t\tlet blockGridIndex: GridIndex = this._blockGrid.getCellIndex(tileCenter);\n\t\t/* Try to find the block */\n\t\treturn this._blockMap.get(blockGridIndex.getKey());\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Level.js","sourceRoot":"","sources":["../../../../src/pointcloud/render/Level.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAWH,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAM9D;;;;GAIG;AACH,gBAAgB;AAChB,MAAM,OAAO,KAAK;IACjB,6BAA6B;IACrB,MAAM,CAAQ;IACtB,kCAAkC;IAC1B,IAAI,CAAS;IACrB,6BAA6B;IACrB,UAAU,CAAO;IACzB,4BAA4B;IACpB,SAAS,CAAO;IACxB,yBAAyB;IACjB,UAAU,CAAe;IACjC,wBAAwB;IAChB,SAAS,CAAmB;IAEpC;;;;;;OAMG;IACH,YA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,CAAC,UAAU,CAAC;gBAAE,OAAO,KAAK,CAAC;QAC5F,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;;;OAIG;IACI,kBAAkB,CAAC,UAAqB;QAC9C,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;IAChD,CAAC;IAED;;;;OAIG;IACI,gBAAgB,CAAC,aAAwB;QAC/C,yBAAyB;QACzB,IAAI,UAAU,GAAe,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;QACzE,IAAI,cAAc,GAAc,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;QACzE,2BAA2B;QAC3B,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC;IACpD,CAAC;CACD","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\n//package orbitgt.pointcloud.render;\r\n\r\ntype int8 = number;\r\ntype int16 = number;\r\ntype int32 = number;\r\ntype float32 = number;\r\ntype float64 = number;\r\n\r\nimport { Coordinate } from \"../../spatial/geom/Coordinate\";\r\nimport { StringMap } from \"../../system/collection/StringMap\";\r\nimport { BlockIndex } from \"../model/BlockIndex\";\r\nimport { Grid } from \"../model/Grid\";\r\nimport { GridIndex } from \"../model/GridIndex\";\r\nimport { Block } from \"./Block\";\r\n\r\n/**\r\n * Class Level defines a resolution level of a pointcloud.\r\n *\r\n * @version 1.0 November 2015\r\n */\r\n/** @internal */\r\nexport class Level {\r\n\t/** The index of the level */\r\n\tprivate _index: int32;\r\n\t/** The unique key of the level */\r\n\tprivate _key: string;\r\n\t/** The grid of the blocks */\r\n\tprivate _blockGrid: Grid;\r\n\t/** The grid of the tiles */\r\n\tprivate _tileGrid: Grid;\r\n\t/** The list of blocks */\r\n\tprivate _blockList: Array<Block>;\r\n\t/** The map of blocks */\r\n\tprivate _blockMap: StringMap<Block>;\r\n\r\n\t/**\r\n\t * Create a new level.\r\n\t * @param index the index of the level.\r\n\t * @param blockGrid the grid of the blocks.\r\n\t * @param tileGrid the grid of the tiles.\r\n\t * @param blockList the list of blocks.\r\n\t */\r\n\tpublic constructor(index: int32, blockGrid: Grid, tileGrid: Grid, blockList: Array<Block>) {\r\n\t\t/* Store the parameters */\r\n\t\tthis._index = index;\r\n\t\tthis._key = (\"L\" + index);\r\n\t\tthis._blockGrid = blockGrid;\r\n\t\tthis._tileGrid = tileGrid;\r\n\t\tthis.setBlockList(blockList);\r\n\t}\r\n\r\n\t/**\r\n\t * Set the block list.\r\n\t * @param blockList the list of blocks.\r\n\t */\r\n\tpublic setBlockList(blockList: Array<Block>): void {\r\n\t\tthis._blockList = blockList;\r\n\t\t/* Map the blocks */\r\n\t\tthis._blockMap = new StringMap<Block>();\r\n\t\tfor (let block of this._blockList) this._blockMap.set(block.getBlockIndex().gridIndex.getKey(), block);\r\n\t}\r\n\r\n\t/**\r\n\t * Get the index of the level.\r\n\t * @return the index of the level.\r\n\t */\r\n\tpublic getIndex(): int32 {\r\n\t\treturn this._index;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the unique key of the level.\r\n\t * @return the unique key of the level.\r\n\t */\r\n\tpublic getKey(): string {\r\n\t\treturn this._key;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the block grid.\r\n\t * @return the block grid.\r\n\t */\r\n\tpublic getBlockGrid(): Grid {\r\n\t\treturn this._blockGrid;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the tile grid.\r\n\t * @return the tile grid.\r\n\t */\r\n\tpublic getTileGrid(): Grid {\r\n\t\treturn this._tileGrid;\r\n\t}\r\n\r\n\t/**\r\n\t * List all blocks.\r\n\t * @return all blocks.\r\n\t */\r\n\tpublic getBlocks(): Array<Block> {\r\n\t\treturn this._blockList;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the number of blocks.\r\n\t * @return the number of blocks.\r\n\t */\r\n\tpublic getBlockCount(): int32 {\r\n\t\treturn this._blockList.length;\r\n\t}\r\n\r\n\t/**\r\n\t * Find a block.\r\n\t * @param blockIndex the index of the block to find.\r\n\t * @return the block.\r\n\t */\r\n\tpublic findBlock(blockIndex: BlockIndex): Block {\r\n\t\tfor (let block of this._blockList) if (block.getBlockIndex().same(blockIndex)) return block;\r\n\t\treturn null;\r\n\t}\r\n\r\n\t/**\r\n\t * Find a block index.\r\n\t * @param blockIndex the index of the block to find.\r\n\t * @return the block (can be null).\r\n\t */\r\n\tpublic findBlockGridIndex(blockIndex: GridIndex): Block {\r\n\t\treturn this._blockMap.get(blockIndex.getKey());\r\n\t}\r\n\r\n\t/**\r\n\t * Find the block for a tile.\r\n\t * @param tileGridIndex the grid index of the tile.\r\n\t * @return the block (can be null).\r\n\t */\r\n\tpublic findBlockForTile(tileGridIndex: GridIndex): Block {\r\n\t\t/* Get the block index */\r\n\t\tlet tileCenter: Coordinate = this._tileGrid.getCellCenter(tileGridIndex);\r\n\t\tlet blockGridIndex: GridIndex = this._blockGrid.getCellIndex(tileCenter);\r\n\t\t/* Try to find the block */\r\n\t\treturn this._blockMap.get(blockGridIndex.getKey());\r\n\t}\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TileLoadSorter.js","sourceRoot":"","sources":["../../../../src/pointcloud/render/TileLoadSorter.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,gBAAgB;AAChB,kDAAkD;AAClD,wDAAwD;AAUxD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAG3D,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAS/C;;;;GAIG;AACH,MAAM,OAAO,cAAc;IAmBuB;IAjBhD,cAAc;IACP,MAAM,C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------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n/** @internal */\n// NOTE: this class has been translated from Java.\n// Do not modify this file, changes will be overwritten.\n\n//package orbitgt.pointcloud.render;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { Coordinate } from \"../../spatial/geom/Coordinate\";\nimport { iComparator } from \"../../system/runtime/iComparator\";\nimport { Grid } from \"../model/Grid\";\nimport { GridIndex } from \"../model/GridIndex\";\nimport { TileIndex } from \"../model/TileIndex\";\nimport { ViewTree } from \"./ViewTree\";\n\n/** @internal */\nexport interface IProjectToViewForSort {\n projectToViewForSort(point: Coordinate): void;\n}\n\n/**\n * Class TileLoadSorter sorts file tiles by their angle with the forward view direction (smaller angles first to load tiles in the view center first).\n *\n * @internal\n */\nexport class TileLoadSorter implements iComparator<TileIndex>\n{\n /** @ignore */\n public static readonly _CLASSNAME_: string = \"orbitgt.pointcloud.render.TileLoadSorter\"; // the full name of the original java class\n // the interface implementation markers:\n private isiComparator_TileIndex_Instance: boolean = true;\n\n /** The global tile index */\n private tileIndex: ViewTree;\n /** The model transformation */\n private projectToView: (point: Coordinate) => void;\n /** The view projection */\n\n /**\n * Create a new sorter.\n * @param tileIndex the global tile index.\n * @param modelTransform the model transformation.\n * @param projection the view projection.\n */\n public constructor(tileIndex: ViewTree, private viewProjector: IProjectToViewForSort) {\n this.tileIndex = tileIndex;\n }\n\n /**\n * Get the position of a tile in the view (camera) space.\n * @param tile the grid index of the tile.\n * @param dX the x grid index offset.\n * @param dY the y grid index offset.\n * @param dZ the z grid index offset.\n * @return the position in view space.\n */\n private getTilePosition(tile: TileIndex, dX: int32, dY: int32, dZ: int32): Coordinate {\n /* Get the position of the tile center in the view world space */\n let tileGrid: Grid = this.tileIndex.getLevel(tile.level).getTileGrid();\n let tileCenter: Coordinate = tileGrid.getCellCenter(new GridIndex(tile.gridIndex.x + dX, tile.gridIndex.y + dY, tile.gridIndex.z + dZ));\n this.viewProjector.projectToViewForSort(tileCenter);\n /* Return the position */\n return tileCenter;\n }\n\n /**\n * Get the radius of a tile.\n * @param tile the grid index of the tile.\n * @param tilePosition the position of the tile in view space.\n * @return the radius of the tile.\n */\n private getTileRadius(tile: TileIndex, tilePosition: Coordinate): float64 {\n /* Get the position of the next tile */\n let nextTilePosition: Coordinate = this.getTilePosition(tile, 1, 0, 0);\n /* Get the distance (in view space) */\n return nextTilePosition.distance3D(tilePosition);\n }\n\n /**\n * Get the score of a tile.\n * @param tile the tile index.\n * @return the score (the lower the better).\n */\n private getScore(tile: TileIndex): float64 {\n /* We need a tile index */\n if (tile == null) return 0.0;\n /* Get the position of the tile center in the view (camera) space */\n let tileCenter: Coordinate = this.getTilePosition(tile, 0, 0, 0);\n if (tileCenter == null) return 0.0;\n /* Get the angle from the camera boresight (screen center) (the smaller the better) (radians) */\n let angleFromScreenCenter: float64 = Coordinate.getAngleRad(tileCenter, new Coordinate(0.0, 0.0, 1.0)/*forward*/);\n /* Get the radius of the tile in the view (camera) space */\n let tileRadius: float64 = this.getTileRadius(tile, tileCenter);\n /* Get the angular extent of the tile (the bigger the better) (radians) */\n let tileDistance: float64 = tileCenter.getLength();\n let tileExtent: float64 = 2.0 * Math.atan2(tileRadius, tileDistance);\n /* We want tiles with a small screen center angle and with a big screen extent */\n return (angleFromScreenCenter - tileExtent);\n }\n\n // Comparator interface method\n public compare(tile1: TileIndex, tile2: TileIndex): int32 {\n /* Load higher level tiles first (added on 21/03/2017 by LER) */\n let dLevel: int32 = (tile1.level - tile2.level);\n if (dLevel != 0) return (-dLevel);\n /* Compare the scores inside the level */\n let d: float64 = (this.getScore(tile1) - this.getScore(tile2)); // new scoring method on 02/02/2017 by LER\n return (d > 0.0) ? 1 : (d < 0.0) ? -1 : 0;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"T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,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,0CAA0C;QAC1G,OAAO,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5C,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n/** @internal */\r\n// NOTE: this class has been translated from Java.\r\n// Do not modify this file, changes will be overwritten.\r\n\r\n//package orbitgt.pointcloud.render;\r\n\r\ntype int8 = number;\r\ntype int16 = number;\r\ntype int32 = number;\r\ntype float32 = number;\r\ntype float64 = number;\r\n\r\nimport { Coordinate } from \"../../spatial/geom/Coordinate\";\r\nimport { iComparator } from \"../../system/runtime/iComparator\";\r\nimport { Grid } from \"../model/Grid\";\r\nimport { GridIndex } from \"../model/GridIndex\";\r\nimport { TileIndex } from \"../model/TileIndex\";\r\nimport { ViewTree } from \"./ViewTree\";\r\n\r\n/** @internal */\r\nexport interface IProjectToViewForSort {\r\n projectToViewForSort(point: Coordinate): void;\r\n}\r\n\r\n/**\r\n * Class TileLoadSorter sorts file tiles by their angle with the forward view direction (smaller angles first to load tiles in the view center first).\r\n *\r\n * @internal\r\n */\r\nexport class TileLoadSorter implements iComparator<TileIndex>\r\n{\r\n /** @ignore */\r\n public static readonly _CLASSNAME_: string = \"orbitgt.pointcloud.render.TileLoadSorter\"; // the full name of the original java class\r\n // the interface implementation markers:\r\n private isiComparator_TileIndex_Instance: boolean = true;\r\n\r\n /** The global tile index */\r\n private tileIndex: ViewTree;\r\n /** The model transformation */\r\n private projectToView: (point: Coordinate) => void;\r\n /** The view projection */\r\n\r\n /**\r\n * Create a new sorter.\r\n * @param tileIndex the global tile index.\r\n * @param modelTransform the model transformation.\r\n * @param projection the view projection.\r\n */\r\n public constructor(tileIndex: ViewTree, private viewProjector: IProjectToViewForSort) {\r\n this.tileIndex = tileIndex;\r\n }\r\n\r\n /**\r\n * Get the position of a tile in the view (camera) space.\r\n * @param tile the grid index of the tile.\r\n * @param dX the x grid index offset.\r\n * @param dY the y grid index offset.\r\n * @param dZ the z grid index offset.\r\n * @return the position in view space.\r\n */\r\n private getTilePosition(tile: TileIndex, dX: int32, dY: int32, dZ: int32): Coordinate {\r\n /* Get the position of the tile center in the view world space */\r\n let tileGrid: Grid = this.tileIndex.getLevel(tile.level).getTileGrid();\r\n let tileCenter: Coordinate = tileGrid.getCellCenter(new GridIndex(tile.gridIndex.x + dX, tile.gridIndex.y + dY, tile.gridIndex.z + dZ));\r\n this.viewProjector.projectToViewForSort(tileCenter);\r\n /* Return the position */\r\n return tileCenter;\r\n }\r\n\r\n /**\r\n * Get the radius of a tile.\r\n * @param tile the grid index of the tile.\r\n * @param tilePosition the position of the tile in view space.\r\n * @return the radius of the tile.\r\n */\r\n private getTileRadius(tile: TileIndex, tilePosition: Coordinate): float64 {\r\n /* Get the position of the next tile */\r\n let nextTilePosition: Coordinate = this.getTilePosition(tile, 1, 0, 0);\r\n /* Get the distance (in view space) */\r\n return nextTilePosition.distance3D(tilePosition);\r\n }\r\n\r\n /**\r\n * Get the score of a tile.\r\n * @param tile the tile index.\r\n * @return the score (the lower the better).\r\n */\r\n private getScore(tile: TileIndex): float64 {\r\n /* We need a tile index */\r\n if (tile == null) return 0.0;\r\n /* Get the position of the tile center in the view (camera) space */\r\n let tileCenter: Coordinate = this.getTilePosition(tile, 0, 0, 0);\r\n if (tileCenter == null) return 0.0;\r\n /* Get the angle from the camera boresight (screen center) (the smaller the better) (radians) */\r\n let angleFromScreenCenter: float64 = Coordinate.getAngleRad(tileCenter, new Coordinate(0.0, 0.0, 1.0)/*forward*/);\r\n /* Get the radius of the tile in the view (camera) space */\r\n let tileRadius: float64 = this.getTileRadius(tile, tileCenter);\r\n /* Get the angular extent of the tile (the bigger the better) (radians) */\r\n let tileDistance: float64 = tileCenter.getLength();\r\n let tileExtent: float64 = 2.0 * Math.atan2(tileRadius, tileDistance);\r\n /* We want tiles with a small screen center angle and with a big screen extent */\r\n return (angleFromScreenCenter - tileExtent);\r\n }\r\n\r\n // Comparator interface method\r\n public compare(tile1: TileIndex, tile2: TileIndex): int32 {\r\n /* Load higher level tiles first (added on 21/03/2017 by LER) */\r\n let dLevel: int32 = (tile1.level - tile2.level);\r\n if (dLevel != 0) return (-dLevel);\r\n /* Compare the scores inside the level */\r\n let d: float64 = (this.getScore(tile1) - this.getScore(tile2)); // new scoring method on 02/02/2017 by LER\r\n return (d > 0.0) ? 1 : (d < 0.0) ? -1 : 0;\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewTree.js","sourceRoot":"","sources":["../../../../src/pointcloud/render/ViewTree.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAWH,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAEvD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAI/C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAIhC;;;;GAIG;AACH,gBAAgB;AAChB,MAAM,OAAO,QAAQ;IACpB,8BAA8B;IACtB,MAAM,CAAU,MAAM,GAAW,UAAU,CAAC;IAEpD,kBAAkB;IACV,MAAM,CAAU,KAAK,GAAY,KAAK,CAAC;IAE/C,uBAAuB;IACf,YAAY,CAAc;IAClC,iBAAiB;IACT,OAAO,CAAe;IAC9B,sBAAsB;IACd,WAAW,CAAS;IAC5B,sBAAsB;IACd,WAAW,CAA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AAC;QACF,CAAC;IACF,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.pointcloud.render;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { Bounds } from \"../../spatial/geom/Bounds\";\nimport { AList } from \"../../system/collection/AList\";\nimport { Message } from \"../../system/runtime/Message\";\nimport { BlockIndex } from \"../model/BlockIndex\";\nimport { GridIndex } from \"../model/GridIndex\";\nimport { PointData } from \"../model/PointData\";\nimport { TileIndex } from \"../model/TileIndex\";\nimport { AViewRequest } from \"./AViewRequest\";\nimport { Block } from \"./Block\";\nimport { DataManager } from \"./DataManager\";\nimport { Level } from \"./Level\";\n\n/**\n * Class TileSpatialIndex manages a spatial index of levels, blocks and tiles in pointcloud. The index does not store data, only block and tile indexes.\n *\n * @version 1.0 November 2015\n */\n/** @internal */\nexport class ViewTree {\n\t/** The name of this module */\n\tprivate static readonly MODULE: string = \"ViewTree\";\n\n\t/** Debug mode? */\n\tprivate static readonly DEBUG: boolean = false;\n\n\t/** The data manager */\n\tprivate _dataManager: DataManager;\n\t/** The levels */\n\tprivate _levels: Array<Level>;\n\t/** The data bounds */\n\tprivate _dataBounds: Bounds;\n\t/** The root blocks */\n\tprivate _rootBlocks: AList<Block>;\n\n\t/**\n\t * Create a new tree.\n\t * @param levels the levels.\n\t * @param dataBounds the data bounds.\n\t */\n\tpublic constructor(dataManager: DataManager, levels: Array<Level>, dataBounds: Bounds) {\n\t\t/* Store the parameters */\n\t\tthis._dataManager = dataManager;\n\t\tthis._levels = levels;\n\t\tthis._dataBounds = dataBounds;\n\t\t/* Find the root blocks */\n\t\tthis._rootBlocks = this.findRootBlocks();\n\t}\n\n\t/**\n\t * Find all root blocks (dropping of single-point tiles during pyramid creation can lead to missing branches).\n\t * @return all root blocks.\n\t */\n\tprivate findRootBlocks(): AList<Block> {\n\t\t/* Check some levels below the top */\n\t\tlet startLevel: int32 = (this._levels.length - 6);\n\t\tif (startLevel < 0) startLevel = 0;\n\t\tMessage.print(ViewTree.MODULE, \"Finding root blocks starting at level index \" + startLevel + \" of \" + this._levels.length);\n\t\t/* Check the levels */\n\t\tlet rootBlocks: AList<Block> = new AList<Block>();\n\t\tlet nextLevelIndex: GridIndex = new GridIndex(0, 0, 0);\n\t\tfor (let i: number = startLevel; i < this._levels.length - 1; i++) {\n\t\t\t/* Check all blocks in the level */\n\t\t\tlet level: Level = this._levels[i];\n\t\t\tfor (let block of level.getBlocks()) {\n\t\t\t\t/* Non-top level? */\n\t\t\t\tlet isRoot: boolean = true;\n\t\t\t\tif (i < this._levels.length - 2) {\n\t\t\t\t\t/* Do we have a parent block in the next level? */\n\t\t\t\t\tblock.getBlockIndex().gridIndex.getNextLevelIndex(nextLevelIndex);\n\t\t\t\t\tisRoot = (this._levels[i + 1].findBlockGridIndex(nextLevelIndex) == null);\n\t\t\t\t\tif (isRoot) Message.print(ViewTree.MODULE, \"Block L\" + i + \" \" + block.getBlockIndex().gridIndex + \" is non-top root\");\n\t\t\t\t}\n\t\t\t\t/* Add to the list? */\n\t\t\t\tif (isRoot) rootBlocks.add(block);\n\t\t\t}\n\t\t}\n\t\t/* Return the roots */\n\t\tMessage.print(ViewTree.MODULE, \"Found \" + rootBlocks.size() + \" root blocks\");\n\t\treturn rootBlocks;\n\t}\n\n\t/**\n\t * Get the number of levels.\n\t * @return the number of levels.\n\t */\n\tpublic getLevelCount(): int32 {\n\t\treturn this._levels.length;\n\t}\n\n\t/**\n\t * Get a level.\n\t * @param index the index of the level.\n\t * @return the level.\n\t */\n\tpublic getLevel(index: int32): Level {\n\t\treturn this._levels[index];\n\t}\n\n\t/**\n\t * Get the data bounds.\n\t * @return the data bounds.\n\t */\n\tpublic getDataBounds(): Bounds {\n\t\treturn this._dataBounds;\n\t}\n\n\t/**\n\t * Set the blocks for a level (after a data load operation).\n\t * @param level the level.\n\t * @param blockIndexes the indexes of the blocks in the level.\n\t */\n\tpublic setLevelBlocks(level: Level, blockIndexes: Array<BlockIndex>): void {\n\t\tif (blockIndexes == null) return;\n\t\tlet blockList: Array<Block> = new Array<Block>(blockIndexes.length);\n\t\tfor (let i: number = 0; i < blockIndexes.length; i++) blockList[i] = new Block(blockIndexes[i]);\n\t\tlevel.setBlockList(blockList);\n\t\tMessage.print(ViewTree.MODULE, \"Loaded \" + blockIndexes.length + \" blocks for level \" + level.getIndex());\n\t}\n\n\t/**\n\t * Set the tiles for a block (after a data load operation).\n\t * @param blockIndex the index of the block.\n\t * @param tileIndexes the indexes of the tiles in the block.\n\t */\n\tpublic setBlockTiles(blockIndex: BlockIndex, tileIndexes: Array<TileIndex>): void {\n\t\tlet level: Level = this._levels[blockIndex.level];\n\t\tlet block: Block = level.findBlock(blockIndex);\n\t\tblock.setTiles(tileIndexes);\n\t}\n\n\t/**\n\t * Split a tile into lower-level tiles.\n\t * @param level the level of the tile to split.\n\t * @param tile the tile to split.\n\t * @param childLevel the lower level of the tile.\n\t * @param children the list of children to split into.\n * @param levelsToLoad the list of levels to load.\n * @param blocksToLoad the list of blocks to load.\n\t * @return true if the list of children is complete.\n\t */\n\tprivate splitTile(level: Level, tile: TileIndex, childLevel: Level, children: AList<TileIndex>, levelsToLoad: AList<Level>, blocksToLoad: AList<BlockIndex>): boolean {\n\t\t/* Clear the result */\n\t\tchildren.clear();\n\t\t/* Already calculated? */\n\t\tlet childList: Array<TileIndex> = tile.children;\n\t\tif (childList != null) {\n\t\t\t/* Return */\n\t\t\tfor (let child of childList) children.add(child);\n\t\t\treturn true;\n\t\t}\n\t\t/* Assume we have a complete list of children */\n\t\tlet complete: boolean = true;\n\t\t/* Unloaded level? */\n\t\tif (childLevel.getBlockCount() == 0) {\n\t\t\t/* No need to continue, we need the level block list */\n\t\t\tif (levelsToLoad.contains(childLevel) == false) levelsToLoad.add(childLevel);\n\t\t\treturn false;\n\t\t}\n\t\t/* Check the 8 possible child tiles */\n\t\tlet index: GridIndex = tile.gridIndex;\n\t\tlet childIndex: GridIndex = new GridIndex(0, 0, 0);\n\t\tfor (let z: number = 0; z < 2; z++) for (let y: number = 0; y < 2; y++) for (let x: number = 0; x < 2; x++) {\n\t\t\t/* Get the index of the child */\n\t\t\tchildIndex.x = (2 * index.x + x);\n\t\t\tchildIndex.y = (2 * index.y + y);\n\t\t\tchildIndex.z = (2 * index.z + z);\n\t\t\t/* Find the block */\n\t\t\tlet block: Block = childLevel.findBlockForTile(childIndex);\n\t\t\tif (block == null) {\n\t\t\t\t/* This should not happen */\n\t\t\t\tMessage.printWarning(ViewTree.MODULE, \"Unable to find tile block \" + childIndex + \" in child level \" + childLevel.getIndex() + \" (\" + childLevel.getBlockCount() + \" blocks)\");\n\t\t\t\tcomplete = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t/* No tile info in the block? */\n\t\t\tif (block.hasTiles() == false) {\n\t\t\t\t/* Load the block data */\n\t\t\t\tif (blocksToLoad.contains(block.getBlockIndex()) == false) blocksToLoad.add(block.getBlockIndex());\n\t\t\t\tcomplete = false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t/* Find the child */\n\t\t\t\tlet child: TileIndex = block.findTile(childIndex);\n\t\t\t\tif (child != null) children.add(child);\n\t\t\t}\n\t\t}\n\t\t/* Store the result if complete */\n\t\tif (complete) {\n\t\t\t/* Store */\n\t\t\tlet tileChildren: Array<TileIndex> = new Array<TileIndex>(children.size());\n\t\t\tfor (let i: number = 0; i < tileChildren.length; i++) tileChildren[i] = children.get(i);\n\t\t\ttile.children = tileChildren;\n\t\t}\n\t\t/* Do we have all children? */\n\t\treturn complete;\n\t}\n\n\t/**\n\t * Is all tile data available for rendering?\n\t * @param viewRequest the view request.\n\t * @param tiles a list of tiles to check.\n\t * @param missingTiles the list of tiles whose data is missing.\n\t */\n\tprivate checkDataAvailable(viewRequest: AViewRequest, tiles: AList<TileIndex>, missingTiles: AList<TileIndex>): void {\n\t\t/* Check all tiles */\n\t\tmissingTiles.clear();\n\t\tfor (let i: number = 0; i < tiles.size(); i++) {\n\t\t\t/* Get the next tile */\n\t\t\tlet tile: TileIndex = tiles.get(i);\n\t\t\t/* Not available? */\n\t\t\tif (this._dataManager.isTileLoaded(tile) == null) {\n\t\t\t\t/* Request to load the block */\n\t\t\t\tmissingTiles.add(tile);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t/* Touch the block */\n\t\t\t\ttile.accessTime = viewRequest.getFrameTime();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Is all tile data available for rendering?\n\t * @param viewRequest the view request.\n\t * @param tiles a list of tiles to check.\n\t * @return true if the tile data is available.\n\t */\n\tprivate isDataAvailable(viewRequest: AViewRequest, tiles: Array<TileIndex>): boolean {\n\t\t/* Check all tiles */\n\t\tfor (let i: number = 0; i < tiles.length; i++) {\n\t\t\t/* Get the next tile */\n\t\t\tlet tile: TileIndex = tiles[i];\n\t\t\t/* Not available? */\n\t\t\tif (this._dataManager.isTileLoaded(tile) == null) return false;\n\t\t}\n\t\t/* Available */\n\t\treturn true;\n\t}\n\n\t/**\n\t * Add visible tiles to the view.\n\t * @param viewRequest the view request.\n\t * @param level the level of the tiles.\n\t * @param tiles the tiles to check.\n\t * @param visibleTiles the list of visible tiles to add to.\n\t */\n\tprivate addTilesToView(viewRequest: AViewRequest, level: Level, tiles: Array<TileIndex>, levelsToLoad: AList<Level>, blocksToLoad: AList<BlockIndex>, tilesToLoad: AList<TileIndex>, tilesToRender: AList<PointData>): void {\n\t\t/* No tiles? */\n\t\tif (tiles == null) return;\n\t\t/* Make the lists */\n\t\tlet childTiles: AList<TileIndex> = new AList<TileIndex>();\n\t\tlet missingChildTiles: AList<TileIndex> = new AList<TileIndex>();\n\t\t/* Check all tiles */\n\t\tfor (let i: number = 0; i < tiles.length; i++) {\n\t\t\t/* Get the next tile */\n\t\t\tlet tile: TileIndex = tiles[i];\n\t\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \"Checking tile L\" + tile.level + \" (\" + tile.gridIndex.x + \",\" + tile.gridIndex.y + \",\" + tile.gridIndex.z + \")\");\n\t\t\t/* Visible? */\n\t\t\tlet tileBounds: Bounds = level.getTileGrid().getCellBounds(tile.gridIndex).getIntersection(this._dataBounds);\n\t\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \"> level \" + tile.level);\n\t\t\tif (viewRequest.isVisibleBox(tileBounds)) {\n\t\t\t\t/* Has the tile been loaded? */\n\t\t\t\tlet tileData: PointData = this._dataManager.isTileLoaded(tile);\n\t\t\t\tlet tileAvailable: boolean = (tileData != null);\n\t\t\t\ttile.accessTime = viewRequest.getFrameTime();\n\t\t\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \" > available? \" + tileAvailable);\n\t\t\t\t/* We load all intermediate tiles to avoid holes in the coverage */\n\t\t\t\tif (tileAvailable == false) tilesToLoad.add(tile);\n\t\t\t\t/* Split the tile? */\n\t\t\t\tlet shouldSplit: boolean = (level.getIndex() > 0) && viewRequest.shouldSplit(level, tile);\n\t\t\t\tif (shouldSplit) {\n\t\t\t\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \" > visible, but needs splitting\");\n\t\t\t\t\t/* Find the children at the lower level */\n\t\t\t\t\tlet childLevel: Level = this._levels[level.getIndex() - 1];\n\t\t\t\t\tlet completeChildList: boolean = this.splitTile(level, tile, childLevel, childTiles, levelsToLoad, blocksToLoad);\n\t\t\t\t\tif (completeChildList == false) {\n\t\t\t\t\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \" > loading child indexes\");\n\t\t\t\t\t\t/* Display the tile while we wait for the block-tiles to load */\n\t\t\t\t\t\tif (tileAvailable) tilesToRender.add(tileData);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t/* Are all children available with their data? */\n\t\t\t\t\t\tthis.checkDataAvailable(viewRequest, childTiles, missingChildTiles);\n\t\t\t\t\t\tif (missingChildTiles.size() == 0) {\n\t\t\t\t\t\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \" > rendering children\");\n\t\t\t\t\t\t\t/* Add the children */\n\t\t\t\t\t\t\tlet childTiles2: Array<TileIndex> = new Array<TileIndex>(childTiles.size());\n\t\t\t\t\t\t\tfor (let j: number = 0; j < childTiles2.length; j++) childTiles2[j] = childTiles.get(j);\n\t\t\t\t\t\t\tthis.addTilesToView(viewRequest, childLevel, childTiles2, levelsToLoad, blocksToLoad, tilesToLoad, tilesToRender);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \" > loading children\");\n\t\t\t\t\t\t\t/* Request for the missing children to be loaded */\n\t\t\t\t\t\t\tfor (let j: number = 0; j < missingChildTiles.size(); j++) tilesToLoad.add(missingChildTiles.get(j));\n\t\t\t\t\t\t\t/* Display the tile while we wait for the child tiles to load */\n\t\t\t\t\t\t\tif (tileAvailable) tilesToRender.add(tileData);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t/* Display the tile */\n\t\t\t\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \" > visible\");\n\t\t\t\t\tif (tileAvailable) tilesToRender.add(tileData);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t/* Log */\n\t\t\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \" > not visible\");\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Find tile indexes for a 3D view.\n\t * @param viewRequest the request parameters.\n\t * @param visibleTiles the list of visible tiles to add to.\n\t * @param availableTiles the set of available tiles.\n\t * @param visibleAvailableTiles the list if visible and available tiles to add to.\n\t */\n\tpublic renderView3D(viewRequest: AViewRequest, levelsToLoad: AList<Level>, blocksToLoad: AList<BlockIndex>, tilesToLoad: AList<TileIndex>, tilesToRender: AList<PointData>): void {\n\t\t/* Log? */\n\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \"Finding pointcloud tiles to render\");\n\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \" > dataBounds: \" + this._dataBounds);\n\t\t//if (DEBUG) Message.print(MODULE,\" > view: \"+viewRequest.getViewProjection());\n\t\t//if (DEBUG) Message.print(MODULE,\" > distance: \"+viewRequest.getDistanceRange());\n\t\t//if (DEBUG) Message.print(MODULE,\" > model-transform: \"+viewRequest.getModelTransform());\n\t\t/* Check all blocks */\n\t\ttilesToRender.clear();\n\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \"Checking \" + this._rootBlocks.size() + \" root blocks\");\n\t\tfor (let i: number = 0; i < this._rootBlocks.size(); i++) // start from the root tiles\n\t\t{\n\t\t\t/* Visible? */\n\t\t\tlet block: Block = this._rootBlocks.get(i);\n\t\t\tlet blockIndex: BlockIndex = block.getBlockIndex();\n\t\t\tlet level: Level = this._levels[blockIndex.level];\n\t\t\t/* Visible? */\n\t\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \"Checking top-level block L\" + blockIndex.level + \" (\" + blockIndex.gridIndex.x + \",\" + blockIndex.gridIndex.y + \",\" + blockIndex.gridIndex.z + \")\");\n\t\t\tlet blockBounds: Bounds = block.getBlockBounds(level).getIntersection(this._dataBounds);\n\t\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \" > blockBounds: \" + blockBounds);\n\t\t\tif (viewRequest.isVisibleBox(blockBounds)) {\n\t\t\t\t/* Add the tiles */\n\t\t\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \" > visible\");\n\t\t\t\tthis.addTilesToView(viewRequest, level, block.getTiles(blocksToLoad), levelsToLoad, blocksToLoad, tilesToLoad, tilesToRender);\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ViewTree.js","sourceRoot":"","sources":["../../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IAAI,WAAW,GAAW,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACxF,IAAI,QAAQ,CAAC,KAAK;gBAAE,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,kBAAkB,GAAG,WAAW,CAAC,CAAC;YACrF,IAAI,WAAW,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE,CAAC;gBAC3C,mBAAmB;gBACnB,IAAI,QAAQ,CAAC,KAAK;oBAAE,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;gBACjE,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC;YAC/H,CAAC;QACF,CAAC;IACF,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\n//package orbitgt.pointcloud.render;\r\n\r\ntype int8 = number;\r\ntype int16 = number;\r\ntype int32 = number;\r\ntype float32 = number;\r\ntype float64 = number;\r\n\r\nimport { Bounds } from \"../../spatial/geom/Bounds\";\r\nimport { AList } from \"../../system/collection/AList\";\r\nimport { Message } from \"../../system/runtime/Message\";\r\nimport { BlockIndex } from \"../model/BlockIndex\";\r\nimport { GridIndex } from \"../model/GridIndex\";\r\nimport { PointData } from \"../model/PointData\";\r\nimport { TileIndex } from \"../model/TileIndex\";\r\nimport { AViewRequest } from \"./AViewRequest\";\r\nimport { Block } from \"./Block\";\r\nimport { DataManager } from \"./DataManager\";\r\nimport { Level } from \"./Level\";\r\n\r\n/**\r\n * Class TileSpatialIndex manages a spatial index of levels, blocks and tiles in pointcloud. The index does not store data, only block and tile indexes.\r\n *\r\n * @version 1.0 November 2015\r\n */\r\n/** @internal */\r\nexport class ViewTree {\r\n\t/** The name of this module */\r\n\tprivate static readonly MODULE: string = \"ViewTree\";\r\n\r\n\t/** Debug mode? */\r\n\tprivate static readonly DEBUG: boolean = false;\r\n\r\n\t/** The data manager */\r\n\tprivate _dataManager: DataManager;\r\n\t/** The levels */\r\n\tprivate _levels: Array<Level>;\r\n\t/** The data bounds */\r\n\tprivate _dataBounds: Bounds;\r\n\t/** The root blocks */\r\n\tprivate _rootBlocks: AList<Block>;\r\n\r\n\t/**\r\n\t * Create a new tree.\r\n\t * @param levels the levels.\r\n\t * @param dataBounds the data bounds.\r\n\t */\r\n\tpublic constructor(dataManager: DataManager, levels: Array<Level>, dataBounds: Bounds) {\r\n\t\t/* Store the parameters */\r\n\t\tthis._dataManager = dataManager;\r\n\t\tthis._levels = levels;\r\n\t\tthis._dataBounds = dataBounds;\r\n\t\t/* Find the root blocks */\r\n\t\tthis._rootBlocks = this.findRootBlocks();\r\n\t}\r\n\r\n\t/**\r\n\t * Find all root blocks (dropping of single-point tiles during pyramid creation can lead to missing branches).\r\n\t * @return all root blocks.\r\n\t */\r\n\tprivate findRootBlocks(): AList<Block> {\r\n\t\t/* Check some levels below the top */\r\n\t\tlet startLevel: int32 = (this._levels.length - 6);\r\n\t\tif (startLevel < 0) startLevel = 0;\r\n\t\tMessage.print(ViewTree.MODULE, \"Finding root blocks starting at level index \" + startLevel + \" of \" + this._levels.length);\r\n\t\t/* Check the levels */\r\n\t\tlet rootBlocks: AList<Block> = new AList<Block>();\r\n\t\tlet nextLevelIndex: GridIndex = new GridIndex(0, 0, 0);\r\n\t\tfor (let i: number = startLevel; i < this._levels.length - 1; i++) {\r\n\t\t\t/* Check all blocks in the level */\r\n\t\t\tlet level: Level = this._levels[i];\r\n\t\t\tfor (let block of level.getBlocks()) {\r\n\t\t\t\t/* Non-top level? */\r\n\t\t\t\tlet isRoot: boolean = true;\r\n\t\t\t\tif (i < this._levels.length - 2) {\r\n\t\t\t\t\t/* Do we have a parent block in the next level? */\r\n\t\t\t\t\tblock.getBlockIndex().gridIndex.getNextLevelIndex(nextLevelIndex);\r\n\t\t\t\t\tisRoot = (this._levels[i + 1].findBlockGridIndex(nextLevelIndex) == null);\r\n\t\t\t\t\tif (isRoot) Message.print(ViewTree.MODULE, \"Block L\" + i + \" \" + block.getBlockIndex().gridIndex + \" is non-top root\");\r\n\t\t\t\t}\r\n\t\t\t\t/* Add to the list? */\r\n\t\t\t\tif (isRoot) rootBlocks.add(block);\r\n\t\t\t}\r\n\t\t}\r\n\t\t/* Return the roots */\r\n\t\tMessage.print(ViewTree.MODULE, \"Found \" + rootBlocks.size() + \" root blocks\");\r\n\t\treturn rootBlocks;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the number of levels.\r\n\t * @return the number of levels.\r\n\t */\r\n\tpublic getLevelCount(): int32 {\r\n\t\treturn this._levels.length;\r\n\t}\r\n\r\n\t/**\r\n\t * Get a level.\r\n\t * @param index the index of the level.\r\n\t * @return the level.\r\n\t */\r\n\tpublic getLevel(index: int32): Level {\r\n\t\treturn this._levels[index];\r\n\t}\r\n\r\n\t/**\r\n\t * Get the data bounds.\r\n\t * @return the data bounds.\r\n\t */\r\n\tpublic getDataBounds(): Bounds {\r\n\t\treturn this._dataBounds;\r\n\t}\r\n\r\n\t/**\r\n\t * Set the blocks for a level (after a data load operation).\r\n\t * @param level the level.\r\n\t * @param blockIndexes the indexes of the blocks in the level.\r\n\t */\r\n\tpublic setLevelBlocks(level: Level, blockIndexes: Array<BlockIndex>): void {\r\n\t\tif (blockIndexes == null) return;\r\n\t\tlet blockList: Array<Block> = new Array<Block>(blockIndexes.length);\r\n\t\tfor (let i: number = 0; i < blockIndexes.length; i++) blockList[i] = new Block(blockIndexes[i]);\r\n\t\tlevel.setBlockList(blockList);\r\n\t\tMessage.print(ViewTree.MODULE, \"Loaded \" + blockIndexes.length + \" blocks for level \" + level.getIndex());\r\n\t}\r\n\r\n\t/**\r\n\t * Set the tiles for a block (after a data load operation).\r\n\t * @param blockIndex the index of the block.\r\n\t * @param tileIndexes the indexes of the tiles in the block.\r\n\t */\r\n\tpublic setBlockTiles(blockIndex: BlockIndex, tileIndexes: Array<TileIndex>): void {\r\n\t\tlet level: Level = this._levels[blockIndex.level];\r\n\t\tlet block: Block = level.findBlock(blockIndex);\r\n\t\tblock.setTiles(tileIndexes);\r\n\t}\r\n\r\n\t/**\r\n\t * Split a tile into lower-level tiles.\r\n\t * @param level the level of the tile to split.\r\n\t * @param tile the tile to split.\r\n\t * @param childLevel the lower level of the tile.\r\n\t * @param children the list of children to split into.\r\n * @param levelsToLoad the list of levels to load.\r\n * @param blocksToLoad the list of blocks to load.\r\n\t * @return true if the list of children is complete.\r\n\t */\r\n\tprivate splitTile(level: Level, tile: TileIndex, childLevel: Level, children: AList<TileIndex>, levelsToLoad: AList<Level>, blocksToLoad: AList<BlockIndex>): boolean {\r\n\t\t/* Clear the result */\r\n\t\tchildren.clear();\r\n\t\t/* Already calculated? */\r\n\t\tlet childList: Array<TileIndex> = tile.children;\r\n\t\tif (childList != null) {\r\n\t\t\t/* Return */\r\n\t\t\tfor (let child of childList) children.add(child);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t/* Assume we have a complete list of children */\r\n\t\tlet complete: boolean = true;\r\n\t\t/* Unloaded level? */\r\n\t\tif (childLevel.getBlockCount() == 0) {\r\n\t\t\t/* No need to continue, we need the level block list */\r\n\t\t\tif (levelsToLoad.contains(childLevel) == false) levelsToLoad.add(childLevel);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t/* Check the 8 possible child tiles */\r\n\t\tlet index: GridIndex = tile.gridIndex;\r\n\t\tlet childIndex: GridIndex = new GridIndex(0, 0, 0);\r\n\t\tfor (let z: number = 0; z < 2; z++) for (let y: number = 0; y < 2; y++) for (let x: number = 0; x < 2; x++) {\r\n\t\t\t/* Get the index of the child */\r\n\t\t\tchildIndex.x = (2 * index.x + x);\r\n\t\t\tchildIndex.y = (2 * index.y + y);\r\n\t\t\tchildIndex.z = (2 * index.z + z);\r\n\t\t\t/* Find the block */\r\n\t\t\tlet block: Block = childLevel.findBlockForTile(childIndex);\r\n\t\t\tif (block == null) {\r\n\t\t\t\t/* This should not happen */\r\n\t\t\t\tMessage.printWarning(ViewTree.MODULE, \"Unable to find tile block \" + childIndex + \" in child level \" + childLevel.getIndex() + \" (\" + childLevel.getBlockCount() + \" blocks)\");\r\n\t\t\t\tcomplete = false;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t/* No tile info in the block? */\r\n\t\t\tif (block.hasTiles() == false) {\r\n\t\t\t\t/* Load the block data */\r\n\t\t\t\tif (blocksToLoad.contains(block.getBlockIndex()) == false) blocksToLoad.add(block.getBlockIndex());\r\n\t\t\t\tcomplete = false;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t/* Find the child */\r\n\t\t\t\tlet child: TileIndex = block.findTile(childIndex);\r\n\t\t\t\tif (child != null) children.add(child);\r\n\t\t\t}\r\n\t\t}\r\n\t\t/* Store the result if complete */\r\n\t\tif (complete) {\r\n\t\t\t/* Store */\r\n\t\t\tlet tileChildren: Array<TileIndex> = new Array<TileIndex>(children.size());\r\n\t\t\tfor (let i: number = 0; i < tileChildren.length; i++) tileChildren[i] = children.get(i);\r\n\t\t\ttile.children = tileChildren;\r\n\t\t}\r\n\t\t/* Do we have all children? */\r\n\t\treturn complete;\r\n\t}\r\n\r\n\t/**\r\n\t * Is all tile data available for rendering?\r\n\t * @param viewRequest the view request.\r\n\t * @param tiles a list of tiles to check.\r\n\t * @param missingTiles the list of tiles whose data is missing.\r\n\t */\r\n\tprivate checkDataAvailable(viewRequest: AViewRequest, tiles: AList<TileIndex>, missingTiles: AList<TileIndex>): void {\r\n\t\t/* Check all tiles */\r\n\t\tmissingTiles.clear();\r\n\t\tfor (let i: number = 0; i < tiles.size(); i++) {\r\n\t\t\t/* Get the next tile */\r\n\t\t\tlet tile: TileIndex = tiles.get(i);\r\n\t\t\t/* Not available? */\r\n\t\t\tif (this._dataManager.isTileLoaded(tile) == null) {\r\n\t\t\t\t/* Request to load the block */\r\n\t\t\t\tmissingTiles.add(tile);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t/* Touch the block */\r\n\t\t\t\ttile.accessTime = viewRequest.getFrameTime();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Is all tile data available for rendering?\r\n\t * @param viewRequest the view request.\r\n\t * @param tiles a list of tiles to check.\r\n\t * @return true if the tile data is available.\r\n\t */\r\n\tprivate isDataAvailable(viewRequest: AViewRequest, tiles: Array<TileIndex>): boolean {\r\n\t\t/* Check all tiles */\r\n\t\tfor (let i: number = 0; i < tiles.length; i++) {\r\n\t\t\t/* Get the next tile */\r\n\t\t\tlet tile: TileIndex = tiles[i];\r\n\t\t\t/* Not available? */\r\n\t\t\tif (this._dataManager.isTileLoaded(tile) == null) return false;\r\n\t\t}\r\n\t\t/* Available */\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/**\r\n\t * Add visible tiles to the view.\r\n\t * @param viewRequest the view request.\r\n\t * @param level the level of the tiles.\r\n\t * @param tiles the tiles to check.\r\n\t * @param visibleTiles the list of visible tiles to add to.\r\n\t */\r\n\tprivate addTilesToView(viewRequest: AViewRequest, level: Level, tiles: Array<TileIndex>, levelsToLoad: AList<Level>, blocksToLoad: AList<BlockIndex>, tilesToLoad: AList<TileIndex>, tilesToRender: AList<PointData>): void {\r\n\t\t/* No tiles? */\r\n\t\tif (tiles == null) return;\r\n\t\t/* Make the lists */\r\n\t\tlet childTiles: AList<TileIndex> = new AList<TileIndex>();\r\n\t\tlet missingChildTiles: AList<TileIndex> = new AList<TileIndex>();\r\n\t\t/* Check all tiles */\r\n\t\tfor (let i: number = 0; i < tiles.length; i++) {\r\n\t\t\t/* Get the next tile */\r\n\t\t\tlet tile: TileIndex = tiles[i];\r\n\t\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \"Checking tile L\" + tile.level + \" (\" + tile.gridIndex.x + \",\" + tile.gridIndex.y + \",\" + tile.gridIndex.z + \")\");\r\n\t\t\t/* Visible? */\r\n\t\t\tlet tileBounds: Bounds = level.getTileGrid().getCellBounds(tile.gridIndex).getIntersection(this._dataBounds);\r\n\t\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \"> level \" + tile.level);\r\n\t\t\tif (viewRequest.isVisibleBox(tileBounds)) {\r\n\t\t\t\t/* Has the tile been loaded? */\r\n\t\t\t\tlet tileData: PointData = this._dataManager.isTileLoaded(tile);\r\n\t\t\t\tlet tileAvailable: boolean = (tileData != null);\r\n\t\t\t\ttile.accessTime = viewRequest.getFrameTime();\r\n\t\t\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \" > available? \" + tileAvailable);\r\n\t\t\t\t/* We load all intermediate tiles to avoid holes in the coverage */\r\n\t\t\t\tif (tileAvailable == false) tilesToLoad.add(tile);\r\n\t\t\t\t/* Split the tile? */\r\n\t\t\t\tlet shouldSplit: boolean = (level.getIndex() > 0) && viewRequest.shouldSplit(level, tile);\r\n\t\t\t\tif (shouldSplit) {\r\n\t\t\t\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \" > visible, but needs splitting\");\r\n\t\t\t\t\t/* Find the children at the lower level */\r\n\t\t\t\t\tlet childLevel: Level = this._levels[level.getIndex() - 1];\r\n\t\t\t\t\tlet completeChildList: boolean = this.splitTile(level, tile, childLevel, childTiles, levelsToLoad, blocksToLoad);\r\n\t\t\t\t\tif (completeChildList == false) {\r\n\t\t\t\t\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \" > loading child indexes\");\r\n\t\t\t\t\t\t/* Display the tile while we wait for the block-tiles to load */\r\n\t\t\t\t\t\tif (tileAvailable) tilesToRender.add(tileData);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t/* Are all children available with their data? */\r\n\t\t\t\t\t\tthis.checkDataAvailable(viewRequest, childTiles, missingChildTiles);\r\n\t\t\t\t\t\tif (missingChildTiles.size() == 0) {\r\n\t\t\t\t\t\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \" > rendering children\");\r\n\t\t\t\t\t\t\t/* Add the children */\r\n\t\t\t\t\t\t\tlet childTiles2: Array<TileIndex> = new Array<TileIndex>(childTiles.size());\r\n\t\t\t\t\t\t\tfor (let j: number = 0; j < childTiles2.length; j++) childTiles2[j] = childTiles.get(j);\r\n\t\t\t\t\t\t\tthis.addTilesToView(viewRequest, childLevel, childTiles2, levelsToLoad, blocksToLoad, tilesToLoad, tilesToRender);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \" > loading children\");\r\n\t\t\t\t\t\t\t/* Request for the missing children to be loaded */\r\n\t\t\t\t\t\t\tfor (let j: number = 0; j < missingChildTiles.size(); j++) tilesToLoad.add(missingChildTiles.get(j));\r\n\t\t\t\t\t\t\t/* Display the tile while we wait for the child tiles to load */\r\n\t\t\t\t\t\t\tif (tileAvailable) tilesToRender.add(tileData);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t/* Display the tile */\r\n\t\t\t\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \" > visible\");\r\n\t\t\t\t\tif (tileAvailable) tilesToRender.add(tileData);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t/* Log */\r\n\t\t\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \" > not visible\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Find tile indexes for a 3D view.\r\n\t * @param viewRequest the request parameters.\r\n\t * @param visibleTiles the list of visible tiles to add to.\r\n\t * @param availableTiles the set of available tiles.\r\n\t * @param visibleAvailableTiles the list if visible and available tiles to add to.\r\n\t */\r\n\tpublic renderView3D(viewRequest: AViewRequest, levelsToLoad: AList<Level>, blocksToLoad: AList<BlockIndex>, tilesToLoad: AList<TileIndex>, tilesToRender: AList<PointData>): void {\r\n\t\t/* Log? */\r\n\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \"Finding pointcloud tiles to render\");\r\n\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \" > dataBounds: \" + this._dataBounds);\r\n\t\t//if (DEBUG) Message.print(MODULE,\" > view: \"+viewRequest.getViewProjection());\r\n\t\t//if (DEBUG) Message.print(MODULE,\" > distance: \"+viewRequest.getDistanceRange());\r\n\t\t//if (DEBUG) Message.print(MODULE,\" > model-transform: \"+viewRequest.getModelTransform());\r\n\t\t/* Check all blocks */\r\n\t\ttilesToRender.clear();\r\n\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \"Checking \" + this._rootBlocks.size() + \" root blocks\");\r\n\t\tfor (let i: number = 0; i < this._rootBlocks.size(); i++) // start from the root tiles\r\n\t\t{\r\n\t\t\t/* Visible? */\r\n\t\t\tlet block: Block = this._rootBlocks.get(i);\r\n\t\t\tlet blockIndex: BlockIndex = block.getBlockIndex();\r\n\t\t\tlet level: Level = this._levels[blockIndex.level];\r\n\t\t\t/* Visible? */\r\n\t\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \"Checking top-level block L\" + blockIndex.level + \" (\" + blockIndex.gridIndex.x + \",\" + blockIndex.gridIndex.y + \",\" + blockIndex.gridIndex.z + \")\");\r\n\t\t\tlet blockBounds: Bounds = block.getBlockBounds(level).getIntersection(this._dataBounds);\r\n\t\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \" > blockBounds: \" + blockBounds);\r\n\t\t\tif (viewRequest.isVisibleBox(blockBounds)) {\r\n\t\t\t\t/* Add the tiles */\r\n\t\t\t\tif (ViewTree.DEBUG) Message.print(ViewTree.MODULE, \" > visible\");\r\n\t\t\t\tthis.addTilesToView(viewRequest, level, block.getTiles(blocksToLoad), levelsToLoad, blocksToLoad, tilesToLoad, tilesToRender);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CRSEngine.js","sourceRoot":"","sources":["../../../../src/spatial/crs/CRSEngine.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAUH,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD;;GAEG;AACH,gBAAgB;AAChB,MAAM,OAAO,SAAS;IAClB;;OAEG;IACH;IACA,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,cAAc,CAAC,GAAW,EAAE,IAAY;QACjD,8HAA8H;QAC9H,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;OAMG;IACI,cAAc,CAAC,KAAiB,EAAE,SAAiB,EAAE,SAAiB;QACzE,yCAAyC;QACzC,OAAO,KAAK,CAAC;IACjB,CAAC;IAED;;;;OAIG;IACI,eAAe,CAAC,GAAW;QAC9B,yCAAyC;QACzC,OAAO,KAAK,CAAC;IACjB,CAAC;IAED;;;;OAIG;IACI,eAAe,CAAC,GAAW;QAC9B,yCAAyC;QACzC,OAAO,KAAK,CAAC;IACjB,CAAC;IAED;;;;OAIG;IACI,cAAc,CAAC,GAAW;QAC7B,yCAAyC;QACzC,OAAO,KAAK,CAAC;IACjB,CAAC;IAED;;;;;;OAMG;IACI,eAAe,CAAC,MAAc,EAAE,SAAiB,EAAE,SAAiB;QACvE,qDAAqD;QACrD,uBAAuB;QACvB,IAAI,YAAY,GAAW,IAAI,MAAM,EAAE,CAAC;QACxC,IAAI,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC;YACnB,6BAA6B;YAC7B,IAAI,MAAM,GAAe,UAAU,CAAC,MAAM,EAAE,CAAC;YAC7C,KAAK,IAAI,CAAC,GAAW,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;gBACjC,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;gBAC5B,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;YACxE,CAAC;QACL,CAAC;QACD,8BAA8B;QAC9B,OAAO,YAAY,CAAC;IACxB,CAAC;CACJ","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.spatial.crs;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { Bounds } from \"../geom/Bounds\";\nimport { Coordinate } from \"../geom/Coordinate\";\n\n/**\n * Abstract class CRSEngine provides a model for CRS transformation engines to implement.\n */\n/** @internal */\nexport class CRSEngine {\n /**\n * Create a new engine.\n */\n public constructor() {\n }\n\n /**\n * Prepare a CRS for making transforms in a certain area.\n * @param crs the CRS to prepare.\n * @param area the area to prepare for (can be invalid to prepare only for the crs).\n */\n public async prepareForArea(crs: string, area: Bounds): Promise<Bounds> {\n // subclasses should override this method if they need to download some part of a grid correction file, or the CRS declaration\n return area;\n }\n\n /**\n * Transform a coordinate from one CRS to another.\n * @param point the point coordinate.\n * @param sourceCRS the source CRS.\n * @param targetCRS the target CRS.\n * @return the transformed coordinate.\n */\n public transformPoint(point: Coordinate, sourceCRS: string, targetCRS: string): Coordinate {\n // subclasses should override this method\n return point;\n }\n\n /**\n * Check if a CRS is geocentric.\n * @param crs the CRS to check.\n * @return true if geocentric.\n */\n public isGeocentricCRS(crs: string): boolean {\n // subclasses should override this method\n return false;\n }\n\n /**\n * Check if a CRS is geographic.\n * @param crs the CRS to check.\n * @return true if geocentric.\n */\n public isGeographicCRS(crs: string): boolean {\n // subclasses should override this method\n return false;\n }\n\n /**\n * Check if a CRS is projected.\n * @param crs the CRS to check.\n * @return true if geocentric.\n */\n public isProjectedCRS(crs: string): boolean {\n // subclasses should override this method\n return false;\n }\n\n /**\n * Transform spatial bounds from one CRS to another.\n * @param point the point coordinate.\n * @param sourceCRS the source CRS.\n * @param targetCRS the target CRS.\n * @return the transformed bounds.\n */\n public transformBounds(bounds: Bounds, sourceCRS: string, targetCRS: string): Bounds {\n // no real need to override this method in subclasses\n /* Create new bounds */\n let targetBounds: Bounds = new Bounds();\n if (bounds.isValid()) {\n /* Transform all 8 corners */\n let corner: Coordinate = Coordinate.create();\n for (let i: number = 0; i < 8; i++) {\n bounds.getCorner(i, corner);\n targetBounds.add(this.transformPoint(corner, sourceCRS, targetCRS));\n }\n }\n /* Return the target bounds */\n return targetBounds;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"CRSEngine.js","sourceRoot":"","sources":["../../../../src/spatial/crs/CRSEngine.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAUH,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD;;GAEG;AACH,gBAAgB;AAChB,MAAM,OAAO,SAAS;IAClB;;OAEG;IACH;IACA,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,cAAc,CAAC,GAAW,EAAE,IAAY;QACjD,8HAA8H;QAC9H,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;OAMG;IACI,cAAc,CAAC,KAAiB,EAAE,SAAiB,EAAE,SAAiB;QACzE,yCAAyC;QACzC,OAAO,KAAK,CAAC;IACjB,CAAC;IAED;;;;OAIG;IACI,eAAe,CAAC,GAAW;QAC9B,yCAAyC;QACzC,OAAO,KAAK,CAAC;IACjB,CAAC;IAED;;;;OAIG;IACI,eAAe,CAAC,GAAW;QAC9B,yCAAyC;QACzC,OAAO,KAAK,CAAC;IACjB,CAAC;IAED;;;;OAIG;IACI,cAAc,CAAC,GAAW;QAC7B,yCAAyC;QACzC,OAAO,KAAK,CAAC;IACjB,CAAC;IAED;;;;;;OAMG;IACI,eAAe,CAAC,MAAc,EAAE,SAAiB,EAAE,SAAiB;QACvE,qDAAqD;QACrD,uBAAuB;QACvB,IAAI,YAAY,GAAW,IAAI,MAAM,EAAE,CAAC;QACxC,IAAI,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC;YACnB,6BAA6B;YAC7B,IAAI,MAAM,GAAe,UAAU,CAAC,MAAM,EAAE,CAAC;YAC7C,KAAK,IAAI,CAAC,GAAW,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;gBACjC,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;gBAC5B,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;YACxE,CAAC;QACL,CAAC;QACD,8BAA8B;QAC9B,OAAO,YAAY,CAAC;IACxB,CAAC;CACJ","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\n//package orbitgt.spatial.crs;\r\n\r\ntype int8 = number;\r\ntype int16 = number;\r\ntype int32 = number;\r\ntype float32 = number;\r\ntype float64 = number;\r\n\r\nimport { Bounds } from \"../geom/Bounds\";\r\nimport { Coordinate } from \"../geom/Coordinate\";\r\n\r\n/**\r\n * Abstract class CRSEngine provides a model for CRS transformation engines to implement.\r\n */\r\n/** @internal */\r\nexport class CRSEngine {\r\n /**\r\n * Create a new engine.\r\n */\r\n public constructor() {\r\n }\r\n\r\n /**\r\n * Prepare a CRS for making transforms in a certain area.\r\n * @param crs the CRS to prepare.\r\n * @param area the area to prepare for (can be invalid to prepare only for the crs).\r\n */\r\n public async prepareForArea(crs: string, area: Bounds): Promise<Bounds> {\r\n // subclasses should override this method if they need to download some part of a grid correction file, or the CRS declaration\r\n return area;\r\n }\r\n\r\n /**\r\n * Transform a coordinate from one CRS to another.\r\n * @param point the point coordinate.\r\n * @param sourceCRS the source CRS.\r\n * @param targetCRS the target CRS.\r\n * @return the transformed coordinate.\r\n */\r\n public transformPoint(point: Coordinate, sourceCRS: string, targetCRS: string): Coordinate {\r\n // subclasses should override this method\r\n return point;\r\n }\r\n\r\n /**\r\n * Check if a CRS is geocentric.\r\n * @param crs the CRS to check.\r\n * @return true if geocentric.\r\n */\r\n public isGeocentricCRS(crs: string): boolean {\r\n // subclasses should override this method\r\n return false;\r\n }\r\n\r\n /**\r\n * Check if a CRS is geographic.\r\n * @param crs the CRS to check.\r\n * @return true if geocentric.\r\n */\r\n public isGeographicCRS(crs: string): boolean {\r\n // subclasses should override this method\r\n return false;\r\n }\r\n\r\n /**\r\n * Check if a CRS is projected.\r\n * @param crs the CRS to check.\r\n * @return true if geocentric.\r\n */\r\n public isProjectedCRS(crs: string): boolean {\r\n // subclasses should override this method\r\n return false;\r\n }\r\n\r\n /**\r\n * Transform spatial bounds from one CRS to another.\r\n * @param point the point coordinate.\r\n * @param sourceCRS the source CRS.\r\n * @param targetCRS the target CRS.\r\n * @return the transformed bounds.\r\n */\r\n public transformBounds(bounds: Bounds, sourceCRS: string, targetCRS: string): Bounds {\r\n // no real need to override this method in subclasses\r\n /* Create new bounds */\r\n let targetBounds: Bounds = new Bounds();\r\n if (bounds.isValid()) {\r\n /* Transform all 8 corners */\r\n let corner: Coordinate = Coordinate.create();\r\n for (let i: number = 0; i < 8; i++) {\r\n bounds.getCorner(i, corner);\r\n targetBounds.add(this.transformPoint(corner, sourceCRS, targetCRS));\r\n }\r\n }\r\n /* Return the target bounds */\r\n return targetBounds;\r\n }\r\n}\r\n"]}
|