@itwin/core-orbitgt 5.0.0-dev.8 → 5.0.0-dev.82
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 +46 -1
- package/lib/cjs/pointcloud/format/opc/AttributeMask.js +4 -0
- package/lib/cjs/pointcloud/format/opc/AttributeMask.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/BlockRecord.js +2 -2
- package/lib/cjs/pointcloud/format/opc/BlockRecord.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/ContainerFile.js +10 -2
- package/lib/cjs/pointcloud/format/opc/ContainerFile.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/ContainerFilePart.js +8 -0
- package/lib/cjs/pointcloud/format/opc/ContainerFilePart.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/DirectoryReader.js +12 -0
- package/lib/cjs/pointcloud/format/opc/DirectoryReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/DirectoryRecord.js +6 -0
- package/lib/cjs/pointcloud/format/opc/DirectoryRecord.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/EmbeddedAttributeReader.js +21 -0
- package/lib/cjs/pointcloud/format/opc/EmbeddedAttributeReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/FileAccess.js +6 -0
- package/lib/cjs/pointcloud/format/opc/FileAccess.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/FileReader.js +16 -2
- package/lib/cjs/pointcloud/format/opc/FileReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/FileRecord.js +14 -0
- package/lib/cjs/pointcloud/format/opc/FileRecord.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/GeometryReader.js +14 -6
- package/lib/cjs/pointcloud/format/opc/GeometryReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/GeometryRecord.js +4 -0
- package/lib/cjs/pointcloud/format/opc/GeometryRecord.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/OPCReader.js +6 -0
- package/lib/cjs/pointcloud/format/opc/OPCReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/TileReadBuffer.js +4 -0
- package/lib/cjs/pointcloud/format/opc/TileReadBuffer.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/TileRecord.js +2 -2
- package/lib/cjs/pointcloud/format/opc/TileRecord.js.map +1 -1
- package/lib/cjs/pointcloud/model/AttributeTypes.js +16 -16
- package/lib/cjs/pointcloud/model/AttributeTypes.js.map +1 -1
- package/lib/cjs/pointcloud/model/AttributeValue.js +14 -4
- package/lib/cjs/pointcloud/model/AttributeValue.js.map +1 -1
- package/lib/cjs/pointcloud/model/BlockIndex.js +18 -0
- package/lib/cjs/pointcloud/model/BlockIndex.js.map +1 -1
- package/lib/cjs/pointcloud/model/CloudPoint.js +22 -2
- package/lib/cjs/pointcloud/model/CloudPoint.js.map +1 -1
- package/lib/cjs/pointcloud/model/Grid.js +4 -0
- package/lib/cjs/pointcloud/model/Grid.js.map +1 -1
- package/lib/cjs/pointcloud/model/GridIndex.js +6 -0
- package/lib/cjs/pointcloud/model/GridIndex.js.map +1 -1
- package/lib/cjs/pointcloud/model/PointAttribute.js +14 -0
- package/lib/cjs/pointcloud/model/PointAttribute.js.map +1 -1
- package/lib/cjs/pointcloud/model/PointData.js +4 -0
- package/lib/cjs/pointcloud/model/PointData.js.map +1 -1
- package/lib/cjs/pointcloud/model/PointDataRaw.js +8 -2
- package/lib/cjs/pointcloud/model/PointDataRaw.js.map +1 -1
- package/lib/cjs/pointcloud/model/ReadRequest.js +28 -6
- package/lib/cjs/pointcloud/model/ReadRequest.js.map +1 -1
- package/lib/cjs/pointcloud/model/StandardAttributes.js +21 -21
- package/lib/cjs/pointcloud/model/StandardAttributes.js.map +1 -1
- package/lib/cjs/pointcloud/model/TileIndex.js +16 -0
- package/lib/cjs/pointcloud/model/TileIndex.js.map +1 -1
- package/lib/cjs/pointcloud/render/Block.js +6 -0
- package/lib/cjs/pointcloud/render/Block.js.map +1 -1
- package/lib/cjs/pointcloud/render/DataManager.js +36 -6
- package/lib/cjs/pointcloud/render/DataManager.js.map +1 -1
- package/lib/cjs/pointcloud/render/FrameData.js +8 -0
- package/lib/cjs/pointcloud/render/FrameData.js.map +1 -1
- package/lib/cjs/pointcloud/render/Level.js +12 -0
- package/lib/cjs/pointcloud/render/Level.js.map +1 -1
- package/lib/cjs/pointcloud/render/TileLoadSorter.js +9 -4
- package/lib/cjs/pointcloud/render/TileLoadSorter.js.map +1 -1
- package/lib/cjs/pointcloud/render/ViewTree.js +12 -4
- package/lib/cjs/pointcloud/render/ViewTree.js.map +1 -1
- package/lib/cjs/spatial/crs/CRSManager.js +2 -2
- package/lib/cjs/spatial/crs/CRSManager.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Axis.js +12 -0
- package/lib/cjs/spatial/ecrs/Axis.js.map +1 -1
- package/lib/cjs/spatial/ecrs/CRS.js +68 -34
- package/lib/cjs/spatial/ecrs/CRS.js.map +1 -1
- package/lib/cjs/spatial/ecrs/CoordinateSystem.js +20 -2
- package/lib/cjs/spatial/ecrs/CoordinateSystem.js.map +1 -1
- package/lib/cjs/spatial/ecrs/DataFileUnit.js +1 -1
- package/lib/cjs/spatial/ecrs/DataFileUnit.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Datum.js +16 -4
- package/lib/cjs/spatial/ecrs/Datum.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Ellipsoid.js +18 -0
- package/lib/cjs/spatial/ecrs/Ellipsoid.js.map +1 -1
- package/lib/cjs/spatial/ecrs/OnlineEngine.js +2 -0
- package/lib/cjs/spatial/ecrs/OnlineEngine.js.map +1 -1
- package/lib/cjs/spatial/ecrs/OnlineRegistry.js +6 -2
- package/lib/cjs/spatial/ecrs/OnlineRegistry.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Operation.js +28 -6
- package/lib/cjs/spatial/ecrs/Operation.js.map +1 -1
- package/lib/cjs/spatial/ecrs/OperationMethod.js +6 -0
- package/lib/cjs/spatial/ecrs/OperationMethod.js.map +1 -1
- package/lib/cjs/spatial/ecrs/ParameterValue.js +6 -0
- package/lib/cjs/spatial/ecrs/ParameterValue.js.map +1 -1
- package/lib/cjs/spatial/ecrs/ParameterValueList.js +2 -0
- package/lib/cjs/spatial/ecrs/ParameterValueList.js.map +1 -1
- package/lib/cjs/spatial/ecrs/PrimeMeridian.js +8 -0
- package/lib/cjs/spatial/ecrs/PrimeMeridian.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Registry.js +17 -17
- package/lib/cjs/spatial/ecrs/Registry.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Transform.js +11 -11
- package/lib/cjs/spatial/ecrs/Transform.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Unit.js +40 -24
- package/lib/cjs/spatial/ecrs/Unit.js.map +1 -1
- package/lib/cjs/spatial/ecrs/WellKnownText.js +8 -8
- package/lib/cjs/spatial/ecrs/WellKnownText.js.map +1 -1
- package/lib/cjs/spatial/ecrs/WellKnownTextNode.js +4 -0
- package/lib/cjs/spatial/ecrs/WellKnownTextNode.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/HotineObliqueMercator.js +36 -2
- package/lib/cjs/spatial/ecrs/projection/HotineObliqueMercator.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/KrovakObliqueConformalConic.js +23 -2
- package/lib/cjs/spatial/ecrs/projection/KrovakObliqueConformalConic.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/KrovakObliqueConformalConicEN.js +4 -2
- package/lib/cjs/spatial/ecrs/projection/KrovakObliqueConformalConicEN.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/LambertConical1SP.js +12 -2
- package/lib/cjs/spatial/ecrs/projection/LambertConical1SP.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/LambertConical2SP.js +29 -6
- package/lib/cjs/spatial/ecrs/projection/LambertConical2SP.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/Mercator1SP.js +14 -4
- package/lib/cjs/spatial/ecrs/projection/Mercator1SP.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/ObliqueMercator.js +38 -4
- package/lib/cjs/spatial/ecrs/projection/ObliqueMercator.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/ObliqueStereographic.js +24 -4
- package/lib/cjs/spatial/ecrs/projection/ObliqueStereographic.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/TransverseMercator.js +28 -4
- package/lib/cjs/spatial/ecrs/projection/TransverseMercator.js.map +1 -1
- package/lib/cjs/spatial/ecrs/transformation/PositionVector.js +12 -2
- package/lib/cjs/spatial/ecrs/transformation/PositionVector.js.map +1 -1
- package/lib/cjs/spatial/geom/Bounds.js +3 -0
- package/lib/cjs/spatial/geom/Bounds.js.map +1 -1
- package/lib/cjs/spatial/geom/Coordinate.js +3 -0
- package/lib/cjs/spatial/geom/Coordinate.js.map +1 -1
- package/lib/cjs/spatial/geom/Line.js +4 -0
- package/lib/cjs/spatial/geom/Line.js.map +1 -1
- package/lib/cjs/spatial/geom/Transform.js +2 -0
- package/lib/cjs/spatial/geom/Transform.js.map +1 -1
- package/lib/cjs/system/buffer/ABuffer.js +4 -0
- package/lib/cjs/system/buffer/ABuffer.js.map +1 -1
- package/lib/cjs/system/buffer/Float32Buffer.js +8 -2
- package/lib/cjs/system/buffer/Float32Buffer.js.map +1 -1
- package/lib/cjs/system/buffer/Uint16Buffer.js +8 -2
- package/lib/cjs/system/buffer/Uint16Buffer.js.map +1 -1
- package/lib/cjs/system/buffer/Uint8Buffer.js +8 -2
- package/lib/cjs/system/buffer/Uint8Buffer.js.map +1 -1
- package/lib/cjs/system/collection/AList.js +1 -0
- package/lib/cjs/system/collection/AList.js.map +1 -1
- package/lib/cjs/system/collection/IntMap.js +1 -0
- package/lib/cjs/system/collection/IntMap.js.map +1 -1
- package/lib/cjs/system/collection/StringMap.js +1 -0
- package/lib/cjs/system/collection/StringMap.js.map +1 -1
- package/lib/cjs/system/io/ABufferInStream.js +5 -0
- package/lib/cjs/system/io/ABufferInStream.js.map +1 -1
- package/lib/cjs/system/runtime/ALong.js +30 -26
- package/lib/cjs/system/runtime/ALong.js.map +1 -1
- package/lib/cjs/system/runtime/ASystem.js +1 -1
- package/lib/cjs/system/runtime/ASystem.js.map +1 -1
- package/lib/cjs/system/runtime/Downloader.js +2 -2
- package/lib/cjs/system/runtime/Downloader.js.map +1 -1
- package/lib/cjs/system/runtime/Message.js +2 -2
- package/lib/cjs/system/runtime/Message.js.map +1 -1
- package/lib/cjs/system/runtime/Numbers.js +6 -6
- package/lib/cjs/system/runtime/Numbers.js.map +1 -1
- package/lib/cjs/system/runtime/Strings.js +14 -14
- package/lib/cjs/system/runtime/Strings.js.map +1 -1
- package/lib/cjs/system/storage/CacheList.js +8 -0
- package/lib/cjs/system/storage/CacheList.js.map +1 -1
- package/lib/cjs/system/storage/CachedItem.js +6 -0
- package/lib/cjs/system/storage/CachedItem.js.map +1 -1
- package/lib/cjs/system/storage/ContentLoader.js +14 -2
- package/lib/cjs/system/storage/ContentLoader.js.map +1 -1
- package/lib/cjs/system/storage/FileContent.js +4 -0
- package/lib/cjs/system/storage/FileContent.js.map +1 -1
- package/lib/cjs/system/storage/FileRange.js +4 -0
- package/lib/cjs/system/storage/FileRange.js.map +1 -1
- package/lib/cjs/system/storage/PageCachedFile.js +8 -0
- package/lib/cjs/system/storage/PageCachedFile.js.map +1 -1
- package/lib/cjs/system/storage/UrlFS.js +6 -0
- package/lib/cjs/system/storage/UrlFS.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/AttributeMask.js +4 -0
- package/lib/esm/pointcloud/format/opc/AttributeMask.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/BlockRecord.js +2 -2
- package/lib/esm/pointcloud/format/opc/BlockRecord.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/ContainerFile.js +10 -2
- package/lib/esm/pointcloud/format/opc/ContainerFile.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/ContainerFilePart.js +8 -0
- package/lib/esm/pointcloud/format/opc/ContainerFilePart.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/DirectoryReader.js +12 -0
- package/lib/esm/pointcloud/format/opc/DirectoryReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/DirectoryRecord.js +6 -0
- package/lib/esm/pointcloud/format/opc/DirectoryRecord.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/EmbeddedAttributeReader.js +21 -0
- package/lib/esm/pointcloud/format/opc/EmbeddedAttributeReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/FileAccess.js +6 -0
- package/lib/esm/pointcloud/format/opc/FileAccess.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/FileReader.js +16 -2
- package/lib/esm/pointcloud/format/opc/FileReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/FileRecord.js +14 -0
- package/lib/esm/pointcloud/format/opc/FileRecord.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/GeometryReader.js +14 -6
- package/lib/esm/pointcloud/format/opc/GeometryReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/GeometryRecord.js +4 -0
- package/lib/esm/pointcloud/format/opc/GeometryRecord.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/OPCReader.js +6 -0
- package/lib/esm/pointcloud/format/opc/OPCReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/TileReadBuffer.js +4 -0
- package/lib/esm/pointcloud/format/opc/TileReadBuffer.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/TileRecord.js +2 -2
- package/lib/esm/pointcloud/format/opc/TileRecord.js.map +1 -1
- package/lib/esm/pointcloud/model/AttributeTypes.js +16 -16
- package/lib/esm/pointcloud/model/AttributeTypes.js.map +1 -1
- package/lib/esm/pointcloud/model/AttributeValue.js +14 -4
- package/lib/esm/pointcloud/model/AttributeValue.js.map +1 -1
- package/lib/esm/pointcloud/model/BlockIndex.js +18 -0
- package/lib/esm/pointcloud/model/BlockIndex.js.map +1 -1
- package/lib/esm/pointcloud/model/CloudPoint.js +22 -2
- package/lib/esm/pointcloud/model/CloudPoint.js.map +1 -1
- package/lib/esm/pointcloud/model/Grid.js +4 -0
- package/lib/esm/pointcloud/model/Grid.js.map +1 -1
- package/lib/esm/pointcloud/model/GridIndex.js +6 -0
- package/lib/esm/pointcloud/model/GridIndex.js.map +1 -1
- package/lib/esm/pointcloud/model/PointAttribute.js +14 -0
- package/lib/esm/pointcloud/model/PointAttribute.js.map +1 -1
- package/lib/esm/pointcloud/model/PointData.js +4 -0
- package/lib/esm/pointcloud/model/PointData.js.map +1 -1
- package/lib/esm/pointcloud/model/PointDataRaw.js +8 -2
- package/lib/esm/pointcloud/model/PointDataRaw.js.map +1 -1
- package/lib/esm/pointcloud/model/ReadRequest.js +28 -6
- package/lib/esm/pointcloud/model/ReadRequest.js.map +1 -1
- package/lib/esm/pointcloud/model/StandardAttributes.js +21 -21
- package/lib/esm/pointcloud/model/StandardAttributes.js.map +1 -1
- package/lib/esm/pointcloud/model/TileIndex.js +16 -0
- package/lib/esm/pointcloud/model/TileIndex.js.map +1 -1
- package/lib/esm/pointcloud/render/Block.js +6 -0
- package/lib/esm/pointcloud/render/Block.js.map +1 -1
- package/lib/esm/pointcloud/render/DataManager.js +36 -6
- package/lib/esm/pointcloud/render/DataManager.js.map +1 -1
- package/lib/esm/pointcloud/render/FrameData.js +8 -0
- package/lib/esm/pointcloud/render/FrameData.js.map +1 -1
- package/lib/esm/pointcloud/render/Level.js +12 -0
- package/lib/esm/pointcloud/render/Level.js.map +1 -1
- package/lib/esm/pointcloud/render/TileLoadSorter.js +9 -4
- package/lib/esm/pointcloud/render/TileLoadSorter.js.map +1 -1
- package/lib/esm/pointcloud/render/ViewTree.js +12 -4
- package/lib/esm/pointcloud/render/ViewTree.js.map +1 -1
- package/lib/esm/spatial/crs/CRSManager.js +2 -2
- package/lib/esm/spatial/crs/CRSManager.js.map +1 -1
- package/lib/esm/spatial/ecrs/Axis.js +12 -0
- package/lib/esm/spatial/ecrs/Axis.js.map +1 -1
- package/lib/esm/spatial/ecrs/CRS.js +68 -34
- package/lib/esm/spatial/ecrs/CRS.js.map +1 -1
- package/lib/esm/spatial/ecrs/CoordinateSystem.js +20 -2
- package/lib/esm/spatial/ecrs/CoordinateSystem.js.map +1 -1
- package/lib/esm/spatial/ecrs/DataFileUnit.js +1 -1
- package/lib/esm/spatial/ecrs/DataFileUnit.js.map +1 -1
- package/lib/esm/spatial/ecrs/Datum.js +16 -4
- package/lib/esm/spatial/ecrs/Datum.js.map +1 -1
- package/lib/esm/spatial/ecrs/Ellipsoid.js +18 -0
- package/lib/esm/spatial/ecrs/Ellipsoid.js.map +1 -1
- package/lib/esm/spatial/ecrs/OnlineEngine.js +2 -0
- package/lib/esm/spatial/ecrs/OnlineEngine.js.map +1 -1
- package/lib/esm/spatial/ecrs/OnlineRegistry.js +6 -2
- package/lib/esm/spatial/ecrs/OnlineRegistry.js.map +1 -1
- package/lib/esm/spatial/ecrs/Operation.js +28 -6
- package/lib/esm/spatial/ecrs/Operation.js.map +1 -1
- package/lib/esm/spatial/ecrs/OperationMethod.js +6 -0
- package/lib/esm/spatial/ecrs/OperationMethod.js.map +1 -1
- package/lib/esm/spatial/ecrs/ParameterValue.js +6 -0
- package/lib/esm/spatial/ecrs/ParameterValue.js.map +1 -1
- package/lib/esm/spatial/ecrs/ParameterValueList.js +2 -0
- package/lib/esm/spatial/ecrs/ParameterValueList.js.map +1 -1
- package/lib/esm/spatial/ecrs/PrimeMeridian.js +8 -0
- package/lib/esm/spatial/ecrs/PrimeMeridian.js.map +1 -1
- package/lib/esm/spatial/ecrs/Registry.js +17 -17
- package/lib/esm/spatial/ecrs/Registry.js.map +1 -1
- package/lib/esm/spatial/ecrs/Transform.js +11 -11
- package/lib/esm/spatial/ecrs/Transform.js.map +1 -1
- package/lib/esm/spatial/ecrs/Unit.js +40 -24
- package/lib/esm/spatial/ecrs/Unit.js.map +1 -1
- package/lib/esm/spatial/ecrs/WellKnownText.js +8 -8
- package/lib/esm/spatial/ecrs/WellKnownText.js.map +1 -1
- package/lib/esm/spatial/ecrs/WellKnownTextNode.js +4 -0
- package/lib/esm/spatial/ecrs/WellKnownTextNode.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/HotineObliqueMercator.js +36 -2
- package/lib/esm/spatial/ecrs/projection/HotineObliqueMercator.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/KrovakObliqueConformalConic.js +23 -2
- package/lib/esm/spatial/ecrs/projection/KrovakObliqueConformalConic.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/KrovakObliqueConformalConicEN.js +4 -2
- package/lib/esm/spatial/ecrs/projection/KrovakObliqueConformalConicEN.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/LambertConical1SP.js +12 -2
- package/lib/esm/spatial/ecrs/projection/LambertConical1SP.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/LambertConical2SP.js +29 -6
- package/lib/esm/spatial/ecrs/projection/LambertConical2SP.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/Mercator1SP.js +14 -4
- package/lib/esm/spatial/ecrs/projection/Mercator1SP.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/ObliqueMercator.js +38 -4
- package/lib/esm/spatial/ecrs/projection/ObliqueMercator.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/ObliqueStereographic.js +24 -4
- package/lib/esm/spatial/ecrs/projection/ObliqueStereographic.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/TransverseMercator.js +28 -4
- package/lib/esm/spatial/ecrs/projection/TransverseMercator.js.map +1 -1
- package/lib/esm/spatial/ecrs/transformation/PositionVector.js +12 -2
- package/lib/esm/spatial/ecrs/transformation/PositionVector.js.map +1 -1
- package/lib/esm/spatial/geom/Bounds.js +3 -0
- package/lib/esm/spatial/geom/Bounds.js.map +1 -1
- package/lib/esm/spatial/geom/Coordinate.js +3 -0
- package/lib/esm/spatial/geom/Coordinate.js.map +1 -1
- package/lib/esm/spatial/geom/Line.js +4 -0
- package/lib/esm/spatial/geom/Line.js.map +1 -1
- package/lib/esm/spatial/geom/Transform.js +2 -0
- package/lib/esm/spatial/geom/Transform.js.map +1 -1
- package/lib/esm/system/buffer/ABuffer.js +4 -0
- package/lib/esm/system/buffer/ABuffer.js.map +1 -1
- package/lib/esm/system/buffer/Float32Buffer.js +8 -2
- package/lib/esm/system/buffer/Float32Buffer.js.map +1 -1
- package/lib/esm/system/buffer/Uint16Buffer.js +8 -2
- package/lib/esm/system/buffer/Uint16Buffer.js.map +1 -1
- package/lib/esm/system/buffer/Uint8Buffer.js +8 -2
- package/lib/esm/system/buffer/Uint8Buffer.js.map +1 -1
- package/lib/esm/system/collection/AList.js +1 -0
- package/lib/esm/system/collection/AList.js.map +1 -1
- package/lib/esm/system/collection/IntMap.js +1 -0
- package/lib/esm/system/collection/IntMap.js.map +1 -1
- package/lib/esm/system/collection/StringMap.js +1 -0
- package/lib/esm/system/collection/StringMap.js.map +1 -1
- package/lib/esm/system/io/ABufferInStream.js +5 -0
- package/lib/esm/system/io/ABufferInStream.js.map +1 -1
- package/lib/esm/system/runtime/ALong.js +30 -26
- package/lib/esm/system/runtime/ALong.js.map +1 -1
- package/lib/esm/system/runtime/ASystem.js +1 -1
- package/lib/esm/system/runtime/ASystem.js.map +1 -1
- package/lib/esm/system/runtime/Downloader.js +2 -2
- package/lib/esm/system/runtime/Downloader.js.map +1 -1
- package/lib/esm/system/runtime/Message.js +2 -2
- package/lib/esm/system/runtime/Message.js.map +1 -1
- package/lib/esm/system/runtime/Numbers.js +6 -6
- package/lib/esm/system/runtime/Numbers.js.map +1 -1
- package/lib/esm/system/runtime/Strings.js +14 -14
- package/lib/esm/system/runtime/Strings.js.map +1 -1
- package/lib/esm/system/storage/CacheList.js +8 -0
- package/lib/esm/system/storage/CacheList.js.map +1 -1
- package/lib/esm/system/storage/CachedItem.js +6 -0
- package/lib/esm/system/storage/CachedItem.js.map +1 -1
- package/lib/esm/system/storage/ContentLoader.js +14 -2
- package/lib/esm/system/storage/ContentLoader.js.map +1 -1
- package/lib/esm/system/storage/FileContent.js +4 -0
- package/lib/esm/system/storage/FileContent.js.map +1 -1
- package/lib/esm/system/storage/FileRange.js +4 -0
- package/lib/esm/system/storage/FileRange.js.map +1 -1
- package/lib/esm/system/storage/PageCachedFile.js +8 -0
- package/lib/esm/system/storage/PageCachedFile.js.map +1 -1
- package/lib/esm/system/storage/UrlFS.js +6 -0
- package/lib/esm/system/storage/UrlFS.js.map +1 -1
- package/package.json +10 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttributeTypes.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/AttributeTypes.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAUH;;GAEG;AACH,gBAAgB;AAChB,MAAa,cAAc;
|
|
1
|
+
{"version":3,"file":"AttributeTypes.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/AttributeTypes.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAUH;;GAEG;AACH,gBAAgB;AAChB,MAAa,cAAc;IAC1B,6BAA6B;IACtB,MAAM,CAAU,YAAY,GAAU,CAAC,CAAC;IAC/C,8BAA8B;IACvB,MAAM,CAAU,SAAS,GAAU,CAAC,CAAC;IAC5C,8BAA8B;IACvB,MAAM,CAAU,SAAS,GAAU,CAAC,CAAC;IAC5C,8BAA8B;IACvB,MAAM,CAAU,SAAS,GAAU,CAAC,CAAC;IAC5C,8BAA8B;IACvB,MAAM,CAAU,SAAS,GAAU,CAAC,CAAC;IAC5C,4BAA4B;IACrB,MAAM,CAAU,WAAW,GAAU,CAAC,CAAC;IAC9C,4BAA4B;IACrB,MAAM,CAAU,WAAW,GAAU,CAAC,CAAC;IAC9C,4BAA4B;IACrB,MAAM,CAAU,UAAU,GAAU,CAAC,CAAC;IAE7C;;OAEG;IACH;IACA,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,WAAW,CAAC,IAAW;QACpC,IAAI,IAAI,IAAI,CAAC;YAAE,OAAO,MAAM,CAAC;QAC7B,IAAI,IAAI,IAAI,cAAc,CAAC,YAAY;YAAE,OAAO,SAAS,CAAC;QAC1D,IAAI,IAAI,IAAI,cAAc,CAAC,SAAS;YAAE,OAAO,MAAM,CAAC;QACpD,IAAI,IAAI,IAAI,cAAc,CAAC,SAAS;YAAE,OAAO,MAAM,CAAC;QACpD,IAAI,IAAI,IAAI,cAAc,CAAC,SAAS;YAAE,OAAO,MAAM,CAAC;QACpD,IAAI,IAAI,IAAI,cAAc,CAAC,SAAS;YAAE,OAAO,MAAM,CAAC;QACpD,IAAI,IAAI,IAAI,cAAc,CAAC,WAAW;YAAE,OAAO,QAAQ,CAAC;QACxD,IAAI,IAAI,IAAI,cAAc,CAAC,WAAW;YAAE,OAAO,QAAQ,CAAC;QACxD,IAAI,IAAI,IAAI,cAAc,CAAC,UAAU;YAAE,OAAO,OAAO,CAAC;QACtD,OAAO,EAAE,GAAG,IAAI,CAAC;IAClB,CAAC;;AAxCF,wCAyCC","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/**\n * Class AttributeTypes defines the possible types of pointcloud attributes.\n */\n/** @internal */\nexport class AttributeTypes {\n\t/** The 1-bit boolean type */\n\tpublic static readonly TYPE_BOOLEAN: int32 = 1;\n\t/** The 1-byte integer type */\n\tpublic static readonly TYPE_INT1: int32 = 2;\n\t/** The 2-byte integer type */\n\tpublic static readonly TYPE_INT2: int32 = 3;\n\t/** The 4-byte integer type */\n\tpublic static readonly TYPE_INT4: int32 = 4;\n\t/** The 8-byte integer type */\n\tpublic static readonly TYPE_INT8: int32 = 5;\n\t/** The 4-byte float type */\n\tpublic static readonly TYPE_FLOAT4: int32 = 6;\n\t/** The 8-byte float type */\n\tpublic static readonly TYPE_FLOAT8: int32 = 7;\n\t/** The 3-byte color type */\n\tpublic static readonly TYPE_COLOR: int32 = 8;\n\n\t/**\n\t * No instances.\n\t */\n\tprivate constructor() {\n\t}\n\n\t/**\n\t * Get the name of a type.\n\t * @param type the type of attributes.\n\t * @return the name.\n\t */\n\tpublic static getTypeName(type: int32): string {\n\t\tif (type <= 0) return \"none\";\n\t\tif (type == AttributeTypes.TYPE_BOOLEAN) return \"boolean\";\n\t\tif (type == AttributeTypes.TYPE_INT1) return \"int1\";\n\t\tif (type == AttributeTypes.TYPE_INT2) return \"int2\";\n\t\tif (type == AttributeTypes.TYPE_INT4) return \"int4\";\n\t\tif (type == AttributeTypes.TYPE_INT8) return \"int8\";\n\t\tif (type == AttributeTypes.TYPE_FLOAT4) return \"float4\";\n\t\tif (type == AttributeTypes.TYPE_FLOAT8) return \"float8\";\n\t\tif (type == AttributeTypes.TYPE_COLOR) return \"color\";\n\t\treturn \"\" + type;\n\t}\n}\n"]}
|
|
@@ -20,6 +20,20 @@ const AttributeTypes_1 = require("./AttributeTypes");
|
|
|
20
20
|
*/
|
|
21
21
|
/** @internal */
|
|
22
22
|
class AttributeValue {
|
|
23
|
+
/** The 'false' value */
|
|
24
|
+
static FALSE = AttributeValue.createBoolean(false);
|
|
25
|
+
/** The 'true' value */
|
|
26
|
+
static TRUE = AttributeValue.createBoolean(true);
|
|
27
|
+
/** The type */
|
|
28
|
+
_type;
|
|
29
|
+
/** The value for boolean/int1/int2/int4 types */
|
|
30
|
+
_valueI4;
|
|
31
|
+
/** The value for int8 types */
|
|
32
|
+
_valueI8;
|
|
33
|
+
/** The value for float4 types */
|
|
34
|
+
_valueF4;
|
|
35
|
+
/** The value for float8 types */
|
|
36
|
+
_valueF8;
|
|
23
37
|
/**
|
|
24
38
|
* Create a new (empty) value.
|
|
25
39
|
*/
|
|
@@ -502,8 +516,4 @@ class AttributeValue {
|
|
|
502
516
|
}
|
|
503
517
|
}
|
|
504
518
|
exports.AttributeValue = AttributeValue;
|
|
505
|
-
/** The 'false' value */
|
|
506
|
-
AttributeValue.FALSE = AttributeValue.createBoolean(false);
|
|
507
|
-
/** The 'true' value */
|
|
508
|
-
AttributeValue.TRUE = AttributeValue.createBoolean(true);
|
|
509
519
|
//# sourceMappingURL=AttributeValue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttributeValue.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/AttributeValue.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAWH,mEAAgE;AAGhE,sDAAmD;AACnD,0DAAuD;AACvD,0DAAuD;AACvD,qDAAkD;AAElD;;;;GAIG;AACH,gBAAgB;AAChB,MAAa,cAAc;IAiBvB;;OAEG;IACH;QACI,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;QACf,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;QAClB,IAAI,CAAC,QAAQ,GAAG,aAAK,CAAC,IAAI,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;QACpB,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;IACxB,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,aAAa,CAAC,KAAc;QACtC,IAAI,MAAM,GAAmB,IAAI,cAAc,EAAE,CAAC;QAClD,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACzB,OAAO,MAAM,CAAC;IAClB,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,KAAY;QACjC,IAAI,MAAM,GAAmB,IAAI,cAAc,EAAE,CAAC;QAClD,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACtB,OAAO,MAAM,CAAC;IAClB,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,KAAY;QACjC,IAAI,MAAM,GAA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,CAAC,UAAU;YAAE,2BAAY,CAAC,eAAe,CAAC,MAAM,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;;YACvG,iBAAO,CAAC,SAAS,CAAC,IAAI,EAAE,oCAAoC,GAAG,aAAa,CAAC,CAAC;IACvF,CAAC;;AAtcL,wCAucC;AAtcG,wBAAwB;AACD,oBAAK,GAAmB,cAAc,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AACnF,uBAAuB;AACA,mBAAI,GAAmB,cAAc,CAAC,aAAa,CAAC,IAAI,CAAC,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 { ABuffer } from \"../../system/buffer/ABuffer\";\nimport { LittleEndian } from \"../../system/buffer/LittleEndian\";\nimport { InStream } from \"../../system/io/InStream\";\nimport { OutStream } from \"../../system/io/OutStream\";\nimport { ALong } from \"../../system/runtime/ALong\";\nimport { ASystem } from \"../../system/runtime/ASystem\";\nimport { Numbers } from \"../../system/runtime/Numbers\";\nimport { AttributeTypes } from \"./AttributeTypes\";\n\n/**\n * Class AttributeValue holds a single (typed) attribute value.\n *\n * @version 1.0 August 2013\n */\n/** @internal */\nexport class AttributeValue {\n /** The 'false' value */\n public static readonly FALSE: AttributeValue = AttributeValue.createBoolean(false);\n /** The 'true' value */\n public static readonly TRUE: AttributeValue = AttributeValue.createBoolean(true);\n\n /** The type */\n private _type: int32;\n /** The value for boolean/int1/int2/int4 types */\n private _valueI4: int32;\n /** The value for int8 types */\n private _valueI8: ALong;\n /** The value for float4 types */\n private _valueF4: float32;\n /** The value for float8 types */\n private _valueF8: float64;\n\n /**\n * Create a new (empty) value.\n */\n public constructor() {\n this._type = 0;\n this._valueI4 = 0;\n this._valueI8 = ALong.ZERO;\n this._valueF4 = 0.0;\n this._valueF8 = 0.0;\n }\n\n /**\n * Create a new value.\n * @param value the value.\n */\n public static createBoolean(value: boolean): AttributeValue {\n let avalue: AttributeValue = new AttributeValue();\n avalue.setBoolean(value);\n return avalue;\n }\n\n /**\n * Create a new value.\n * @param value the value.\n */\n public static createInt1(value: int32): AttributeValue {\n let avalue: AttributeValue = new AttributeValue();\n avalue.setInt1(value);\n return avalue;\n }\n\n /**\n * Create a new value.\n * @param value the value.\n */\n public static createInt2(value: int32): AttributeValue {\n let avalue: AttributeValue = new AttributeValue();\n avalue.setInt2(value);\n return avalue;\n }\n\n /**\n * Create a new value.\n * @param value the value.\n */\n public static createInt4(value: int32): AttributeValue {\n let avalue: AttributeValue = new AttributeValue();\n avalue.setInt4(value);\n return avalue;\n }\n\n /**\n * Create a new value.\n * @param value the value.\n */\n public static createInt8(value: ALong): AttributeValue {\n let avalue: AttributeValue = new AttributeValue();\n avalue.setInt8(value);\n return avalue;\n }\n\n /**\n * Create a new value.\n * @param value the value.\n */\n public static createFloat4(value: float32): AttributeValue {\n let avalue: AttributeValue = new AttributeValue();\n avalue.setFloat4(value);\n return avalue;\n }\n\n /**\n * Create a new value.\n * @param value the value.\n */\n public static createFloat8(value: float64): AttributeValue {\n let avalue: AttributeValue = new AttributeValue();\n avalue.setFloat8(value);\n return avalue;\n }\n\n /**\n * Create a new value.\n * @param value the value.\n */\n public static createColor(value: int32): AttributeValue {\n let avalue: AttributeValue = new AttributeValue();\n avalue.setColor(value);\n return avalue;\n }\n\n /**\n * Get the type.\n * @return the type.\n */\n public getType(): int32 {\n return this._type;\n }\n\n /**\n * Clear the value.\n */\n public clear(): void {\n this._type = 0;\n }\n\n /**\n * Is this an empty value?\n * @return true for empty.\n */\n public isEmpty(): boolean {\n return (this._type == 0);\n }\n\n /**\n * Get the value.\n * @return the value.\n */\n public getBoolean(): boolean {\n return (this._valueI4 != 0);\n }\n\n /**\n * Get the value.\n * @return the value.\n */\n public getBooleanAsInt(): int32 {\n return this._valueI4;\n }\n\n /**\n * Set the value.\n * @param value the new value.\n */\n public setBoolean(value: boolean): void {\n this._type = AttributeTypes.TYPE_BOOLEAN;\n if (value) this._valueI4 = 1;\n else this._valueI4 = 0;\n }\n\n /**\n * Set the value.\n * @param value the new value.\n */\n public setBooleanFromInt(value: int32): void {\n this._type = AttributeTypes.TYPE_BOOLEAN;\n if (value == 0) this._valueI4 = 0;\n else this._valueI4 = 1;\n }\n\n /**\n * Get the value.\n * @return the value.\n */\n public getInt1(): int32 {\n return this._valueI4;\n }\n\n /**\n * Set the value.\n * @param value the new value.\n */\n public setInt1(value: int32): void {\n this._type = AttributeTypes.TYPE_INT1;\n this._valueI4 = value;\n }\n\n /**\n * Get the value.\n * @return the value.\n */\n public getInt2(): int32 {\n return this._valueI4;\n }\n\n /**\n * Set the value.\n * @param value the new value.\n */\n public setInt2(value: int32): void {\n this._type = AttributeTypes.TYPE_INT2;\n this._valueI4 = value;\n }\n\n /**\n * Get the value.\n * @return the value.\n */\n public getInt4(): int32 {\n return this._valueI4;\n }\n\n /**\n * Set the value.\n * @param value the new value.\n */\n public setInt4(value: int32): void {\n this._type = AttributeTypes.TYPE_INT4;\n this._valueI4 = value;\n }\n\n /**\n * Get the value.\n * @return the value.\n */\n public getInt8(): ALong {\n return this._valueI8;\n }\n\n /**\n * Set the value.\n * @param value the new value.\n */\n public setInt8(value: ALong): void {\n this._type = AttributeTypes.TYPE_INT8;\n this._valueI8 = value;\n }\n\n /**\n * Get the value.\n * @return the value.\n */\n public getFloat4(): float32 {\n return this._valueF4;\n }\n\n /**\n * Set the value.\n * @param value the new value.\n */\n public setFloat4(value: float32): void {\n this._type = AttributeTypes.TYPE_FLOAT4;\n this._valueF4 = value;\n }\n\n /**\n * Get the value.\n * @return the value.\n */\n public getFloat8(): float64 {\n return this._valueF8;\n }\n\n /**\n * Set the value.\n * @param value the new value.\n */\n public setFloat8(value: float64): void {\n this._type = AttributeTypes.TYPE_FLOAT8;\n this._valueF8 = value;\n }\n\n /**\n * Get the value.\n * @return the value.\n */\n public getColor(): int32 {\n return this._valueI4;\n }\n\n /**\n * Set the value.\n * @param value the new value.\n */\n public setColor(value: int32): void {\n this._type = AttributeTypes.TYPE_COLOR;\n this._valueI4 = value;\n }\n\n /**\n * Check if the value equals another value.\n * @param other the other value.\n * @return true if same.\n */\n public same(other: AttributeValue): boolean {\n /* Check the type */\n if (other._type != this._type) return false;\n /* Check the value */\n if (this._type == AttributeTypes.TYPE_BOOLEAN) return (other._valueI4 == this._valueI4);\n if (this._type == AttributeTypes.TYPE_INT1) return (other._valueI4 == this._valueI4);\n if (this._type == AttributeTypes.TYPE_INT2) return (other._valueI4 == this._valueI4);\n if (this._type == AttributeTypes.TYPE_INT4) return (other._valueI4 == this._valueI4);\n if (this._type == AttributeTypes.TYPE_INT8) return (other._valueI8.same(this._valueI8));\n if (this._type == AttributeTypes.TYPE_FLOAT4) return (other._valueF4 == this._valueF4);\n if (this._type == AttributeTypes.TYPE_FLOAT8) return (other._valueF8 == this._valueF8);\n if (this._type == AttributeTypes.TYPE_COLOR) return (other._valueI4 == this._valueI4);\n /* Empty value */\n return true;\n }\n\n /**\n * Copy to another value.\n * @param other the other value to copy to.\n */\n public copyTo(other: AttributeValue): void {\n /* Copy the type */\n other._type = this._type;\n /* Check the value */\n if (this._type == AttributeTypes.TYPE_BOOLEAN) { other._valueI4 = this._valueI4; return; }\n if (this._type == AttributeTypes.TYPE_INT1) { other._valueI4 = this._valueI4; return; }\n if (this._type == AttributeTypes.TYPE_INT2) { other._valueI4 = this._valueI4; return; }\n if (this._type == AttributeTypes.TYPE_INT4) { other._valueI4 = this._valueI4; return; }\n if (this._type == AttributeTypes.TYPE_INT8) { other._valueI8 = this._valueI8; return; }\n if (this._type == AttributeTypes.TYPE_FLOAT4) { other._valueF4 = this._valueF4; return; }\n if (this._type == AttributeTypes.TYPE_FLOAT8) { other._valueF8 = this._valueF8; return; }\n if (this._type == AttributeTypes.TYPE_COLOR) { other._valueI4 = this._valueI4; return; }\n /* Empty value */\n }\n\n /**\n * Copy the value.\n * @return the copied value.\n */\n public copy(): AttributeValue {\n let copy: AttributeValue = new AttributeValue();\n this.copyTo(copy);\n return copy;\n }\n\n /**\n * Copy a list of values.\n * @return the copied values.\n */\n public static copyList(list: Array<AttributeValue>): Array<AttributeValue> {\n if (list == null) return null;\n let list2: Array<AttributeValue> = new Array<AttributeValue>(list.length);\n for (let i: number = 0; i < list.length; i++) list2[i] = list[i].copy();\n return list2;\n }\n\n /**\n * Get the value as a string.\n * @return the string.\n */\n public asString(): string {\n if (this._type == AttributeTypes.TYPE_BOOLEAN) return \"\" + this.getBoolean();\n else if (this._type == AttributeTypes.TYPE_INT1) return \"\" + this.getInt1();\n else if (this._type == AttributeTypes.TYPE_INT2) return \"\" + this.getInt2();\n else if (this._type == AttributeTypes.TYPE_INT4) return \"\" + this.getInt4();\n else if (this._type == AttributeTypes.TYPE_INT8) return \"\" + this.getInt8().toString();\n else if (this._type == AttributeTypes.TYPE_FLOAT4) return \"\" + this.getFloat4();\n else if (this._type == AttributeTypes.TYPE_FLOAT8) return \"\" + this.getFloat8();\n else if (this._type == AttributeTypes.TYPE_COLOR) return Numbers.rgbToString(this.getColor());\n return \"\";\n }\n\n /**\n * The standard toString method.\n * @see Object#toString\n */\n public toString(): string {\n return \"[AttributeValue:type=\" + AttributeTypes.getTypeName(this._type) + \",value=\" + this.asString() + \"]\";\n }\n\n /**\n * Create a default attribute value.\n * @param type the type of value.\n * @return a default value.\n */\n public static createDefault(type: int32): AttributeValue {\n if (type == AttributeTypes.TYPE_BOOLEAN) return AttributeValue.createBoolean(false);\n if (type == AttributeTypes.TYPE_INT1) return AttributeValue.createInt1(0);\n if (type == AttributeTypes.TYPE_INT2) return AttributeValue.createInt2(0);\n if (type == AttributeTypes.TYPE_INT4) return AttributeValue.createInt4(0);\n if (type == AttributeTypes.TYPE_INT8) return AttributeValue.createInt8(ALong.ZERO);\n if (type == AttributeTypes.TYPE_FLOAT4) return AttributeValue.createFloat4(0.0);\n if (type == AttributeTypes.TYPE_FLOAT8) return AttributeValue.createFloat8(0.0);\n if (type == AttributeTypes.TYPE_COLOR) return AttributeValue.createColor(0);\n ASystem.assertNot(true, \"Cannot create attribute value of type \" + type);\n return null;\n }\n\n /**\n * Read an attribute value.\n * @param buffer the buffer to read from.\n * @param bufferOffset the buffer offset to read from.\n * @param attributeType the type of the attribute.\n * @param the value to read into.\n */\n public static readFromBufferTo(buffer: ABuffer, bufferOffset: int32, attributeType: int32, value: AttributeValue): void {\n if (attributeType == AttributeTypes.TYPE_BOOLEAN) value.setBoolean(LittleEndian.readBufferByte(buffer, bufferOffset) != 0);\n else if (attributeType == AttributeTypes.TYPE_INT1) value.setInt1(LittleEndian.readBufferByte(buffer, bufferOffset));\n else if (attributeType == AttributeTypes.TYPE_INT2) value.setInt2(LittleEndian.readBufferShort(buffer, bufferOffset));\n else if (attributeType == AttributeTypes.TYPE_INT4) value.setInt4(LittleEndian.readBufferInt(buffer, bufferOffset));\n else if (attributeType == AttributeTypes.TYPE_INT8) value.setInt8(LittleEndian.readBufferLong(buffer, bufferOffset));\n else if (attributeType == AttributeTypes.TYPE_FLOAT4) value.setFloat4(LittleEndian.readBufferFloat(buffer, bufferOffset));\n else if (attributeType == AttributeTypes.TYPE_FLOAT8) value.setFloat8(LittleEndian.readBufferDouble(buffer, bufferOffset));\n else if (attributeType == AttributeTypes.TYPE_COLOR) value.setColor(LittleEndian.readBufferInt3(buffer, bufferOffset));\n else ASystem.assertNot(true, \"Cannot read attribute value type \" + attributeType);\n }\n\n /**\n * Read an attribute value.\n * @param input the input stream to read from.\n * @param attributeType the type of the attribute.\n * @param the value to read into.\n */\n public static readFromStreamTo(stream: InStream, attributeType: int32, value: AttributeValue): void {\n if (attributeType == AttributeTypes.TYPE_BOOLEAN) value.setBoolean(LittleEndian.readStreamByte(stream) != 0);\n else if (attributeType == AttributeTypes.TYPE_INT1) value.setInt1(LittleEndian.readStreamByte(stream));\n else if (attributeType == AttributeTypes.TYPE_INT2) value.setInt2(LittleEndian.readStreamShort(stream));\n else if (attributeType == AttributeTypes.TYPE_INT4) value.setInt4(LittleEndian.readStreamInt(stream));\n else if (attributeType == AttributeTypes.TYPE_INT8) value.setInt8(LittleEndian.readStreamLong(stream));\n else if (attributeType == AttributeTypes.TYPE_FLOAT4) value.setFloat4(LittleEndian.readStreamFloat(stream));\n else if (attributeType == AttributeTypes.TYPE_FLOAT8) value.setFloat8(LittleEndian.readStreamDouble(stream));\n else if (attributeType == AttributeTypes.TYPE_COLOR) value.setColor(LittleEndian.readStreamInt3(stream));\n else ASystem.assertNot(true, \"Cannot read attribute value type \" + attributeType);\n }\n\n /**\n * Read an attribute value.\n * @param input the input stream to read from.\n * @param attributeType the type of the attribute.\n * @return the value.\n */\n public static readFromStream(stream: InStream, attributeType: int32): AttributeValue {\n let value: AttributeValue = new AttributeValue();\n AttributeValue.readFromStreamTo(stream, attributeType, value);\n return value;\n }\n\n /**\n * Write an attribute value.\n * @param output the output stream to write to.\n * @param attributeType the type of the attribute.\n * @param value the value of the attribute.\n */\n public static writeToStream(stream: OutStream, attributeType: int32, value: AttributeValue): void {\n if (attributeType == AttributeTypes.TYPE_BOOLEAN) LittleEndian.writeStreamByte(stream, value.getBooleanAsInt());\n else if (attributeType == AttributeTypes.TYPE_INT1) LittleEndian.writeStreamByte(stream, value.getInt1());\n else if (attributeType == AttributeTypes.TYPE_INT2) LittleEndian.writeStreamShort(stream, value.getInt2());\n else if (attributeType == AttributeTypes.TYPE_INT4) LittleEndian.writeStreamInt(stream, value.getInt4());\n else if (attributeType == AttributeTypes.TYPE_INT8) LittleEndian.writeStreamLong(stream, value.getInt8());\n else if (attributeType == AttributeTypes.TYPE_FLOAT4) LittleEndian.writeStreamFloat(stream, value.getFloat4());\n else if (attributeType == AttributeTypes.TYPE_FLOAT8) LittleEndian.writeStreamDouble(stream, value.getFloat8());\n else if (attributeType == AttributeTypes.TYPE_COLOR) LittleEndian.writeStreamInt3(stream, value.getColor());\n else ASystem.assertNot(true, \"Cannot write attribute value type \" + attributeType);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AttributeValue.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/AttributeValue.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAWH,mEAAgE;AAGhE,sDAAmD;AACnD,0DAAuD;AACvD,0DAAuD;AACvD,qDAAkD;AAElD;;;;GAIG;AACH,gBAAgB;AAChB,MAAa,cAAc;IACvB,wBAAwB;IACjB,MAAM,CAAU,KAAK,GAAmB,cAAc,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACnF,uBAAuB;IAChB,MAAM,CAAU,IAAI,GAAmB,cAAc,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAEjF,eAAe;IACP,KAAK,CAAQ;IACrB,iDAAiD;IACzC,QAAQ,CAAQ;IACxB,+BAA+B;IACvB,QAAQ,CAAQ;IACxB,iCAAiC;IACzB,QAAQ,CAAU;IAC1B,iCAAiC;IACzB,QAAQ,CAAU;IAE1B;;OAEG;IACH;QACI,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;QACf,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;QAClB,IAAI,CAAC,QAAQ,GAAG,aAAK,CAAC,IAAI,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;QACpB,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;IACxB,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,aAAa,CAAC,KAAc;QACtC,IAAI,MAAM,GAAmB,IAAI,cAAc,EAAE,CAAC;QAClD,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACzB,OAAO,MAAM,CAAC;IAClB,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,KAAY;QACjC,IAAI,MAAM,GAAmB,IAAI,cAAc,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C,CAAC;aAC1G,IAAI,aAAa,IAAI,+BAAc,CAAC,WAAW;YAAE,2BAAY,CAAC,iBAAiB,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;aAC3G,IAAI,aAAa,IAAI,+BAAc,CAAC,UAAU;YAAE,2BAAY,CAAC,eAAe,CAAC,MAAM,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;;YACvG,iBAAO,CAAC,SAAS,CAAC,IAAI,EAAE,oCAAoC,GAAG,aAAa,CAAC,CAAC;IACvF,CAAC;;AAtcL,wCAucC","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 { ABuffer } from \"../../system/buffer/ABuffer\";\nimport { LittleEndian } from \"../../system/buffer/LittleEndian\";\nimport { InStream } from \"../../system/io/InStream\";\nimport { OutStream } from \"../../system/io/OutStream\";\nimport { ALong } from \"../../system/runtime/ALong\";\nimport { ASystem } from \"../../system/runtime/ASystem\";\nimport { Numbers } from \"../../system/runtime/Numbers\";\nimport { AttributeTypes } from \"./AttributeTypes\";\n\n/**\n * Class AttributeValue holds a single (typed) attribute value.\n *\n * @version 1.0 August 2013\n */\n/** @internal */\nexport class AttributeValue {\n /** The 'false' value */\n public static readonly FALSE: AttributeValue = AttributeValue.createBoolean(false);\n /** The 'true' value */\n public static readonly TRUE: AttributeValue = AttributeValue.createBoolean(true);\n\n /** The type */\n private _type: int32;\n /** The value for boolean/int1/int2/int4 types */\n private _valueI4: int32;\n /** The value for int8 types */\n private _valueI8: ALong;\n /** The value for float4 types */\n private _valueF4: float32;\n /** The value for float8 types */\n private _valueF8: float64;\n\n /**\n * Create a new (empty) value.\n */\n public constructor() {\n this._type = 0;\n this._valueI4 = 0;\n this._valueI8 = ALong.ZERO;\n this._valueF4 = 0.0;\n this._valueF8 = 0.0;\n }\n\n /**\n * Create a new value.\n * @param value the value.\n */\n public static createBoolean(value: boolean): AttributeValue {\n let avalue: AttributeValue = new AttributeValue();\n avalue.setBoolean(value);\n return avalue;\n }\n\n /**\n * Create a new value.\n * @param value the value.\n */\n public static createInt1(value: int32): AttributeValue {\n let avalue: AttributeValue = new AttributeValue();\n avalue.setInt1(value);\n return avalue;\n }\n\n /**\n * Create a new value.\n * @param value the value.\n */\n public static createInt2(value: int32): AttributeValue {\n let avalue: AttributeValue = new AttributeValue();\n avalue.setInt2(value);\n return avalue;\n }\n\n /**\n * Create a new value.\n * @param value the value.\n */\n public static createInt4(value: int32): AttributeValue {\n let avalue: AttributeValue = new AttributeValue();\n avalue.setInt4(value);\n return avalue;\n }\n\n /**\n * Create a new value.\n * @param value the value.\n */\n public static createInt8(value: ALong): AttributeValue {\n let avalue: AttributeValue = new AttributeValue();\n avalue.setInt8(value);\n return avalue;\n }\n\n /**\n * Create a new value.\n * @param value the value.\n */\n public static createFloat4(value: float32): AttributeValue {\n let avalue: AttributeValue = new AttributeValue();\n avalue.setFloat4(value);\n return avalue;\n }\n\n /**\n * Create a new value.\n * @param value the value.\n */\n public static createFloat8(value: float64): AttributeValue {\n let avalue: AttributeValue = new AttributeValue();\n avalue.setFloat8(value);\n return avalue;\n }\n\n /**\n * Create a new value.\n * @param value the value.\n */\n public static createColor(value: int32): AttributeValue {\n let avalue: AttributeValue = new AttributeValue();\n avalue.setColor(value);\n return avalue;\n }\n\n /**\n * Get the type.\n * @return the type.\n */\n public getType(): int32 {\n return this._type;\n }\n\n /**\n * Clear the value.\n */\n public clear(): void {\n this._type = 0;\n }\n\n /**\n * Is this an empty value?\n * @return true for empty.\n */\n public isEmpty(): boolean {\n return (this._type == 0);\n }\n\n /**\n * Get the value.\n * @return the value.\n */\n public getBoolean(): boolean {\n return (this._valueI4 != 0);\n }\n\n /**\n * Get the value.\n * @return the value.\n */\n public getBooleanAsInt(): int32 {\n return this._valueI4;\n }\n\n /**\n * Set the value.\n * @param value the new value.\n */\n public setBoolean(value: boolean): void {\n this._type = AttributeTypes.TYPE_BOOLEAN;\n if (value) this._valueI4 = 1;\n else this._valueI4 = 0;\n }\n\n /**\n * Set the value.\n * @param value the new value.\n */\n public setBooleanFromInt(value: int32): void {\n this._type = AttributeTypes.TYPE_BOOLEAN;\n if (value == 0) this._valueI4 = 0;\n else this._valueI4 = 1;\n }\n\n /**\n * Get the value.\n * @return the value.\n */\n public getInt1(): int32 {\n return this._valueI4;\n }\n\n /**\n * Set the value.\n * @param value the new value.\n */\n public setInt1(value: int32): void {\n this._type = AttributeTypes.TYPE_INT1;\n this._valueI4 = value;\n }\n\n /**\n * Get the value.\n * @return the value.\n */\n public getInt2(): int32 {\n return this._valueI4;\n }\n\n /**\n * Set the value.\n * @param value the new value.\n */\n public setInt2(value: int32): void {\n this._type = AttributeTypes.TYPE_INT2;\n this._valueI4 = value;\n }\n\n /**\n * Get the value.\n * @return the value.\n */\n public getInt4(): int32 {\n return this._valueI4;\n }\n\n /**\n * Set the value.\n * @param value the new value.\n */\n public setInt4(value: int32): void {\n this._type = AttributeTypes.TYPE_INT4;\n this._valueI4 = value;\n }\n\n /**\n * Get the value.\n * @return the value.\n */\n public getInt8(): ALong {\n return this._valueI8;\n }\n\n /**\n * Set the value.\n * @param value the new value.\n */\n public setInt8(value: ALong): void {\n this._type = AttributeTypes.TYPE_INT8;\n this._valueI8 = value;\n }\n\n /**\n * Get the value.\n * @return the value.\n */\n public getFloat4(): float32 {\n return this._valueF4;\n }\n\n /**\n * Set the value.\n * @param value the new value.\n */\n public setFloat4(value: float32): void {\n this._type = AttributeTypes.TYPE_FLOAT4;\n this._valueF4 = value;\n }\n\n /**\n * Get the value.\n * @return the value.\n */\n public getFloat8(): float64 {\n return this._valueF8;\n }\n\n /**\n * Set the value.\n * @param value the new value.\n */\n public setFloat8(value: float64): void {\n this._type = AttributeTypes.TYPE_FLOAT8;\n this._valueF8 = value;\n }\n\n /**\n * Get the value.\n * @return the value.\n */\n public getColor(): int32 {\n return this._valueI4;\n }\n\n /**\n * Set the value.\n * @param value the new value.\n */\n public setColor(value: int32): void {\n this._type = AttributeTypes.TYPE_COLOR;\n this._valueI4 = value;\n }\n\n /**\n * Check if the value equals another value.\n * @param other the other value.\n * @return true if same.\n */\n public same(other: AttributeValue): boolean {\n /* Check the type */\n if (other._type != this._type) return false;\n /* Check the value */\n if (this._type == AttributeTypes.TYPE_BOOLEAN) return (other._valueI4 == this._valueI4);\n if (this._type == AttributeTypes.TYPE_INT1) return (other._valueI4 == this._valueI4);\n if (this._type == AttributeTypes.TYPE_INT2) return (other._valueI4 == this._valueI4);\n if (this._type == AttributeTypes.TYPE_INT4) return (other._valueI4 == this._valueI4);\n if (this._type == AttributeTypes.TYPE_INT8) return (other._valueI8.same(this._valueI8));\n if (this._type == AttributeTypes.TYPE_FLOAT4) return (other._valueF4 == this._valueF4);\n if (this._type == AttributeTypes.TYPE_FLOAT8) return (other._valueF8 == this._valueF8);\n if (this._type == AttributeTypes.TYPE_COLOR) return (other._valueI4 == this._valueI4);\n /* Empty value */\n return true;\n }\n\n /**\n * Copy to another value.\n * @param other the other value to copy to.\n */\n public copyTo(other: AttributeValue): void {\n /* Copy the type */\n other._type = this._type;\n /* Check the value */\n if (this._type == AttributeTypes.TYPE_BOOLEAN) { other._valueI4 = this._valueI4; return; }\n if (this._type == AttributeTypes.TYPE_INT1) { other._valueI4 = this._valueI4; return; }\n if (this._type == AttributeTypes.TYPE_INT2) { other._valueI4 = this._valueI4; return; }\n if (this._type == AttributeTypes.TYPE_INT4) { other._valueI4 = this._valueI4; return; }\n if (this._type == AttributeTypes.TYPE_INT8) { other._valueI8 = this._valueI8; return; }\n if (this._type == AttributeTypes.TYPE_FLOAT4) { other._valueF4 = this._valueF4; return; }\n if (this._type == AttributeTypes.TYPE_FLOAT8) { other._valueF8 = this._valueF8; return; }\n if (this._type == AttributeTypes.TYPE_COLOR) { other._valueI4 = this._valueI4; return; }\n /* Empty value */\n }\n\n /**\n * Copy the value.\n * @return the copied value.\n */\n public copy(): AttributeValue {\n let copy: AttributeValue = new AttributeValue();\n this.copyTo(copy);\n return copy;\n }\n\n /**\n * Copy a list of values.\n * @return the copied values.\n */\n public static copyList(list: Array<AttributeValue>): Array<AttributeValue> {\n if (list == null) return null;\n let list2: Array<AttributeValue> = new Array<AttributeValue>(list.length);\n for (let i: number = 0; i < list.length; i++) list2[i] = list[i].copy();\n return list2;\n }\n\n /**\n * Get the value as a string.\n * @return the string.\n */\n public asString(): string {\n if (this._type == AttributeTypes.TYPE_BOOLEAN) return \"\" + this.getBoolean();\n else if (this._type == AttributeTypes.TYPE_INT1) return \"\" + this.getInt1();\n else if (this._type == AttributeTypes.TYPE_INT2) return \"\" + this.getInt2();\n else if (this._type == AttributeTypes.TYPE_INT4) return \"\" + this.getInt4();\n else if (this._type == AttributeTypes.TYPE_INT8) return \"\" + this.getInt8().toString();\n else if (this._type == AttributeTypes.TYPE_FLOAT4) return \"\" + this.getFloat4();\n else if (this._type == AttributeTypes.TYPE_FLOAT8) return \"\" + this.getFloat8();\n else if (this._type == AttributeTypes.TYPE_COLOR) return Numbers.rgbToString(this.getColor());\n return \"\";\n }\n\n /**\n * The standard toString method.\n * @see Object#toString\n */\n public toString(): string {\n return \"[AttributeValue:type=\" + AttributeTypes.getTypeName(this._type) + \",value=\" + this.asString() + \"]\";\n }\n\n /**\n * Create a default attribute value.\n * @param type the type of value.\n * @return a default value.\n */\n public static createDefault(type: int32): AttributeValue {\n if (type == AttributeTypes.TYPE_BOOLEAN) return AttributeValue.createBoolean(false);\n if (type == AttributeTypes.TYPE_INT1) return AttributeValue.createInt1(0);\n if (type == AttributeTypes.TYPE_INT2) return AttributeValue.createInt2(0);\n if (type == AttributeTypes.TYPE_INT4) return AttributeValue.createInt4(0);\n if (type == AttributeTypes.TYPE_INT8) return AttributeValue.createInt8(ALong.ZERO);\n if (type == AttributeTypes.TYPE_FLOAT4) return AttributeValue.createFloat4(0.0);\n if (type == AttributeTypes.TYPE_FLOAT8) return AttributeValue.createFloat8(0.0);\n if (type == AttributeTypes.TYPE_COLOR) return AttributeValue.createColor(0);\n ASystem.assertNot(true, \"Cannot create attribute value of type \" + type);\n return null;\n }\n\n /**\n * Read an attribute value.\n * @param buffer the buffer to read from.\n * @param bufferOffset the buffer offset to read from.\n * @param attributeType the type of the attribute.\n * @param the value to read into.\n */\n public static readFromBufferTo(buffer: ABuffer, bufferOffset: int32, attributeType: int32, value: AttributeValue): void {\n if (attributeType == AttributeTypes.TYPE_BOOLEAN) value.setBoolean(LittleEndian.readBufferByte(buffer, bufferOffset) != 0);\n else if (attributeType == AttributeTypes.TYPE_INT1) value.setInt1(LittleEndian.readBufferByte(buffer, bufferOffset));\n else if (attributeType == AttributeTypes.TYPE_INT2) value.setInt2(LittleEndian.readBufferShort(buffer, bufferOffset));\n else if (attributeType == AttributeTypes.TYPE_INT4) value.setInt4(LittleEndian.readBufferInt(buffer, bufferOffset));\n else if (attributeType == AttributeTypes.TYPE_INT8) value.setInt8(LittleEndian.readBufferLong(buffer, bufferOffset));\n else if (attributeType == AttributeTypes.TYPE_FLOAT4) value.setFloat4(LittleEndian.readBufferFloat(buffer, bufferOffset));\n else if (attributeType == AttributeTypes.TYPE_FLOAT8) value.setFloat8(LittleEndian.readBufferDouble(buffer, bufferOffset));\n else if (attributeType == AttributeTypes.TYPE_COLOR) value.setColor(LittleEndian.readBufferInt3(buffer, bufferOffset));\n else ASystem.assertNot(true, \"Cannot read attribute value type \" + attributeType);\n }\n\n /**\n * Read an attribute value.\n * @param input the input stream to read from.\n * @param attributeType the type of the attribute.\n * @param the value to read into.\n */\n public static readFromStreamTo(stream: InStream, attributeType: int32, value: AttributeValue): void {\n if (attributeType == AttributeTypes.TYPE_BOOLEAN) value.setBoolean(LittleEndian.readStreamByte(stream) != 0);\n else if (attributeType == AttributeTypes.TYPE_INT1) value.setInt1(LittleEndian.readStreamByte(stream));\n else if (attributeType == AttributeTypes.TYPE_INT2) value.setInt2(LittleEndian.readStreamShort(stream));\n else if (attributeType == AttributeTypes.TYPE_INT4) value.setInt4(LittleEndian.readStreamInt(stream));\n else if (attributeType == AttributeTypes.TYPE_INT8) value.setInt8(LittleEndian.readStreamLong(stream));\n else if (attributeType == AttributeTypes.TYPE_FLOAT4) value.setFloat4(LittleEndian.readStreamFloat(stream));\n else if (attributeType == AttributeTypes.TYPE_FLOAT8) value.setFloat8(LittleEndian.readStreamDouble(stream));\n else if (attributeType == AttributeTypes.TYPE_COLOR) value.setColor(LittleEndian.readStreamInt3(stream));\n else ASystem.assertNot(true, \"Cannot read attribute value type \" + attributeType);\n }\n\n /**\n * Read an attribute value.\n * @param input the input stream to read from.\n * @param attributeType the type of the attribute.\n * @return the value.\n */\n public static readFromStream(stream: InStream, attributeType: int32): AttributeValue {\n let value: AttributeValue = new AttributeValue();\n AttributeValue.readFromStreamTo(stream, attributeType, value);\n return value;\n }\n\n /**\n * Write an attribute value.\n * @param output the output stream to write to.\n * @param attributeType the type of the attribute.\n * @param value the value of the attribute.\n */\n public static writeToStream(stream: OutStream, attributeType: int32, value: AttributeValue): void {\n if (attributeType == AttributeTypes.TYPE_BOOLEAN) LittleEndian.writeStreamByte(stream, value.getBooleanAsInt());\n else if (attributeType == AttributeTypes.TYPE_INT1) LittleEndian.writeStreamByte(stream, value.getInt1());\n else if (attributeType == AttributeTypes.TYPE_INT2) LittleEndian.writeStreamShort(stream, value.getInt2());\n else if (attributeType == AttributeTypes.TYPE_INT4) LittleEndian.writeStreamInt(stream, value.getInt4());\n else if (attributeType == AttributeTypes.TYPE_INT8) LittleEndian.writeStreamLong(stream, value.getInt8());\n else if (attributeType == AttributeTypes.TYPE_FLOAT4) LittleEndian.writeStreamFloat(stream, value.getFloat4());\n else if (attributeType == AttributeTypes.TYPE_FLOAT8) LittleEndian.writeStreamDouble(stream, value.getFloat8());\n else if (attributeType == AttributeTypes.TYPE_COLOR) LittleEndian.writeStreamInt3(stream, value.getColor());\n else ASystem.assertNot(true, \"Cannot write attribute value type \" + attributeType);\n }\n}\n"]}
|
|
@@ -15,6 +15,24 @@ exports.BlockIndex = void 0;
|
|
|
15
15
|
*/
|
|
16
16
|
/** @internal */
|
|
17
17
|
class BlockIndex {
|
|
18
|
+
/** The level */
|
|
19
|
+
level;
|
|
20
|
+
/** The unique key of the block */
|
|
21
|
+
key;
|
|
22
|
+
/** The index of the block in the level */
|
|
23
|
+
index;
|
|
24
|
+
/** The grid index */
|
|
25
|
+
gridIndex;
|
|
26
|
+
/** The index of the first tile in the block (derived) */
|
|
27
|
+
tileIndex;
|
|
28
|
+
/** The tile count */
|
|
29
|
+
tileCount;
|
|
30
|
+
/** The index of the first point in the block (derived) */
|
|
31
|
+
pointIndex;
|
|
32
|
+
/** The point count */
|
|
33
|
+
pointCount;
|
|
34
|
+
/** The last access time */
|
|
35
|
+
accessTime;
|
|
18
36
|
/**
|
|
19
37
|
* Create a new index.
|
|
20
38
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockIndex.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/BlockIndex.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAcH;;;;GAIG;AACH,gBAAgB;AAChB,MAAa,UAAU;
|
|
1
|
+
{"version":3,"file":"BlockIndex.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/BlockIndex.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAcH;;;;GAIG;AACH,gBAAgB;AAChB,MAAa,UAAU;IACnB,gBAAgB;IACT,KAAK,CAAQ;IACpB,kCAAkC;IAC3B,GAAG,CAAS;IACnB,0CAA0C;IACnC,KAAK,CAAQ;IACpB,qBAAqB;IACd,SAAS,CAAY;IAC5B,yDAAyD;IAClD,SAAS,CAAQ;IACxB,qBAAqB;IACd,SAAS,CAAQ;IACxB,0DAA0D;IACnD,UAAU,CAAQ;IACzB,sBAAsB;IACf,UAAU,CAAQ;IACzB,2BAA2B;IACpB,UAAU,CAAU;IAE3B;;OAEG;IACH,YAAmB,KAAY,EAAE,KAAY,EAAE,SAAoB,EAAE,SAAgB,EAAE,SAAgB,EAAE,UAAiB,EAAE,UAAiB;QACzI,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC;QACtB,IAAI,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IACvD,CAAC;IAED;;;;OAIG;IACI,IAAI,CAAC,KAAiB;QACzB,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;IACtE,CAAC;IAED;;;OAGG;IACI,MAAM;QACT,OAAO,GAAG,GAAG,IAAI,CAAC,KAAK,GAAG,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IACvG,CAAC;CACJ;AAnDD,gCAmDC","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 BlockIndex defines a block index in a pointcloud file.\n *\n * @version 1.0 January 2014\n */\n/** @internal */\nexport class BlockIndex {\n /** The level */\n public level: int32;\n /** The unique key of the block */\n public key: string;\n /** The index of the block in the level */\n public index: int32;\n /** The grid index */\n public gridIndex: GridIndex;\n /** The index of the first tile in the block (derived) */\n public tileIndex: int32;\n /** The tile count */\n public tileCount: int32;\n /** The index of the first point in the block (derived) */\n public pointIndex: ALong;\n /** The point count */\n public pointCount: ALong;\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, tileIndex: int32, tileCount: int32, pointIndex: ALong, pointCount: ALong) {\n this.level = level;\n this.index = index;\n this.gridIndex = gridIndex;\n this.tileIndex = tileIndex;\n this.tileCount = tileCount;\n this.pointIndex = pointIndex;\n this.pointCount = pointCount;\n this.accessTime = 0.0;\n this.key = (\"L\" + this.level + \",B:\" + 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: BlockIndex): boolean {\n return (other.level == this.level) && (other.index == this.index);\n }\n\n /**\n * Get the unique key of the block in the pointcloud file.\n * @return the unique key (combines level and grid index).\n */\n public getKey(): string {\n return \"B\" + this.level + \"/\" + this.gridIndex.x + \"/\" + this.gridIndex.y + \"/\" + this.gridIndex.z;\n }\n}\n"]}
|
|
@@ -21,6 +21,28 @@ const PointAttribute_1 = require("./PointAttribute");
|
|
|
21
21
|
*/
|
|
22
22
|
/** @internal */
|
|
23
23
|
class CloudPoint {
|
|
24
|
+
/** The name of this module */
|
|
25
|
+
static MODULE = "CloudPoint";
|
|
26
|
+
/** The index */
|
|
27
|
+
_index;
|
|
28
|
+
/** The x position */
|
|
29
|
+
_x;
|
|
30
|
+
/** The y position */
|
|
31
|
+
_y;
|
|
32
|
+
/** The z position */
|
|
33
|
+
_z;
|
|
34
|
+
/** The ARGB color */
|
|
35
|
+
_color;
|
|
36
|
+
/** The intensity */
|
|
37
|
+
_intensity;
|
|
38
|
+
/** The weight */
|
|
39
|
+
_weight;
|
|
40
|
+
/** Has the point been selected? */
|
|
41
|
+
_selected;
|
|
42
|
+
/** The definitions of the extra attributes */
|
|
43
|
+
_attributes;
|
|
44
|
+
/** The values of the extra attributes */
|
|
45
|
+
_values;
|
|
24
46
|
/**
|
|
25
47
|
* Create a new point.
|
|
26
48
|
*/
|
|
@@ -314,6 +336,4 @@ class CloudPoint {
|
|
|
314
336
|
}
|
|
315
337
|
}
|
|
316
338
|
exports.CloudPoint = CloudPoint;
|
|
317
|
-
/** The name of this module */
|
|
318
|
-
CloudPoint.MODULE = "CloudPoint";
|
|
319
339
|
//# sourceMappingURL=CloudPoint.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloudPoint.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/CloudPoint.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAUH,8DAA2D;AAC3D,sDAAmD;AACnD,0DAAuD;AACvD,0DAAuD;AACvD,qDAAkD;AAClD,qDAAkD;AAElD;;;;GAIG;AACH,gBAAgB;AAChB,MAAa,UAAU;IA0BnB;;OAEG;IACH;QACI,IAAI,CAAC,MAAM,GAAG,aAAK,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC;QACd,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC;QACd,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC;QACd,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,OAAO,GAAG,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,EAAE;gBAAE,iBAAO,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,GAAG,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IACtM,CAAC;;AAxVL,gCAyVC;AAxVG,8BAA8B;AACN,iBAAM,GAAW,YAAY,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 { Coordinate } from \"../../spatial/geom/Coordinate\";\nimport { ALong } from \"../../system/runtime/ALong\";\nimport { Message } from \"../../system/runtime/Message\";\nimport { Numbers } from \"../../system/runtime/Numbers\";\nimport { AttributeValue } from \"./AttributeValue\";\nimport { PointAttribute } from \"./PointAttribute\";\n\n/**\n * Class CloudPoint defines a point in the point cloud.\n *\n * @version 1.0 November 2011\n */\n/** @internal */\nexport class CloudPoint {\n /** The name of this module */\n private static readonly MODULE: string = \"CloudPoint\";\n\n /** The index */\n private _index: ALong;\n /** The x position */\n private _x: float64;\n /** The y position */\n private _y: float64;\n /** The z position */\n private _z: float64;\n /** The ARGB color */\n private _color: int32;\n /** The intensity */\n private _intensity: int32;\n /** The weight */\n private _weight: int32;\n /** Has the point been selected? */\n private _selected: boolean;\n\n /** The definitions of the extra attributes */\n private _attributes: Array<PointAttribute>;\n /** The values of the extra attributes */\n private _values: Array<AttributeValue>;\n\n /**\n * Create a new point.\n */\n public constructor() {\n this._index = ALong.ZERO;\n this._x = 0.0;\n this._y = 0.0;\n this._z = 0.0;\n this._color = 0;\n this._intensity = 0;\n this._weight = 0;\n this._selected = false;\n this._attributes = null;\n this._values = null;\n }\n\n /**\n * Create a new point.\n * @param index the index of the point.\n * @param x the x position.\n * @param y the y position.\n * @param z the z position.\n * @param color the ARGB color.\n * @param intensity the intensity.\n * @return the new point.\n */\n public static create(index: ALong, x: float64, y: float64, z: float64, color: int32, intensity: int32): CloudPoint {\n let point: CloudPoint = new CloudPoint();\n point._index = index;\n point._x = x;\n point._y = y;\n point._z = z;\n point._color = color;\n point._intensity = intensity;\n return point;\n }\n\n /**\n * Create a new point.\n * @param attributes the definitions of the attributes.\n * @return the new point.\n */\n public static createWithAttributes(attributes: Array<PointAttribute>): CloudPoint {\n let point: CloudPoint = new CloudPoint();\n point._attributes = attributes;\n if (attributes != null) {\n point._values = new Array<AttributeValue>(attributes.length);\n for (let i: number = 0; i < attributes.length; i++) point._values[i] = new AttributeValue();\n }\n return point;\n }\n\n /**\n * Clear the point.\n */\n public clear(): void {\n this._index = ALong.ZERO;\n this._x = 0.0;\n this._y = 0.0;\n this._z = 0.0;\n this._color = 0;\n this._intensity = 0;\n this._weight = 0;\n this._selected = false;\n }\n\n /**\n * Get the index.\n * @return the index.\n */\n public getIndex(): ALong {\n return this._index;\n }\n\n /**\n * Set the index.\n * @param index the index.\n */\n public setIndex(index: ALong): void {\n this._index = index;\n }\n\n /**\n * Get the x position.\n * @return the x position.\n */\n public getX(): float64 {\n return this._x;\n }\n\n /**\n * Set the x position.\n * @param x the new x position.\n */\n public setX(x: float64): void {\n this._x = x;\n }\n\n /**\n * Get the y position.\n * @return the y position.\n */\n public getY(): float64 {\n return this._y;\n }\n\n /**\n * Set the y position.\n * @param y the new y position.\n */\n public setY(y: float64): void {\n this._y = y;\n }\n\n /**\n * Get the z position.\n * @return the z position.\n */\n public getZ(): float64 {\n return this._z;\n }\n\n /**\n * Set the z position.\n * @param z the new z position.\n */\n public setZ(z: float64): void {\n this._z = z;\n }\n\n /**\n * Get the ARGB color.\n * @return the color.\n */\n public getColor(): int32 {\n return this._color;\n }\n\n /**\n * Set the color.\n * @param color the new color.\n */\n public setColor(color: int32): void {\n this._color = color;\n }\n\n /**\n * Get the intensity.\n * @return the intensity.\n */\n public getIntensity(): int32 {\n return this._intensity;\n }\n\n /**\n * Set the intensity.\n * @param intensity the new intensity.\n */\n public setIntensity(intensity: int32): void {\n this._intensity = intensity;\n }\n\n /**\n * Get the weight.\n * @return the weight.\n */\n public getWeight(): int32 {\n return this._weight;\n }\n\n /**\n * Set the weight.\n * @param weight the weight.\n */\n public setWeight(weight: int32): void {\n this._weight = weight;\n }\n\n /**\n * Has the point been selected?\n * @return true if selected.\n */\n public isSelected(): boolean {\n return this._selected;\n }\n\n /**\n * Select the point.\n * @param selected true if the point has been selected.\n */\n public setSelected(selected: boolean): void {\n this._selected = selected;\n }\n\n /**\n * Get the attribute definitions.\n * @return the attribute definitions.\n */\n public getAttributes(): Array<PointAttribute> {\n return this._attributes;\n }\n\n /**\n * Get an attribute definitions.\n * @param index the index of the attribute.\n * @return an attribute definitions.\n */\n public getAttribute(index: int32): PointAttribute {\n return this._attributes[index];\n }\n\n /**\n * Get the attribute values.\n * @return the attribute values.\n */\n public getAttributeValues(): Array<AttributeValue> {\n return this._values;\n }\n\n /**\n * Get an attribute value.\n * @param index the index of the value.\n * @return the value.\n */\n public getAttributeValue(index: int32): AttributeValue {\n return this._values[index];\n }\n\n /**\n * Get an attribute value.\n * @param attributeName the name of the attribute.\n * @return the value.\n */\n public getNamedAttributeValue(attributeName: string): AttributeValue {\n let index: int32 = PointAttribute.indexOfName(this._attributes, attributeName);\n return (index < 0) ? (null) : this._values[index];\n }\n\n /**\n * Set the attributes.\n * @param attributes the definitions of the attributes.\n * @param values the values of the attributes.\n */\n public setAttributes(attributes: Array<PointAttribute>, values: Array<AttributeValue>): void {\n this._attributes = attributes;\n this._values = values;\n }\n\n /**\n * Copy the values to another point.\n * @param other the other point.\n */\n public copyTo(other: CloudPoint): void {\n other._index = this._index;\n other._x = this._x;\n other._y = this._y;\n other._z = this._z;\n other._color = this._color;\n other._intensity = this._intensity;\n other._weight = this._weight;\n other._selected = this._selected;\n other._attributes = this._attributes;\n other._values = AttributeValue.copyList(this._values);\n }\n\n /**\n * Make a copy.\n * @return a copy.\n */\n public copy(): CloudPoint {\n let copy: CloudPoint = new CloudPoint();\n this.copyTo(copy);\n return copy;\n }\n\n /**\n * Get the distance to another point.\n * @param other the other point.\n * @return the distance.\n */\n public getDistance(other: CloudPoint): float64 {\n let dx: float64 = (other._x - this._x);\n let dy: float64 = (other._y - this._y);\n let dz: float64 = (other._z - this._z);\n return Math.sqrt(dx * dx + dy * dy + dz * dz);\n }\n\n /**\n * Get the square distance to another point.\n * @param other the other point.\n * @return the square distance.\n */\n public getSquareDistance(other: CloudPoint): float64 {\n let dx: float64 = (other._x - this._x);\n let dy: float64 = (other._y - this._y);\n let dz: float64 = (other._z - this._z);\n return (dx * dx + dy * dy + dz * dz);\n }\n\n /**\n * Get a coordinate.\n * @return a coordinate.\n */\n public getCoordinate(): Coordinate {\n return new Coordinate(this._x, this._y, this._z);\n }\n\n /**\n * Print the point.\n */\n public print(): void {\n Message.print(CloudPoint.MODULE, \"Index: \" + this._index);\n Message.print(CloudPoint.MODULE, \"Position: \" + this._x + \",\" + this._y + \",\" + this._z);\n Message.print(CloudPoint.MODULE, \"Color: \" + Numbers.rgbToString(this._color));\n Message.print(CloudPoint.MODULE, \"Intensity: \" + this._intensity);\n Message.print(CloudPoint.MODULE, \"Weight: \" + this._weight);\n Message.print(CloudPoint.MODULE, \"Selected? \" + this._selected);\n if (this._attributes != null) for (let i: number = 0; i < this._attributes.length; i++) Message.print(CloudPoint.MODULE, \"Attribute '\" + this._attributes[i].getName() + \"': \" + this._values[i]);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"CloudPoint.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/CloudPoint.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAUH,8DAA2D;AAC3D,sDAAmD;AACnD,0DAAuD;AACvD,0DAAuD;AAC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S,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;QAC1D,iBAAO,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;QACzF,iBAAO,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,EAAE,SAAS,GAAG,iBAAO,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QAC/E,iBAAO,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC;QAClE,iBAAO,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5D,iBAAO,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC;QAChE,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI;YAAE,KAAK,IAAI,CAAC,GAAW,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE;gBAAE,iBAAO,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,GAAG,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IACtM,CAAC;;AAxVL,gCAyVC","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 { Coordinate } from \"../../spatial/geom/Coordinate\";\nimport { ALong } from \"../../system/runtime/ALong\";\nimport { Message } from \"../../system/runtime/Message\";\nimport { Numbers } from \"../../system/runtime/Numbers\";\nimport { AttributeValue } from \"./AttributeValue\";\nimport { PointAttribute } from \"./PointAttribute\";\n\n/**\n * Class CloudPoint defines a point in the point cloud.\n *\n * @version 1.0 November 2011\n */\n/** @internal */\nexport class CloudPoint {\n /** The name of this module */\n private static readonly MODULE: string = \"CloudPoint\";\n\n /** The index */\n private _index: ALong;\n /** The x position */\n private _x: float64;\n /** The y position */\n private _y: float64;\n /** The z position */\n private _z: float64;\n /** The ARGB color */\n private _color: int32;\n /** The intensity */\n private _intensity: int32;\n /** The weight */\n private _weight: int32;\n /** Has the point been selected? */\n private _selected: boolean;\n\n /** The definitions of the extra attributes */\n private _attributes: Array<PointAttribute>;\n /** The values of the extra attributes */\n private _values: Array<AttributeValue>;\n\n /**\n * Create a new point.\n */\n public constructor() {\n this._index = ALong.ZERO;\n this._x = 0.0;\n this._y = 0.0;\n this._z = 0.0;\n this._color = 0;\n this._intensity = 0;\n this._weight = 0;\n this._selected = false;\n this._attributes = null;\n this._values = null;\n }\n\n /**\n * Create a new point.\n * @param index the index of the point.\n * @param x the x position.\n * @param y the y position.\n * @param z the z position.\n * @param color the ARGB color.\n * @param intensity the intensity.\n * @return the new point.\n */\n public static create(index: ALong, x: float64, y: float64, z: float64, color: int32, intensity: int32): CloudPoint {\n let point: CloudPoint = new CloudPoint();\n point._index = index;\n point._x = x;\n point._y = y;\n point._z = z;\n point._color = color;\n point._intensity = intensity;\n return point;\n }\n\n /**\n * Create a new point.\n * @param attributes the definitions of the attributes.\n * @return the new point.\n */\n public static createWithAttributes(attributes: Array<PointAttribute>): CloudPoint {\n let point: CloudPoint = new CloudPoint();\n point._attributes = attributes;\n if (attributes != null) {\n point._values = new Array<AttributeValue>(attributes.length);\n for (let i: number = 0; i < attributes.length; i++) point._values[i] = new AttributeValue();\n }\n return point;\n }\n\n /**\n * Clear the point.\n */\n public clear(): void {\n this._index = ALong.ZERO;\n this._x = 0.0;\n this._y = 0.0;\n this._z = 0.0;\n this._color = 0;\n this._intensity = 0;\n this._weight = 0;\n this._selected = false;\n }\n\n /**\n * Get the index.\n * @return the index.\n */\n public getIndex(): ALong {\n return this._index;\n }\n\n /**\n * Set the index.\n * @param index the index.\n */\n public setIndex(index: ALong): void {\n this._index = index;\n }\n\n /**\n * Get the x position.\n * @return the x position.\n */\n public getX(): float64 {\n return this._x;\n }\n\n /**\n * Set the x position.\n * @param x the new x position.\n */\n public setX(x: float64): void {\n this._x = x;\n }\n\n /**\n * Get the y position.\n * @return the y position.\n */\n public getY(): float64 {\n return this._y;\n }\n\n /**\n * Set the y position.\n * @param y the new y position.\n */\n public setY(y: float64): void {\n this._y = y;\n }\n\n /**\n * Get the z position.\n * @return the z position.\n */\n public getZ(): float64 {\n return this._z;\n }\n\n /**\n * Set the z position.\n * @param z the new z position.\n */\n public setZ(z: float64): void {\n this._z = z;\n }\n\n /**\n * Get the ARGB color.\n * @return the color.\n */\n public getColor(): int32 {\n return this._color;\n }\n\n /**\n * Set the color.\n * @param color the new color.\n */\n public setColor(color: int32): void {\n this._color = color;\n }\n\n /**\n * Get the intensity.\n * @return the intensity.\n */\n public getIntensity(): int32 {\n return this._intensity;\n }\n\n /**\n * Set the intensity.\n * @param intensity the new intensity.\n */\n public setIntensity(intensity: int32): void {\n this._intensity = intensity;\n }\n\n /**\n * Get the weight.\n * @return the weight.\n */\n public getWeight(): int32 {\n return this._weight;\n }\n\n /**\n * Set the weight.\n * @param weight the weight.\n */\n public setWeight(weight: int32): void {\n this._weight = weight;\n }\n\n /**\n * Has the point been selected?\n * @return true if selected.\n */\n public isSelected(): boolean {\n return this._selected;\n }\n\n /**\n * Select the point.\n * @param selected true if the point has been selected.\n */\n public setSelected(selected: boolean): void {\n this._selected = selected;\n }\n\n /**\n * Get the attribute definitions.\n * @return the attribute definitions.\n */\n public getAttributes(): Array<PointAttribute> {\n return this._attributes;\n }\n\n /**\n * Get an attribute definitions.\n * @param index the index of the attribute.\n * @return an attribute definitions.\n */\n public getAttribute(index: int32): PointAttribute {\n return this._attributes[index];\n }\n\n /**\n * Get the attribute values.\n * @return the attribute values.\n */\n public getAttributeValues(): Array<AttributeValue> {\n return this._values;\n }\n\n /**\n * Get an attribute value.\n * @param index the index of the value.\n * @return the value.\n */\n public getAttributeValue(index: int32): AttributeValue {\n return this._values[index];\n }\n\n /**\n * Get an attribute value.\n * @param attributeName the name of the attribute.\n * @return the value.\n */\n public getNamedAttributeValue(attributeName: string): AttributeValue {\n let index: int32 = PointAttribute.indexOfName(this._attributes, attributeName);\n return (index < 0) ? (null) : this._values[index];\n }\n\n /**\n * Set the attributes.\n * @param attributes the definitions of the attributes.\n * @param values the values of the attributes.\n */\n public setAttributes(attributes: Array<PointAttribute>, values: Array<AttributeValue>): void {\n this._attributes = attributes;\n this._values = values;\n }\n\n /**\n * Copy the values to another point.\n * @param other the other point.\n */\n public copyTo(other: CloudPoint): void {\n other._index = this._index;\n other._x = this._x;\n other._y = this._y;\n other._z = this._z;\n other._color = this._color;\n other._intensity = this._intensity;\n other._weight = this._weight;\n other._selected = this._selected;\n other._attributes = this._attributes;\n other._values = AttributeValue.copyList(this._values);\n }\n\n /**\n * Make a copy.\n * @return a copy.\n */\n public copy(): CloudPoint {\n let copy: CloudPoint = new CloudPoint();\n this.copyTo(copy);\n return copy;\n }\n\n /**\n * Get the distance to another point.\n * @param other the other point.\n * @return the distance.\n */\n public getDistance(other: CloudPoint): float64 {\n let dx: float64 = (other._x - this._x);\n let dy: float64 = (other._y - this._y);\n let dz: float64 = (other._z - this._z);\n return Math.sqrt(dx * dx + dy * dy + dz * dz);\n }\n\n /**\n * Get the square distance to another point.\n * @param other the other point.\n * @return the square distance.\n */\n public getSquareDistance(other: CloudPoint): float64 {\n let dx: float64 = (other._x - this._x);\n let dy: float64 = (other._y - this._y);\n let dz: float64 = (other._z - this._z);\n return (dx * dx + dy * dy + dz * dz);\n }\n\n /**\n * Get a coordinate.\n * @return a coordinate.\n */\n public getCoordinate(): Coordinate {\n return new Coordinate(this._x, this._y, this._z);\n }\n\n /**\n * Print the point.\n */\n public print(): void {\n Message.print(CloudPoint.MODULE, \"Index: \" + this._index);\n Message.print(CloudPoint.MODULE, \"Position: \" + this._x + \",\" + this._y + \",\" + this._z);\n Message.print(CloudPoint.MODULE, \"Color: \" + Numbers.rgbToString(this._color));\n Message.print(CloudPoint.MODULE, \"Intensity: \" + this._intensity);\n Message.print(CloudPoint.MODULE, \"Weight: \" + this._weight);\n Message.print(CloudPoint.MODULE, \"Selected? \" + this._selected);\n if (this._attributes != null) for (let i: number = 0; i < this._attributes.length; i++) Message.print(CloudPoint.MODULE, \"Attribute '\" + this._attributes[i].getName() + \"': \" + this._values[i]);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/Grid.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAUH,sDAAmD;AACnD,8DAA2D;AAC3D,0DAAuD;AACvD,2CAAwC;AAExC;;;;GAIG;AACH,gBAAgB;AAChB,MAAa,IAAI;
|
|
1
|
+
{"version":3,"file":"Grid.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/Grid.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAUH,sDAAmD;AACnD,8DAA2D;AAC3D,0DAAuD;AACvD,2CAAwC;AAExC;;;;GAIG;AACH,gBAAgB;AAChB,MAAa,IAAI;IACb,mBAAmB;IACZ,EAAE,CAAa;IACtB,sBAAsB;IACf,IAAI,CAAa;IAExB;;;;;;;;OAQG;IACH,YAAmB,EAAc,EAAE,IAAgB;QAC/C,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;IAED;;;;OA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C,GAAG,GAAG,CAAC;IACxJ,CAAC;CACJ;AA1HD,oBA0HC","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 { Coordinate } from \"../../spatial/geom/Coordinate\";\nimport { Numbers } from \"../../system/runtime/Numbers\";\nimport { GridIndex } from \"./GridIndex\";\n\n/**\n * Class Grid defines an infinite 3D grid of cells.\n *\n * @version 1.0 January 2012\n */\n/** @internal */\nexport class Grid {\n /** The x origin */\n public p0: Coordinate;\n /** The cell X size */\n public size: Coordinate;\n\n /**\n * Create a new grid.\n * @param x0 the x origin.\n * @param y0 the y origin.\n * @param z0 the z origin.\n * @param sizeX the cell X size.\n * @param sizeY the cell Y size.\n * @param sizeZ the cell Z size.\n */\n public constructor(p0: Coordinate, size: Coordinate) {\n this.p0 = p0;\n this.size = size;\n }\n\n /**\n * Get the cell index of an X position.\n * @param x the x position.\n * @return the cell index.\n */\n public getCellX(x: float64): float64 {\n return (x - this.p0.x) / this.size.x;\n }\n\n /**\n * Get the cell index of a Y position.\n * @param y the y position.\n * @return the cell index.\n */\n public getCellY(y: float64): float64 {\n return (y - this.p0.y) / this.size.y;\n }\n\n /**\n * Get the cell index of a Z position.\n * @param z the z position.\n * @return the cell index.\n */\n public getCellZ(z: float64): float64 {\n return (z - this.p0.z) / this.size.z;\n }\n\n /**\n * Get the cell index of a position.\n * @param position the position.\n * @param cellIndex the cell index.\n */\n public getCellIndexTo(position: Coordinate, cellIndex: GridIndex): GridIndex {\n cellIndex.x = Numbers.intFloor((position.x - this.p0.x) / this.size.x);\n cellIndex.y = Numbers.intFloor((position.y - this.p0.y) / this.size.y);\n cellIndex.z = Numbers.intFloor((position.z - this.p0.z) / this.size.z);\n return cellIndex;\n }\n\n /**\n * Get the cell index of a position.\n * @param position the position.\n * @return the cell index.\n */\n public getCellIndex(position: Coordinate): GridIndex {\n return this.getCellIndexTo(position, new GridIndex(0, 0, 0));\n }\n\n /**\n * Get the center point of a cell.\n * @param cellIndex the index of the cell.\n * @return the center point.\n */\n public getCellCenter(cellIndex: GridIndex): Coordinate {\n let cx: float64 = this.p0.x + (cellIndex.x + 0.5) * this.size.x;\n let cy: float64 = this.p0.y + (cellIndex.y + 0.5) * this.size.y;\n let cz: float64 = this.p0.z + (cellIndex.z + 0.5) * this.size.z;\n return new Coordinate(cx, cy, cz);\n }\n\n /**\n * Get the bounds of a cell.\n * @param cellIndex the index of the cell.\n * @return the bounds.\n */\n public getCellBounds(cellIndex: GridIndex): Bounds {\n let x0: float64 = this.p0.x + (cellIndex.x) * this.size.x;\n let y0: float64 = this.p0.y + (cellIndex.y) * this.size.y;\n let z0: float64 = this.p0.z + (cellIndex.z) * this.size.z;\n let bounds: Bounds = new Bounds();\n bounds.addXYZ(x0, y0, z0);\n bounds.addXYZ(x0 + this.size.x, y0 + this.size.y, z0 + this.size.z);\n return bounds;\n }\n\n /**\n * Scale the grid.\n * @param scale the scale factor.\n * @return the scaled grid.\n */\n public scale(scale: float64): Grid {\n return new Grid(new Coordinate(this.p0.x, this.p0.y, this.p0.z), new Coordinate(scale * this.size.x, scale * this.size.y, scale * this.size.z));\n }\n\n /**\n * Move the grid.\n * @param dx the x offset.\n * @param dy the y offset.\n * @param dz the z offset.\n * @return the scaled grid.\n */\n public scale3(dx: float64, dy: float64, dz: float64): Grid {\n return new Grid(new Coordinate(this.p0.x + dx, this.p0.y + dy, this.p0.z + dz), new Coordinate(this.size.x, this.size.y, this.size.z));\n }\n\n /**\n * The standard toString method.\n * @see Object#toString\n */\n public toString(): string {\n return \"[Grid:x0=\" + this.p0.x + \",y0=\" + this.p0.y + \",z0=\" + this.p0.z + \",sx=\" + this.size.x + \",sy=\" + this.size.y + \",sz=\" + this.size.z + \"]\";\n }\n}\n"]}
|
|
@@ -11,6 +11,12 @@ exports.GridIndex = void 0;
|
|
|
11
11
|
const Numbers_1 = require("../../system/runtime/Numbers");
|
|
12
12
|
/** @internal */
|
|
13
13
|
class GridIndex {
|
|
14
|
+
/** The x index */
|
|
15
|
+
x;
|
|
16
|
+
/** The y index */
|
|
17
|
+
y;
|
|
18
|
+
/** The z index */
|
|
19
|
+
z;
|
|
14
20
|
/**
|
|
15
21
|
* Create a new point.
|
|
16
22
|
* @param x the x index.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GridIndex.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/GridIndex.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAUH,0DAAuD;AAEvD,gBAAgB;AAChB,MAAa,SAAS;
|
|
1
|
+
{"version":3,"file":"GridIndex.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/GridIndex.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAUH,0DAAuD;AAEvD,gBAAgB;AAChB,MAAa,SAAS;IAClB,kBAAkB;IACX,CAAC,CAAQ;IAChB,kBAAkB;IACX,CAAC,CAAQ;IAChB,kBAAkB;IACX,CAAC,CAAQ;IAEhB;;;;;OAKG;IACH,YAAmB,CAAQ,EAAE,CAAQ,EAAE,CAAQ;QAC3C,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACf,CAAC;IAED;;;;OAIG;IACI,UAAU,CAAC,KAAgB;QAC9B,IAAI,EAAE,GAAU,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACnC,IAAI,EAAE,GAAU,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC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AAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IACjD,CAAC;IAED;;;OAGG;IACI,MAAM;QACT,OAAO,KAAK,GAAG,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC;IAClE,CAAC;IAED;;;OAGG;IACI,QAAQ;QACX,OAAO,eAAe,GAAG,IAAI,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC;IACxE,CAAC;CACJ;AA7FD,8BA6FC","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 { Numbers } from \"../../system/runtime/Numbers\";\n\n/** @internal */\nexport class GridIndex {\n /** The x index */\n public x: int32;\n /** The y index */\n public y: int32;\n /** The z index */\n public z: int32;\n\n /**\n * Create a new point.\n * @param x the x index.\n * @param y the y index.\n * @param z the z index.\n */\n public constructor(x: int32, y: int32, z: int32) {\n this.x = x;\n this.y = y;\n this.z = z;\n }\n\n /**\n * Get the square distance to another cell.\n * @param other the other cell.\n * @return the square distance.\n */\n public distanceSq(other: GridIndex): int32 {\n let dx: int32 = (other.x - this.x);\n let dy: int32 = (other.y - this.y);\n let dz: int32 = (other.z - this.z);\n return (dx * dx) + (dy * dy) + (dz * dz);\n }\n\n /**\n * Get the distance to another cell.\n * @param other the other cell.\n * @return the distance.\n */\n public distance(other: GridIndex): float64 {\n return Numbers.sqrt(this.distanceSq(other));\n }\n\n /**\n * Get a next-level index.\n * @param index the index at the current level.\n * @return the next-level index.\n */\n private static getNextLevelIndex1(index: int32): int32 {\n if (index < 0) return Numbers.divInt(index - 1, 2);\n return Numbers.divInt(index, 2);\n }\n\n /**\n * Get a next-level index.\n * @param nextLevel the index at the next level.\n */\n public getNextLevelIndex(nextLevel: GridIndex): void {\n nextLevel.x = GridIndex.getNextLevelIndex1(this.x);\n nextLevel.y = GridIndex.getNextLevelIndex1(this.y);\n nextLevel.z = GridIndex.getNextLevelIndex1(this.z);\n }\n\n /**\n * Does this point equal another?\n * @param other the other point.\n * @return true if equal.\n */\n public same(other: GridIndex): boolean {\n return (other.x == this.x && other.y == this.y && other.z == this.z);\n }\n\n /**\n * Create a copy.\n * @return a copy.\n */\n public copy(): GridIndex {\n return new GridIndex(this.x, this.y, this.z);\n }\n\n /**\n * Get the unique key.\n * @return the unique key.\n */\n public getKey(): string {\n return \"{x:\" + this.x + \",y:\" + this.y + \",z:\" + this.z + \"}\";\n }\n\n /**\n * The standard toString method.\n * @see Object#toString\n */\n public toString(): string {\n return \"[GridPoint3D:\" + this.x + \",\" + this.y + \",\" + this.z + \"]\";\n }\n}\n"]}
|
|
@@ -20,6 +20,20 @@ const AttributeValue_1 = require("./AttributeValue");
|
|
|
20
20
|
*/
|
|
21
21
|
/** @internal */
|
|
22
22
|
class PointAttribute {
|
|
23
|
+
/** The name of the attribute */
|
|
24
|
+
_name;
|
|
25
|
+
/** The description of the attribute */
|
|
26
|
+
_description;
|
|
27
|
+
/** The type of the attribute */
|
|
28
|
+
_type;
|
|
29
|
+
/** The default value of the attribute */
|
|
30
|
+
_defaultValue;
|
|
31
|
+
/** The optional minimum value of the attribute */
|
|
32
|
+
_minValue;
|
|
33
|
+
/** The optional maximum value of the attribute */
|
|
34
|
+
_maxValue;
|
|
35
|
+
/** Is this a standard attribute? (color/intensity/weight)? */
|
|
36
|
+
_standardAttribute;
|
|
23
37
|
/**
|
|
24
38
|
* Create a new point attribute.
|
|
25
39
|
* @param name the name of the attribute.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version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,KAAK,IAAI,CAAC,GAAW,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE;YAAE,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC;gBAAE,OAAO,CAAC,CAAC;QAC3G,OAAO,CAAC,CAAC,CAAC;IACd,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,WAAW,CAAC,UAAiC,EAAE,SAAyB;QAClF,IAAI,UAAU,IAAI,IAAI;YAAE,OAAO,CAAC,CAAC,CAAC;QAClC,IAAI,SAAS,IAAI,IAAI;YAAE,OAAO,CAAC,CAAC,CAAC;QACjC,KAAK,IAAI,CAAC,GAAW,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE;YAAE,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;gBAAE,OAAO,CAAC,CAAC;QACjH,OAAO,CAAC,CAAC,CAAC;IACd,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,oBAAoB,CAAC,UAAiC,EAAE,aAAqB;QACvF,OAAO,CAAC,cAAc,CAAC,eAAe,CAAC,UAAU,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,gBAAgB,CAAC,UAAiC,EAAE,SAAyB;QACvF,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,UAAU,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IACpE,CAAC;CACJ;AAtVD,wCAsVC","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 { AList } from \"../../system/collection/AList\";\nimport { ALong } from \"../../system/runtime/ALong\";\nimport { ASystem } from \"../../system/runtime/ASystem\";\nimport { Strings } from \"../../system/runtime/Strings\";\nimport { AttributeTypes } from \"./AttributeTypes\";\nimport { AttributeValue } from \"./AttributeValue\";\n\n/**\n * Class PointAttribute defines an attribute of a point.\n *\n * @version 1.0 August 2013\n */\n/** @internal */\nexport class PointAttribute {\n /** The name of the attribute */\n private _name: string;\n /** The description of the attribute */\n private _description: string;\n /** The type of the attribute */\n private _type: int32;\n /** The default value of the attribute */\n private _defaultValue: AttributeValue;\n /** The optional minimum value of the attribute */\n private _minValue: AttributeValue;\n /** The optional maximum value of the attribute */\n private _maxValue: AttributeValue;\n\n /** Is this a standard attribute? (color/intensity/weight)? */\n private _standardAttribute: boolean;\n\n /**\n * Create a new point attribute.\n * @param name the name of the attribute.\n * @param description the description of the attribute.\n * @param type the type of the attribute.\n * @param default value the default value of the attribute (use null to create a default value).\n */\n public constructor(name: string, description: string, type: int32, defaultValue: AttributeValue) {\n if (defaultValue == null) defaultValue = AttributeValue.createDefault(type);\n ASystem.assert0(defaultValue.getType() == type, \"Default value \" + defaultValue + \" does not match attribute type \" + type);\n this._name = name;\n this._description = description;\n this._type = type;\n this._defaultValue = defaultValue;\n this._minValue = null;\n this._maxValue = null;\n this._standardAttribute = false;\n }\n\n /**\n * Get the name.\n * @return the name.\n */\n public getName(): string {\n return this._name;\n }\n\n /**\n * Set the name.\n * @param name the new name.\n */\n public setName(name: string): void {\n this._name = name;\n }\n\n /**\n * Check the name.\n * @param name the name to check.\n * @return true if equal.\n */\n public hasName(name: string): boolean {\n if (name == null) return false;\n if (Strings.equalsIgnoreCase(name, this._name)) return true;\n return false;\n }\n\n /**\n * Get the description.\n * @return the description.\n */\n public getDescription(): string {\n return this._description;\n }\n\n /**\n * Get the type.\n * @return the type.\n */\n public getType(): int32 {\n return this._type;\n }\n\n /**\n * Get the byte-size of the type.\n * @return the byte-size of the type.\n */\n public getTypeByteSize(): int32 {\n return PointAttribute.getByteSize(this._type, 1);\n }\n\n /**\n * Get the byte-size of a number of values.\n * @param attributeCount the number of values.\n * @return the byte-size.\n */\n public getTypeByteSizeForCount(attributeCount: int32): int32 {\n return PointAttribute.getByteSize(this._type, attributeCount);\n }\n\n /**\n * Get the byte-size of a number of values.\n * @param attributeCount the number of values.\n * @return the byte-size.\n */\n public getTypeByteSizeForLongCount(attributeCount: ALong): ALong {\n return PointAttribute.getByteSizeForCount(this._type, attributeCount);\n }\n\n /**\n * Get the default value.\n * @return the default value.\n */\n public getDefaultValue(): AttributeValue {\n return this._defaultValue;\n }\n\n /**\n * Get the optional minimum value.\n * @return the optional minimum value.\n */\n public getMinValue(): AttributeValue {\n return this._minValue;\n }\n\n /**\n * Set the optional minimum value.\n * @param value the optional minimum value.\n */\n public setMinValue(value: AttributeValue): void {\n this._minValue = value;\n }\n\n /**\n * Get the optional maximum value.\n * @return the optional maximum value.\n */\n public getMaxValue(): AttributeValue {\n return this._maxValue;\n }\n\n /**\n * Set the optional maximum value.\n * @param value the optional maximum value.\n */\n public setMaxValue(value: AttributeValue): void {\n this._maxValue = value;\n }\n\n /**\n * Set the description of a copy.\n * @param description the new description.\n * @return the copy.\n */\n public setDescription(description: string): PointAttribute {\n return new PointAttribute(this._name, description, this._type, this._defaultValue);\n }\n\n /**\n * Is this a standard attribute (like color/intensity/weight)?\n * @return true for a standard attribute.\n */\n public isStandardAttribute(): boolean {\n return this._standardAttribute;\n }\n\n /**\n * Make this a standard attribute (like color/intensity/weight).\n * @param standard true if this is a standard attribute.\n * @return this attribute for convenience.\n */\n public setStandardAttribute(standard: boolean): PointAttribute {\n this._standardAttribute = standard;\n return this;\n }\n\n /**\n * The standard toString method.\n * @see Object#toString\n */\n public toString(): string {\n return \"[PointAttribute:name='\" + this._name + \"',type=\" + PointAttribute.getTypeName(this._type) + \",default=\" + this._defaultValue + \"]\";\n }\n\n /**\n * Get the name of a type.\n * @param attributeType the type of attributes.\n * @return the name.\n */\n public static getTypeName(attributeType: int32): string {\n if (attributeType <= 0) return \"none\";\n if (attributeType == AttributeTypes.TYPE_BOOLEAN) return \"boolean\";\n if (attributeType == AttributeTypes.TYPE_INT1) return \"int1\";\n if (attributeType == AttributeTypes.TYPE_INT2) return \"int2\";\n if (attributeType == AttributeTypes.TYPE_INT4) return \"int4\";\n if (attributeType == AttributeTypes.TYPE_INT8) return \"int8\";\n if (attributeType == AttributeTypes.TYPE_FLOAT4) return \"float4\";\n if (attributeType == AttributeTypes.TYPE_FLOAT8) return \"float8\";\n if (attributeType == AttributeTypes.TYPE_COLOR) return \"color\";\n return \"\" + attributeType;\n }\n\n /**\n * Get the bit size for a type.\n * @param attributeType the type of attributes.\n * @return the number of bits.\n */\n public static getBitSize(attributeType: int32): int32 {\n if (attributeType == AttributeTypes.TYPE_BOOLEAN) return 1;\n if (attributeType == AttributeTypes.TYPE_INT1) return 8;\n if (attributeType == AttributeTypes.TYPE_INT2) return 16;\n if (attributeType == AttributeTypes.TYPE_INT4) return 32;\n if (attributeType == AttributeTypes.TYPE_INT8) return 64;\n if (attributeType == AttributeTypes.TYPE_FLOAT4) return 32;\n if (attributeType == AttributeTypes.TYPE_FLOAT8) return 64;\n if (attributeType == AttributeTypes.TYPE_COLOR) return 24;\n return 0;\n }\n\n /**\n * Get the byte size for a number of attributes.\n * @param attributeType the type of attributes.\n * @param attributeCount the number of attributes.\n */\n public static getByteSize(attributeType: int32, attributeCount: int32): int32 {\n if (attributeCount <= 0) return 0;\n if (attributeType == AttributeTypes.TYPE_BOOLEAN) return ((attributeCount - 1) >> 3) + 1;\n if (attributeType == AttributeTypes.TYPE_INT1) return (attributeCount);\n if (attributeType == AttributeTypes.TYPE_INT2) return (attributeCount << 1);\n if (attributeType == AttributeTypes.TYPE_INT4) return (attributeCount << 2);\n if (attributeType == AttributeTypes.TYPE_INT8) return (attributeCount << 3);\n if (attributeType == AttributeTypes.TYPE_FLOAT4) return (attributeCount << 2);\n if (attributeType == AttributeTypes.TYPE_FLOAT8) return (attributeCount << 3);\n if (attributeType == AttributeTypes.TYPE_COLOR) return (attributeCount * 3);\n return 0;\n }\n\n /**\n * Get the byte size for a number of attributes.\n * @param attributeType the type of attributes.\n * @param attributeCount the number of attributes.\n */\n public static getByteSizeForCount(attributeType: int32, attributeCount: ALong): ALong {\n if (attributeCount.isPositive() == false) return ALong.ZERO;\n if (attributeType == AttributeTypes.TYPE_BOOLEAN) return attributeCount.subInt(1).divInt(8).addInt(1);\n if (attributeType == AttributeTypes.TYPE_INT1) return attributeCount.mulInt(1);\n if (attributeType == AttributeTypes.TYPE_INT2) return attributeCount.mulInt(2);\n if (attributeType == AttributeTypes.TYPE_INT4) return attributeCount.mulInt(4);\n if (attributeType == AttributeTypes.TYPE_INT8) return attributeCount.mulInt(8);\n if (attributeType == AttributeTypes.TYPE_FLOAT4) return attributeCount.mulInt(4);\n if (attributeType == AttributeTypes.TYPE_FLOAT8) return attributeCount.mulInt(8);\n if (attributeType == AttributeTypes.TYPE_COLOR) return attributeCount.mulInt(3);\n return ALong.ZERO;\n }\n\n /**\n * Find the index of an attribute.\n * @param attributes the list of attributes.\n * @param attributeName the name of an attribute.\n * @return the index (negative if not found).\n */\n public static indexOfName(attributes: Array<PointAttribute>, attributeName: string): int32 {\n if (attributes == null) return -1;\n if (attributeName == null) return -1;\n for (let i: number = 0; i < attributes.length; i++) if (attributes[i].hasName(attributeName)) return i;\n return -1;\n }\n\n /**\n * Find the index of an attribute.\n * @param attributes the list of attributes.\n * @param attribute the definition of an attribute.\n * @return the index (negative if not found).\n */\n public static indexOf(attributes: Array<PointAttribute>, attribute: PointAttribute): int32 {\n if (attributes == null) return -1;\n if (attribute == null) return -1;\n for (let i: number = 0; i < attributes.length; i++) if (attributes[i].hasName(attribute.getName())) return i;\n return -1;\n }\n\n /**\n * Check if an attribute exists.\n * @param attributes the list of attributes.\n * @param attributeName the name of an attribute.\n * @return true if found.\n */\n public static hasAttributeName(attributes: Array<PointAttribute>, attributeName: string): boolean {\n return (PointAttribute.indexOfName(attributes, attributeName) >= 0);\n }\n\n /**\n * Check if an attribute exists.\n * @param attributes the list of attributes.\n * @param attribute the definition of an attribute.\n * @return true if found.\n */\n public static hasAttribute(attributes: Array<PointAttribute>, attribute: PointAttribute): boolean {\n return (PointAttribute.indexOf(attributes, attribute) >= 0);\n }\n\n /**\n * Find the index of an attribute.\n * @param attributes the list of attributes.\n * @param attributeName the name of an attribute.\n * @return the index (negative if not found).\n */\n public static listIndexOfName(attributes: AList<PointAttribute>, attributeName: string): int32 {\n if (attributes == null) return -1;\n if (attributeName == null) return -1;\n for (let i: number = 0; i < attributes.size(); i++) if (attributes.get(i).hasName(attributeName)) return i;\n return -1;\n }\n\n /**\n * Find the index of an attribute.\n * @param attributes the list of attributes.\n * @param attribute the definition of an attribute.\n * @return the index (negative if not found).\n */\n public static listIndexOf(attributes: AList<PointAttribute>, attribute: PointAttribute): int32 {\n if (attributes == null) return -1;\n if (attribute == null) return -1;\n for (let i: number = 0; i < attributes.size(); i++) if (attributes.get(i).hasName(attribute.getName())) return i;\n return -1;\n }\n\n /**\n * Check if an attribute exists.\n * @param attributes the list of attributes.\n * @param attributeName the name of an attribute.\n * @return true if found.\n */\n public static listHasAttributeName(attributes: AList<PointAttribute>, attributeName: string): boolean {\n return (PointAttribute.listIndexOfName(attributes, attributeName) >= 0);\n }\n\n /**\n * Check if an attribute exists.\n * @param attributes the list of attributes.\n * @param attribute the definition of an attribute.\n * @return true if found.\n */\n public static listHasAttribute(attributes: AList<PointAttribute>, attribute: PointAttribute): boolean {\n return (PointAttribute.listIndexOf(attributes, attribute) >= 0);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"PointAttribute.js","sourceRoot":"","sources":["../../../../src/pointcloud/model/PointAttribute.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAWH,sDAAmD;AACnD,0DAAu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AAI;YAAE,OAAO,CAAC,CAAC,CAAC;QAClC,IAAI,aAAa,IAAI,IAAI;YAAE,OAAO,CAAC,CAAC,CAAC;QACrC,KAAK,IAAI,CAAC,GAAW,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE;YAAE,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC;gBAAE,OAAO,CAAC,CAAC;QAC3G,OAAO,CAAC,CAAC,CAAC;IACd,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,WAAW,CAAC,UAAiC,EAAE,SAAyB;QAClF,IAAI,UAAU,IAAI,IAAI;YAAE,OAAO,CAAC,CAAC,CAAC;QAClC,IAAI,SAAS,IAAI,IAAI;YAAE,OAAO,CAAC,CAAC,CAAC;QACjC,KAAK,IAAI,CAAC,GAAW,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE;YAAE,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;gBAAE,OAAO,CAAC,CAAC;QACjH,OAAO,CAAC,CAAC,CAAC;IACd,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,oBAAoB,CAAC,UAAiC,EAAE,aAAqB;QACvF,OAAO,CAAC,cAAc,CAAC,eAAe,CAAC,UAAU,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,gBAAgB,CAAC,UAAiC,EAAE,SAAyB;QACvF,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,UAAU,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IACpE,CAAC;CACJ;AAtVD,wCAsVC","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 { AList } from \"../../system/collection/AList\";\nimport { ALong } from \"../../system/runtime/ALong\";\nimport { ASystem } from \"../../system/runtime/ASystem\";\nimport { Strings } from \"../../system/runtime/Strings\";\nimport { AttributeTypes } from \"./AttributeTypes\";\nimport { AttributeValue } from \"./AttributeValue\";\n\n/**\n * Class PointAttribute defines an attribute of a point.\n *\n * @version 1.0 August 2013\n */\n/** @internal */\nexport class PointAttribute {\n /** The name of the attribute */\n private _name: string;\n /** The description of the attribute */\n private _description: string;\n /** The type of the attribute */\n private _type: int32;\n /** The default value of the attribute */\n private _defaultValue: AttributeValue;\n /** The optional minimum value of the attribute */\n private _minValue: AttributeValue;\n /** The optional maximum value of the attribute */\n private _maxValue: AttributeValue;\n\n /** Is this a standard attribute? (color/intensity/weight)? */\n private _standardAttribute: boolean;\n\n /**\n * Create a new point attribute.\n * @param name the name of the attribute.\n * @param description the description of the attribute.\n * @param type the type of the attribute.\n * @param default value the default value of the attribute (use null to create a default value).\n */\n public constructor(name: string, description: string, type: int32, defaultValue: AttributeValue) {\n if (defaultValue == null) defaultValue = AttributeValue.createDefault(type);\n ASystem.assert0(defaultValue.getType() == type, \"Default value \" + defaultValue + \" does not match attribute type \" + type);\n this._name = name;\n this._description = description;\n this._type = type;\n this._defaultValue = defaultValue;\n this._minValue = null;\n this._maxValue = null;\n this._standardAttribute = false;\n }\n\n /**\n * Get the name.\n * @return the name.\n */\n public getName(): string {\n return this._name;\n }\n\n /**\n * Set the name.\n * @param name the new name.\n */\n public setName(name: string): void {\n this._name = name;\n }\n\n /**\n * Check the name.\n * @param name the name to check.\n * @return true if equal.\n */\n public hasName(name: string): boolean {\n if (name == null) return false;\n if (Strings.equalsIgnoreCase(name, this._name)) return true;\n return false;\n }\n\n /**\n * Get the description.\n * @return the description.\n */\n public getDescription(): string {\n return this._description;\n }\n\n /**\n * Get the type.\n * @return the type.\n */\n public getType(): int32 {\n return this._type;\n }\n\n /**\n * Get the byte-size of the type.\n * @return the byte-size of the type.\n */\n public getTypeByteSize(): int32 {\n return PointAttribute.getByteSize(this._type, 1);\n }\n\n /**\n * Get the byte-size of a number of values.\n * @param attributeCount the number of values.\n * @return the byte-size.\n */\n public getTypeByteSizeForCount(attributeCount: int32): int32 {\n return PointAttribute.getByteSize(this._type, attributeCount);\n }\n\n /**\n * Get the byte-size of a number of values.\n * @param attributeCount the number of values.\n * @return the byte-size.\n */\n public getTypeByteSizeForLongCount(attributeCount: ALong): ALong {\n return PointAttribute.getByteSizeForCount(this._type, attributeCount);\n }\n\n /**\n * Get the default value.\n * @return the default value.\n */\n public getDefaultValue(): AttributeValue {\n return this._defaultValue;\n }\n\n /**\n * Get the optional minimum value.\n * @return the optional minimum value.\n */\n public getMinValue(): AttributeValue {\n return this._minValue;\n }\n\n /**\n * Set the optional minimum value.\n * @param value the optional minimum value.\n */\n public setMinValue(value: AttributeValue): void {\n this._minValue = value;\n }\n\n /**\n * Get the optional maximum value.\n * @return the optional maximum value.\n */\n public getMaxValue(): AttributeValue {\n return this._maxValue;\n }\n\n /**\n * Set the optional maximum value.\n * @param value the optional maximum value.\n */\n public setMaxValue(value: AttributeValue): void {\n this._maxValue = value;\n }\n\n /**\n * Set the description of a copy.\n * @param description the new description.\n * @return the copy.\n */\n public setDescription(description: string): PointAttribute {\n return new PointAttribute(this._name, description, this._type, this._defaultValue);\n }\n\n /**\n * Is this a standard attribute (like color/intensity/weight)?\n * @return true for a standard attribute.\n */\n public isStandardAttribute(): boolean {\n return this._standardAttribute;\n }\n\n /**\n * Make this a standard attribute (like color/intensity/weight).\n * @param standard true if this is a standard attribute.\n * @return this attribute for convenience.\n */\n public setStandardAttribute(standard: boolean): PointAttribute {\n this._standardAttribute = standard;\n return this;\n }\n\n /**\n * The standard toString method.\n * @see Object#toString\n */\n public toString(): string {\n return \"[PointAttribute:name='\" + this._name + \"',type=\" + PointAttribute.getTypeName(this._type) + \",default=\" + this._defaultValue + \"]\";\n }\n\n /**\n * Get the name of a type.\n * @param attributeType the type of attributes.\n * @return the name.\n */\n public static getTypeName(attributeType: int32): string {\n if (attributeType <= 0) return \"none\";\n if (attributeType == AttributeTypes.TYPE_BOOLEAN) return \"boolean\";\n if (attributeType == AttributeTypes.TYPE_INT1) return \"int1\";\n if (attributeType == AttributeTypes.TYPE_INT2) return \"int2\";\n if (attributeType == AttributeTypes.TYPE_INT4) return \"int4\";\n if (attributeType == AttributeTypes.TYPE_INT8) return \"int8\";\n if (attributeType == AttributeTypes.TYPE_FLOAT4) return \"float4\";\n if (attributeType == AttributeTypes.TYPE_FLOAT8) return \"float8\";\n if (attributeType == AttributeTypes.TYPE_COLOR) return \"color\";\n return \"\" + attributeType;\n }\n\n /**\n * Get the bit size for a type.\n * @param attributeType the type of attributes.\n * @return the number of bits.\n */\n public static getBitSize(attributeType: int32): int32 {\n if (attributeType == AttributeTypes.TYPE_BOOLEAN) return 1;\n if (attributeType == AttributeTypes.TYPE_INT1) return 8;\n if (attributeType == AttributeTypes.TYPE_INT2) return 16;\n if (attributeType == AttributeTypes.TYPE_INT4) return 32;\n if (attributeType == AttributeTypes.TYPE_INT8) return 64;\n if (attributeType == AttributeTypes.TYPE_FLOAT4) return 32;\n if (attributeType == AttributeTypes.TYPE_FLOAT8) return 64;\n if (attributeType == AttributeTypes.TYPE_COLOR) return 24;\n return 0;\n }\n\n /**\n * Get the byte size for a number of attributes.\n * @param attributeType the type of attributes.\n * @param attributeCount the number of attributes.\n */\n public static getByteSize(attributeType: int32, attributeCount: int32): int32 {\n if (attributeCount <= 0) return 0;\n if (attributeType == AttributeTypes.TYPE_BOOLEAN) return ((attributeCount - 1) >> 3) + 1;\n if (attributeType == AttributeTypes.TYPE_INT1) return (attributeCount);\n if (attributeType == AttributeTypes.TYPE_INT2) return (attributeCount << 1);\n if (attributeType == AttributeTypes.TYPE_INT4) return (attributeCount << 2);\n if (attributeType == AttributeTypes.TYPE_INT8) return (attributeCount << 3);\n if (attributeType == AttributeTypes.TYPE_FLOAT4) return (attributeCount << 2);\n if (attributeType == AttributeTypes.TYPE_FLOAT8) return (attributeCount << 3);\n if (attributeType == AttributeTypes.TYPE_COLOR) return (attributeCount * 3);\n return 0;\n }\n\n /**\n * Get the byte size for a number of attributes.\n * @param attributeType the type of attributes.\n * @param attributeCount the number of attributes.\n */\n public static getByteSizeForCount(attributeType: int32, attributeCount: ALong): ALong {\n if (attributeCount.isPositive() == false) return ALong.ZERO;\n if (attributeType == AttributeTypes.TYPE_BOOLEAN) return attributeCount.subInt(1).divInt(8).addInt(1);\n if (attributeType == AttributeTypes.TYPE_INT1) return attributeCount.mulInt(1);\n if (attributeType == AttributeTypes.TYPE_INT2) return attributeCount.mulInt(2);\n if (attributeType == AttributeTypes.TYPE_INT4) return attributeCount.mulInt(4);\n if (attributeType == AttributeTypes.TYPE_INT8) return attributeCount.mulInt(8);\n if (attributeType == AttributeTypes.TYPE_FLOAT4) return attributeCount.mulInt(4);\n if (attributeType == AttributeTypes.TYPE_FLOAT8) return attributeCount.mulInt(8);\n if (attributeType == AttributeTypes.TYPE_COLOR) return attributeCount.mulInt(3);\n return ALong.ZERO;\n }\n\n /**\n * Find the index of an attribute.\n * @param attributes the list of attributes.\n * @param attributeName the name of an attribute.\n * @return the index (negative if not found).\n */\n public static indexOfName(attributes: Array<PointAttribute>, attributeName: string): int32 {\n if (attributes == null) return -1;\n if (attributeName == null) return -1;\n for (let i: number = 0; i < attributes.length; i++) if (attributes[i].hasName(attributeName)) return i;\n return -1;\n }\n\n /**\n * Find the index of an attribute.\n * @param attributes the list of attributes.\n * @param attribute the definition of an attribute.\n * @return the index (negative if not found).\n */\n public static indexOf(attributes: Array<PointAttribute>, attribute: PointAttribute): int32 {\n if (attributes == null) return -1;\n if (attribute == null) return -1;\n for (let i: number = 0; i < attributes.length; i++) if (attributes[i].hasName(attribute.getName())) return i;\n return -1;\n }\n\n /**\n * Check if an attribute exists.\n * @param attributes the list of attributes.\n * @param attributeName the name of an attribute.\n * @return true if found.\n */\n public static hasAttributeName(attributes: Array<PointAttribute>, attributeName: string): boolean {\n return (PointAttribute.indexOfName(attributes, attributeName) >= 0);\n }\n\n /**\n * Check if an attribute exists.\n * @param attributes the list of attributes.\n * @param attribute the definition of an attribute.\n * @return true if found.\n */\n public static hasAttribute(attributes: Array<PointAttribute>, attribute: PointAttribute): boolean {\n return (PointAttribute.indexOf(attributes, attribute) >= 0);\n }\n\n /**\n * Find the index of an attribute.\n * @param attributes the list of attributes.\n * @param attributeName the name of an attribute.\n * @return the index (negative if not found).\n */\n public static listIndexOfName(attributes: AList<PointAttribute>, attributeName: string): int32 {\n if (attributes == null) return -1;\n if (attributeName == null) return -1;\n for (let i: number = 0; i < attributes.size(); i++) if (attributes.get(i).hasName(attributeName)) return i;\n return -1;\n }\n\n /**\n * Find the index of an attribute.\n * @param attributes the list of attributes.\n * @param attribute the definition of an attribute.\n * @return the index (negative if not found).\n */\n public static listIndexOf(attributes: AList<PointAttribute>, attribute: PointAttribute): int32 {\n if (attributes == null) return -1;\n if (attribute == null) return -1;\n for (let i: number = 0; i < attributes.size(); i++) if (attributes.get(i).hasName(attribute.getName())) return i;\n return -1;\n }\n\n /**\n * Check if an attribute exists.\n * @param attributes the list of attributes.\n * @param attributeName the name of an attribute.\n * @return true if found.\n */\n public static listHasAttributeName(attributes: AList<PointAttribute>, attributeName: string): boolean {\n return (PointAttribute.listIndexOfName(attributes, attributeName) >= 0);\n }\n\n /**\n * Check if an attribute exists.\n * @param attributes the list of attributes.\n * @param attribute the definition of an attribute.\n * @return true if found.\n */\n public static listHasAttribute(attributes: AList<PointAttribute>, attribute: PointAttribute): boolean {\n return (PointAttribute.listIndexOf(attributes, attribute) >= 0);\n }\n}\n"]}
|