@itwin/core-frontend 4.8.0-dev.35 → 4.8.0-dev.36
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/lib/cjs/AccuDraw.d.ts +6 -1
- package/lib/cjs/AccuDraw.d.ts.map +1 -1
- package/lib/cjs/AccuDraw.js +13 -1
- package/lib/cjs/AccuDraw.js.map +1 -1
- package/lib/cjs/common/internal/render/VertexTableSplitter.d.ts.map +1 -1
- package/lib/cjs/common/internal/render/VertexTableSplitter.js +17 -4
- package/lib/cjs/common/internal/render/VertexTableSplitter.js.map +1 -1
- package/lib/esm/AccuDraw.d.ts +6 -1
- package/lib/esm/AccuDraw.d.ts.map +1 -1
- package/lib/esm/AccuDraw.js +13 -1
- package/lib/esm/AccuDraw.js.map +1 -1
- package/lib/esm/common/internal/render/VertexTableSplitter.d.ts.map +1 -1
- package/lib/esm/common/internal/render/VertexTableSplitter.js +17 -4
- package/lib/esm/common/internal/render/VertexTableSplitter.js.map +1 -1
- package/lib/public/scripts/parse-imdl-worker.js +1 -1
- package/lib/workers/webpack/parse-imdl-worker.js +1 -1
- package/package.json +18 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VertexTableSplitter.d.ts","sourceRoot":"","sources":["../../../../../src/common/internal/render/VertexTableSplitter.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAY,kBAAkB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAElF,OAAO,EAAqB,WAAW,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAyB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACx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mBAAmB,CAAC,IAAI,EAAE,iBAAiB,GAAG,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAqDxF"}
|
|
@@ -172,7 +172,7 @@ class MaterialAtlasRemapper {
|
|
|
172
172
|
alpha: alphaOverridden ? (entry[0] >>> 24) / 255.0 : undefined,
|
|
173
173
|
diffuse: {
|
|
174
174
|
color: rgbOverridden ? core_common_1.ColorDef.fromTbgr(entry[0] & 0xffffff) : undefined,
|
|
175
|
-
weight: (entry[1] >>> 8) / 255.0,
|
|
175
|
+
weight: ((entry[1] >>> 8) & 0xff) / 255.0,
|
|
176
176
|
},
|
|
177
177
|
specular: {
|
|
178
178
|
color: core_common_1.ColorDef.fromTbgr(entry[2]),
|
|
@@ -216,9 +216,22 @@ class Node {
|
|
|
216
216
|
}
|
|
217
217
|
this.indices.push(newIndex);
|
|
218
218
|
}
|
|
219
|
-
buildOutput(maxDimension) {
|
|
219
|
+
buildOutput(maxDimension, surfaceMaterial) {
|
|
220
220
|
const materialAtlas = this.atlas?.buildAtlasTable();
|
|
221
|
-
|
|
221
|
+
let material;
|
|
222
|
+
if (materialAtlas instanceof Uint32Array) {
|
|
223
|
+
const colorTableOffset = undefined !== this.colors?.colors.length && this.colors?.colors.length > 1 ? this.colors?.colors.length : 0;
|
|
224
|
+
material = {
|
|
225
|
+
isAtlas: true,
|
|
226
|
+
hasTranslucency: (surfaceMaterial?.isAtlas && surfaceMaterial?.hasTranslucency) ?? false,
|
|
227
|
+
overridesAlpha: (surfaceMaterial?.isAtlas && surfaceMaterial?.overridesAlpha) ?? false,
|
|
228
|
+
vertexTableOffset: colorTableOffset,
|
|
229
|
+
numMaterials: materialAtlas.length / 4,
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
material = materialAtlas;
|
|
234
|
+
}
|
|
222
235
|
return {
|
|
223
236
|
indices: this.indices.toVertexIndices(),
|
|
224
237
|
vertices: this.vertices.buildVertexTable(maxDimension, this.colors?.buildColorTable(), materialAtlas),
|
|
@@ -528,7 +541,7 @@ function splitMeshParams(args) {
|
|
|
528
541
|
}, args.computeNodeId);
|
|
529
542
|
const edges = args.params.edges ? splitEdges(args.params.edges, nodes, args.maxDimension) : undefined;
|
|
530
543
|
for (const [id, node] of nodes) {
|
|
531
|
-
const { vertices, indices, material } = node.buildOutput(args.maxDimension);
|
|
544
|
+
const { vertices, indices, material } = node.buildOutput(args.maxDimension, args.params.surface.material);
|
|
532
545
|
const params = {
|
|
533
546
|
vertices,
|
|
534
547
|
surface: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VertexTableSplitter.js","sourceRoot":"","sources":["../../../../../src/common/internal/render/VertexTableSplitter.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAoF;AACpF,oDAAkF;AAClF,6CAAkG;AAClG,+CAA+D;AAC/D,mDAAgD;AAChD,mDAAyE;AAazE;;;GAGG;AACH,MAAa,WAAW;IAKtB,YAAmB,eAAe,GAAG,CAAC;QAHrB,aAAQ,GAAG,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC;QAC9B,YAAO,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QAGpE,IAAI,CAAC,QAAQ,GAAG,IAAI,gCAAiB,CAAC,EAAE,eAAe,EAAE,eAAe,GAAG,CAAC,EAAE,CAAC,CAAC;IAClF,CAAC;IAED,IAAW,UAAU;QACnB,IAAA,qBAAM,EAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QACzC,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;IAClC,CAAC;IAEM,IAAI,CAAC,KAAa;QACvB,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;QACzB,IAAI,CAAC,QAAQ,CAAC,MAA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E,CAAC;QAC/B,IAAA,qBAAM,EAAC,SAAS,KAAK,IAAI,CAAC,WAAW,IAAI,SAAS,KAAK,IAAI,CAAC,oBAAoB,CAAC,CAAC;QAClF,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAClE,MAAM,MAAM,GAAmB;YAC7B,GAAG,IAAI,CAAC,MAAM;YACd,QAAQ;YACR,QAAQ,EAAE;gBACR,OAAO;gBACP,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE;gBAC/C,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,CAAC,YAAY,EAAE;aAC/D;SACF,CAAC;QAEF,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IACzB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AArDD,kDAqDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { assert, Uint32ArrayBuilder, Uint8ArrayBuilder } from \"@itwin/core-bentley\";\r\nimport { ColorDef, RenderFeatureTable, RenderMaterial } from \"@itwin/core-common\";\r\nimport { calculateEdgeTableParams, EdgeParams, EdgeTable, IndexedEdgeParams } from \"./EdgeParams\";\r\nimport { computeDimensions, VertexTable } from \"./VertexTable\";\r\nimport { VertexIndices } from \"./VertexIndices\";\r\nimport { createSurfaceMaterial, SurfaceMaterial } from \"./SurfaceParams\";\r\nimport { MaterialParams } from \"../../render/MaterialParams\";\r\nimport { MeshParams } from \"./MeshParams\";\r\nimport { PointStringParams } from \"./PointStringParams\";\r\nimport { PolylineParams, TesselatedPolyline } from \"./PolylineParams\";\r\n\r\n/** @internal */\r\nexport interface VertexTableWithIndices {\r\n vertices: VertexTable;\r\n indices: VertexIndices;\r\n material?: SurfaceMaterial;\r\n}\r\n\r\n/** Builds up a [[VertexIndices]].\r\n * Exported strictly for tests.\r\n * @internal\r\n */\r\nexport class IndexBuffer {\r\n private readonly _builder: Uint8ArrayBuilder;\r\n private readonly _index32 = new Uint32Array(1);\r\n private readonly _index8 = new Uint8Array(this._index32.buffer, 0, 3);\r\n\r\n public constructor(initialCapacity = 3) {\r\n this._builder = new Uint8ArrayBuilder({ initialCapacity: initialCapacity * 3 });\r\n }\r\n\r\n public get numIndices(): number {\r\n assert((this._builder.length % 3) === 0);\r\n return this._builder.length / 3;\r\n }\r\n\r\n public push(index: number): void {\r\n this._index32[0] = index;\r\n this._builder.append(this._index8);\r\n }\r\n\r\n public toVertexIndices(): VertexIndices {\r\n return new VertexIndices(this._builder.toTypedArray());\r\n }\r\n}\r\n\r\n/** Builds up a [[VertexTable]]. */\r\nclass VertexBuffer {\r\n private readonly _builder: Uint32ArrayBuilder;\r\n private readonly _source: VertexTable;\r\n\r\n /** `source` is the original table containing the vertex data from which individual vertices will be obtained. */\r\n public constructor(source: VertexTable) {\r\n this._source = source;\r\n this._builder = new Uint32ArrayBuilder({ initialCapacity: 3 * source.numRgbaPerVertex });\r\n }\r\n\r\n /** The number of vertices currently in the table. */\r\n public get length(): number {\r\n assert((this._builder.length % this.vertexSize) === 0);\r\n return this._builder.length / this.vertexSize;\r\n }\r\n\r\n /** The number of 32-bit unsigned integers (RGBA values) per vertex. */\r\n public get vertexSize(): number {\r\n return this._source.numRgbaPerVertex;\r\n }\r\n\r\n /** Append a vertex. `vertex` must be of size [[vertexSize]]. */\r\n public push(vertex: Uint32Array): void {\r\n assert(vertex.length === this.vertexSize);\r\n this._builder.append(vertex);\r\n }\r\n\r\n /** Construct the finished vertex table. */\r\n public buildVertexTable(maxDimension: number, colorTable: ColorTable | undefined, materialAtlasTable: MaterialAtlasTable): VertexTable {\r\n const source = this._source;\r\n colorTable = colorTable ?? source.uniformColor;\r\n assert(undefined !== colorTable);\r\n\r\n const colorTableLength = colorTable instanceof Uint32Array ? colorTable.length : 0;\r\n const materialAtlasTableLength = materialAtlasTable instanceof Uint32Array ? materialAtlasTable.length : 0;\r\n const dimensions = computeDimensions(this.length, this.vertexSize, colorTableLength + materialAtlasTableLength, maxDimension);\r\n\r\n let rgbaData = this._builder.toTypedArray();\r\n if (dimensions.width * dimensions.height > rgbaData.length) {\r\n const prevData = rgbaData;\r\n rgbaData = new Uint32Array(dimensions.width * dimensions.height);\r\n rgbaData.set(prevData, 0);\r\n }\r\n\r\n let tableSize = this.vertexSize * this.length;\r\n if (colorTable instanceof Uint32Array) {\r\n rgbaData.set(colorTable, tableSize);\r\n tableSize += colorTable.length;\r\n }\r\n\r\n if (materialAtlasTable instanceof Uint32Array)\r\n rgbaData.set(materialAtlasTable, tableSize);\r\n\r\n return {\r\n data: new Uint8Array(rgbaData.buffer, rgbaData.byteOffset, rgbaData.byteLength),\r\n usesUnquantizedPositions: source.usesUnquantizedPositions,\r\n qparams: source.qparams,\r\n width: dimensions.width,\r\n height: dimensions.height,\r\n hasTranslucency: source.hasTranslucency,\r\n uniformColor: colorTable instanceof ColorDef ? colorTable : undefined,\r\n featureIndexType: source.featureIndexType,\r\n uniformFeatureID: source.uniformFeatureID,\r\n numVertices: this.length,\r\n numRgbaPerVertex: source.numRgbaPerVertex,\r\n uvParams: source.uvParams,\r\n };\r\n }\r\n}\r\n\r\ntype ColorTable = Uint32Array | ColorDef;\r\n\r\n/** Remaps portions of a source color table into a filtered target color table. */\r\nclass ColorTableRemapper {\r\n private readonly _remappedIndices = new Map<number, number>();\r\n private readonly _colorTable: Uint32Array;\r\n public readonly colors: number[] = [];\r\n private readonly _32 = new Uint32Array(1);\r\n private readonly _16 = new Uint16Array(this._32.buffer);\r\n\r\n public constructor(colorTable: Uint32Array) {\r\n this._colorTable = colorTable;\r\n }\r\n\r\n /** Extract the color index stored in `vertex`, ensure it is present in the remapped color table, and return its index in that table. */\r\n public remap(vertex: Uint32Array, usesUnquantizedPositions: boolean | undefined): void {\r\n const vertIndex = usesUnquantizedPositions ? 4 : 1;\r\n const shortIndex = usesUnquantizedPositions ? 0 : 1;\r\n this._32[0] = vertex[vertIndex];\r\n const oldIndex = this._16[shortIndex];\r\n let newIndex = this._remappedIndices.get(oldIndex);\r\n if (undefined === newIndex) {\r\n newIndex = this.colors.length;\r\n this._remappedIndices.set(oldIndex, newIndex);\r\n const color = this._colorTable[oldIndex];\r\n this.colors.push(color);\r\n }\r\n\r\n this._16[shortIndex] = newIndex;\r\n vertex[vertIndex] = this._32[0];\r\n }\r\n\r\n /** Construct the finished color table. */\r\n public buildColorTable(): ColorTable {\r\n assert(this.colors.length > 0);\r\n return this.colors.length > 1 ? new Uint32Array(this.colors) : ColorDef.fromAbgr(this.colors[0]);\r\n }\r\n}\r\n\r\ntype MaterialAtlasTable = Uint32Array | SurfaceMaterial | undefined;\r\n\r\ntype CreateRenderMaterial = (args: MaterialParams) => RenderMaterial | undefined;\r\n\r\nclass MaterialAtlasRemapper {\r\n private readonly _remappedIndices = new Map<number, number>();\r\n private readonly _atlasTable: Uint32Array;\r\n private readonly _createMaterial: CreateRenderMaterial;\r\n public readonly materials: number[] = [];\r\n private readonly _32 = new Uint32Array(1);\r\n private readonly _8 = new Uint8Array(this._32.buffer);\r\n\r\n public constructor(_atlasTable: Uint32Array, createMaterial: CreateRenderMaterial) {\r\n this._atlasTable = _atlasTable;\r\n this._createMaterial = createMaterial;\r\n }\r\n\r\n /** Extract the mat index stored in `vertex`, ensure it is present in the remapped atlas table, and return its index in that table. */\r\n public remap(vertex: Uint32Array, usesUnquantizedPositions: boolean | undefined): void {\r\n const vertIndex = usesUnquantizedPositions ? 3 : 2;\r\n this._32[0] = vertex[vertIndex];\r\n const oldIndex = this._8[3];\r\n let newIndex = this._remappedIndices.get(oldIndex);\r\n if (undefined === newIndex) {\r\n newIndex = this.materials.length / 4;\r\n this._remappedIndices.set(oldIndex, newIndex);\r\n let index = oldIndex * 4;\r\n this.materials.push(this._atlasTable[index++]);\r\n this.materials.push(this._atlasTable[index++]);\r\n this.materials.push(this._atlasTable[index++]);\r\n this.materials.push(this._atlasTable[index]);\r\n }\r\n\r\n this._8[3] = newIndex;\r\n vertex[vertIndex] = this._32[0];\r\n }\r\n\r\n private unpackFloat(value: number): number {\r\n this._32[0] = value;\r\n const valUint32 = this._32[0];\r\n const bias = 38.0;\r\n const temp = (valUint32 >>> 24) / 2.0;\r\n let exponent = Math.floor(temp);\r\n let sign = (temp - exponent) * 2.0;\r\n sign = -(sign * 2.0 - 1.0);\r\n const base = sign * (valUint32 & 0xffffff) / 16777216.0;\r\n exponent = exponent - bias;\r\n return base * Math.pow(10.0, exponent);\r\n }\r\n\r\n private materialFromAtlasEntry(entry: Uint32Array): SurfaceMaterial | undefined {\r\n const rgbOverridden = (entry[1] & 0x1000000) !== 0;\r\n const alphaOverridden = (entry[1] & 0x2000000) !== 0;\r\n const args: MaterialParams = {\r\n alpha: alphaOverridden ? (entry[0] >>> 24) / 255.0 : undefined,\r\n diffuse: {\r\n color: rgbOverridden ? ColorDef.fromTbgr(entry[0] & 0xffffff) : undefined,\r\n weight: (entry[1] >>> 8) / 255.0,\r\n },\r\n specular: {\r\n color: ColorDef.fromTbgr(entry[2]),\r\n weight: ((entry[1] >>> 16) & 0xff) / 255.0,\r\n exponent: this.unpackFloat(entry[3]),\r\n },\r\n };\r\n\r\n const material = this._createMaterial(args);\r\n return createSurfaceMaterial(material);\r\n }\r\n\r\n /** Construct the finished color table. */\r\n public buildAtlasTable(): MaterialAtlasTable {\r\n assert(this.materials.length > 0);\r\n const m = new Uint32Array(this.materials);\r\n return this.materials.length > 4 ? m : this.materialFromAtlasEntry(m);\r\n }\r\n}\r\n\r\n/** A node in a split vertex table. Each node corresponds to one or more elements. */\r\nclass Node {\r\n public readonly vertices: VertexBuffer;\r\n public readonly remappedIndices = new Map<number, number>();\r\n public readonly indices = new IndexBuffer();\r\n public readonly colors?: ColorTableRemapper;\r\n public readonly atlas?: MaterialAtlasRemapper;\r\n public readonly usesUnquantizedPositions?: boolean;\r\n\r\n /** `vertexTable` is the source table containing vertex data for all nodes, from which this node will extract the vertices belong to it. */\r\n public constructor(vertexTable: VertexTable, atlas?: AtlasInfo) {\r\n this.vertices = new VertexBuffer(vertexTable);\r\n if (undefined === vertexTable.uniformColor)\r\n this.colors = new ColorTableRemapper(new Uint32Array(vertexTable.data.buffer, vertexTable.data.byteOffset + 4 * vertexTable.numVertices * vertexTable.numRgbaPerVertex));\r\n\r\n if (atlas) {\r\n const atlasOffset = (vertexTable.numVertices * vertexTable.numRgbaPerVertex + atlas.offset) * 4;\r\n this.atlas = new MaterialAtlasRemapper(new Uint32Array(vertexTable.data.buffer, vertexTable.data.byteOffset + atlasOffset), atlas.createMaterial);\r\n }\r\n\r\n this.usesUnquantizedPositions = vertexTable.usesUnquantizedPositions;\r\n }\r\n\r\n public addVertex(originalIndex: number, vertex: Uint32Array): void {\r\n let newIndex = this.remappedIndices.get(originalIndex);\r\n if (undefined === newIndex) {\r\n newIndex = this.vertices.length;\r\n this.remappedIndices.set(originalIndex, newIndex);\r\n\r\n this.colors?.remap(vertex, this.usesUnquantizedPositions);\r\n this.atlas?.remap(vertex, this.usesUnquantizedPositions);\r\n this.vertices.push(vertex);\r\n }\r\n\r\n this.indices.push(newIndex);\r\n }\r\n\r\n public buildOutput(maxDimension: number): VertexTableWithIndices {\r\n const materialAtlas = this.atlas?.buildAtlasTable();\r\n const material: SurfaceMaterial | undefined = (materialAtlas instanceof Uint32Array) ? undefined : materialAtlas;\r\n return {\r\n indices: this.indices.toVertexIndices(),\r\n vertices: this.vertices.buildVertexTable(maxDimension, this.colors?.buildColorTable(), materialAtlas),\r\n material,\r\n };\r\n }\r\n}\r\n\r\ninterface AtlasInfo {\r\n offset: number;\r\n createMaterial: CreateRenderMaterial;\r\n}\r\n\r\ninterface VertexTableSplitArgs extends VertexTableWithIndices {\r\n featureTable: RenderFeatureTable;\r\n atlasInfo?: AtlasInfo;\r\n}\r\n\r\n/** @internal */\r\nexport type ComputeAnimationNodeId = (featureIndex: number) => number;\r\n\r\nclass VertexTableSplitter {\r\n private readonly _input: VertexTableSplitArgs;\r\n private readonly _computeNodeId: ComputeAnimationNodeId;\r\n private readonly _nodes = new Map<number, Node>();\r\n\r\n private constructor(input: VertexTableSplitArgs, computeNodeId: ComputeAnimationNodeId) {\r\n this._input = input;\r\n this._computeNodeId = computeNodeId;\r\n }\r\n\r\n /** Split the source into one or more output nodes, returning a mapping of integer node Id to node. */\r\n public static split(source: VertexTableSplitArgs, computeNodeId: ComputeAnimationNodeId): Map<number, Node> {\r\n const splitter = new VertexTableSplitter(source, computeNodeId);\r\n splitter.split();\r\n return splitter._nodes;\r\n }\r\n\r\n private split(): void {\r\n // Track the most recent feature and corresponding node to avoid repeated lookups - vertices for\r\n // individual features are largely contiguous.\r\n const curState = {\r\n featureIndex: -1,\r\n node: undefined as unknown as Node,\r\n };\r\n\r\n const vertSize = this._input.vertices.numRgbaPerVertex;\r\n const vertex = new Uint32Array(vertSize);\r\n const vertexTable = new Uint32Array(this._input.vertices.data.buffer, this._input.vertices.data.byteOffset, this._input.vertices.numVertices * vertSize);\r\n\r\n let extractFeatureIndex: () => number;\r\n if (this._input.vertices.usesUnquantizedPositions) {\r\n const vertexBytes = new Uint8Array(vertex.buffer);\r\n extractFeatureIndex = () => {\r\n return vertexBytes[3]\r\n | (vertexBytes[7] << 8)\r\n | (vertexBytes[11] << 16);\r\n };\r\n } else {\r\n extractFeatureIndex = () => vertex[2] & 0x00ffffff;\r\n }\r\n\r\n for (const index of this._input.indices) {\r\n // Extract the data for this vertex without allocating new typed arrays.\r\n const vertexOffset = index * vertSize;\r\n for (let i = 0; i < vertex.length; i++)\r\n vertex[i] = vertexTable[vertexOffset + i];\r\n\r\n // Determine to which element the vertex belongs and find the corresponding Node.\r\n const featureIndex = extractFeatureIndex();\r\n if (curState.featureIndex !== featureIndex) {\r\n curState.featureIndex = featureIndex;\r\n const nodeId = this._computeNodeId(featureIndex);\r\n let node = this._nodes.get(nodeId);\r\n if (undefined === node)\r\n this._nodes.set(nodeId, node = new Node(this._input.vertices, this._input.atlasInfo));\r\n\r\n curState.node = node;\r\n }\r\n\r\n // Add the vertex to the appropriate node.\r\n curState.node.addVertex(index, vertex);\r\n }\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport interface SplitVertexTableArgs {\r\n featureTable: RenderFeatureTable;\r\n maxDimension: number;\r\n computeNodeId: ComputeAnimationNodeId;\r\n}\r\n\r\n/** @internal */\r\nexport interface SplitPointStringArgs extends SplitVertexTableArgs {\r\n params: PointStringParams;\r\n}\r\n\r\n/** Given a PointStringParams and a function that can associate a node Id with an element Id, produce a mapping of nodes to PointStringParams, splitting up\r\n * the input params as needed.\r\n * @internal\r\n */\r\nexport function splitPointStringParams(args: SplitPointStringArgs): Map<number, PointStringParams> {\r\n const nodes = VertexTableSplitter.split({\r\n indices: args.params.indices,\r\n vertices: args.params.vertices,\r\n featureTable: args.featureTable,\r\n }, args.computeNodeId);\r\n\r\n const result = new Map<number, PointStringParams>();\r\n for (const [id, node] of nodes) {\r\n const { vertices, indices } = node.buildOutput(args.maxDimension);\r\n result.set(id, { vertices, indices, weight: args.params.weight });\r\n }\r\n\r\n return result;\r\n}\r\n\r\ninterface RemappedSegmentEdges {\r\n indices: IndexBuffer;\r\n endPointAndQuadIndices: Uint32ArrayBuilder;\r\n}\r\n\r\ninterface RemappedSilhouetteEdges extends RemappedSegmentEdges {\r\n normalPairs: Uint32ArrayBuilder;\r\n}\r\n\r\nclass RemappedPolylineEdges {\r\n public readonly indices = new IndexBuffer();\r\n public readonly prevIndices = new IndexBuffer();\r\n public readonly nextIndicesAndParams = new Uint32ArrayBuilder();\r\n}\r\n\r\ninterface RemappedIndexEdges {\r\n edges: Uint8ArrayBuilder;\r\n silhouettes: Uint8ArrayBuilder;\r\n}\r\n\r\ninterface RemappedEdges {\r\n segments?: RemappedSegmentEdges;\r\n silhouettes?: RemappedSilhouetteEdges;\r\n polylines?: RemappedPolylineEdges;\r\n indexed?: RemappedIndexEdges;\r\n}\r\n\r\ninterface RemappedIndex {\r\n node: Node;\r\n id: number;\r\n index: number;\r\n}\r\n\r\nfunction remapIndex(out: RemappedIndex, srcIndex: number, nodes: Map<number, Node>): boolean {\r\n for (const [id, node] of nodes) {\r\n const index = node.remappedIndices.get(srcIndex);\r\n if (undefined !== index) {\r\n out.index = index;\r\n out.node = node;\r\n out.id = id;\r\n return true;\r\n }\r\n }\r\n\r\n assert(false);\r\n return false;\r\n}\r\n\r\nfunction remapSegmentEdges(type: \"segments\" | \"silhouettes\", source: EdgeParams, nodes: Map<number, Node>, edges: Map<number, RemappedEdges>): void {\r\n const src = source[type];\r\n if (!src)\r\n return;\r\n\r\n const srcEndPts = new Uint32Array(src.endPointAndQuadIndices.buffer, src.endPointAndQuadIndices.byteOffset, src.endPointAndQuadIndices.length / 4);\r\n let srcNormalPairs;\r\n if (type === \"silhouettes\") {\r\n assert(undefined !== source.silhouettes);\r\n srcNormalPairs = new Uint32Array(source.silhouettes.normalPairs.buffer, source.silhouettes.normalPairs.byteOffset, source.silhouettes.normalPairs.length / 4);\r\n }\r\n\r\n let curIndexIndex = 0;\r\n const remappedIndex = { } as unknown as RemappedIndex;\r\n for (const srcIndex of src.indices) {\r\n if (remapIndex(remappedIndex, srcIndex, nodes)) {\r\n let endPointAndQuad = srcEndPts[curIndexIndex];\r\n const otherIndex = (endPointAndQuad & 0x00ffffff) >>> 0;\r\n const newOtherIndex = remappedIndex.node.remappedIndices.get(otherIndex);\r\n assert(undefined !== newOtherIndex);\r\n endPointAndQuad = (endPointAndQuad & 0xff000000) | newOtherIndex;\r\n\r\n let entry = edges.get(remappedIndex.id);\r\n if (!entry)\r\n edges.set(remappedIndex.id, entry = { });\r\n\r\n if (srcNormalPairs) {\r\n if (!entry.silhouettes)\r\n entry.silhouettes = { indices: new IndexBuffer(), endPointAndQuadIndices: new Uint32ArrayBuilder(), normalPairs: new Uint32ArrayBuilder() };\r\n\r\n entry.silhouettes.normalPairs.push(srcNormalPairs[curIndexIndex]);\r\n } else if (!entry.segments) {\r\n entry.segments = { indices: new IndexBuffer(), endPointAndQuadIndices: new Uint32ArrayBuilder() };\r\n }\r\n\r\n const segments = entry[type];\r\n assert(undefined !== segments);\r\n\r\n segments.indices.push(remappedIndex.index);\r\n segments.endPointAndQuadIndices.push(endPointAndQuad);\r\n }\r\n\r\n ++curIndexIndex;\r\n }\r\n}\r\n\r\nfunction remapPolylineEdges(src: TesselatedPolyline, nodes: Map<number, Node>, edges: Map<number, RemappedEdges>): void {\r\n const srcNextAndParam = new Uint32Array(src.nextIndicesAndParams.buffer, src.nextIndicesAndParams.byteOffset, src.nextIndicesAndParams.length / 4);\r\n const prevIter = src.prevIndices[Symbol.iterator]();\r\n let curIndexIndex = 0;\r\n const remappedIndex = { } as unknown as RemappedIndex;\r\n for (const srcIndex of src.indices) {\r\n if (remapIndex(remappedIndex, srcIndex, nodes)) {\r\n const prevIndex = prevIter.next().value;\r\n assert(undefined !== prevIndex);\r\n const newPrevIndex = remappedIndex.node.remappedIndices.get(prevIndex);\r\n assert(undefined !== newPrevIndex);\r\n\r\n let nextAndParam = srcNextAndParam[curIndexIndex];\r\n const nextIndex = (nextAndParam & 0x00ffffff) >>> 0;\r\n const newNextIndex = remappedIndex.node.remappedIndices.get(nextIndex);\r\n assert(undefined !== newNextIndex);\r\n nextAndParam = (nextAndParam & 0xff000000) | newNextIndex;\r\n\r\n let entry = edges.get(remappedIndex.id);\r\n if (!entry)\r\n edges.set(remappedIndex.id, entry = { });\r\n\r\n if (!entry.polylines)\r\n entry.polylines = new RemappedPolylineEdges();\r\n\r\n entry.polylines.indices.push(remappedIndex.index);\r\n entry.polylines.prevIndices.push(newPrevIndex);\r\n entry.polylines.nextIndicesAndParams.push(nextAndParam);\r\n }\r\n\r\n ++curIndexIndex;\r\n }\r\n}\r\n\r\nfunction remapIndexedEdges(src: IndexedEdgeParams, nodes: Map<number, Node>, edges: Map<number, RemappedEdges>): void {\r\n const srcEdgeData = src.edges.data;\r\n const numSegments = src.edges.numSegments;\r\n const silhouetteStartByteIndex = numSegments * 6 + src.edges.silhouettePadding;\r\n\r\n function getUint24EdgePair(byteIndex: number): [number, number] {\r\n return [srcEdgeData[byteIndex + 0] | (srcEdgeData[byteIndex + 1] << 8) | srcEdgeData[byteIndex + 2] << 16,\r\n srcEdgeData[byteIndex + 3] | (srcEdgeData[byteIndex + 4] << 8) | srcEdgeData[byteIndex + 5] << 16];\r\n }\r\n\r\n function setUint24EdgePair(indEdges: RemappedIndexEdges, value1: number, value2: number): void {\r\n indEdges.edges.push(value1 & 0x0000ff);\r\n indEdges.edges.push((value1 & 0x00ff00) >>> 8);\r\n indEdges.edges.push((value1 & 0xff0000) >>> 16);\r\n indEdges.edges.push(value2 & 0x0000ff);\r\n indEdges.edges.push((value2 & 0x00ff00) >>> 8);\r\n indEdges.edges.push((value2 & 0xff0000) >>> 16);\r\n }\r\n\r\n function getUint24SilPair(byteIndex: number): [number, number, number, number] {\r\n return [srcEdgeData[byteIndex + 0] | (srcEdgeData[byteIndex + 1] << 8) | srcEdgeData[byteIndex + 2] << 16,\r\n srcEdgeData[byteIndex + 3] | (srcEdgeData[byteIndex + 4] << 8) | srcEdgeData[byteIndex + 5] << 16,\r\n srcEdgeData[byteIndex + 6] | (srcEdgeData[byteIndex + 7] << 8), srcEdgeData[byteIndex + 8] | (srcEdgeData[byteIndex + 9] << 8)];\r\n }\r\n\r\n function setUint24SilPair(indSil: RemappedIndexEdges, value1: number, value2: number, norm1: number, norm2: number): void {\r\n indSil.silhouettes.push(value1 & 0x0000ff);\r\n indSil.silhouettes.push((value1 & 0x00ff00) >>> 8);\r\n indSil.silhouettes.push((value1 & 0xff0000) >>> 16);\r\n indSil.silhouettes.push(value2 & 0x0000ff);\r\n indSil.silhouettes.push((value2 & 0x00ff00) >>> 8);\r\n indSil.silhouettes.push((value2 & 0xff0000) >>> 16);\r\n indSil.silhouettes.push(norm1 & 0x0000ff);\r\n indSil.silhouettes.push((norm1 & 0x00ff00) >>> 8);\r\n indSil.silhouettes.push(norm2 & 0x0000ff);\r\n indSil.silhouettes.push((norm2 & 0x00ff00) >>> 8);\r\n }\r\n\r\n let maxIndex = 0;\r\n for (const srcIndex of src.indices)\r\n maxIndex = Math.max (srcIndex, maxIndex);\r\n\r\n const remappedIndex = { } as unknown as RemappedIndex;\r\n let es1Index = 0, es2Index = 0, n1 = 0, n2 = 0;\r\n for (let curSegment = 0, byteIndex = 0; curSegment <= maxIndex; ++curSegment) {\r\n if (curSegment < numSegments) { // edges\r\n [es1Index, es2Index] = getUint24EdgePair(byteIndex);\r\n byteIndex += 6;\r\n } else { // silhouettes\r\n byteIndex = silhouetteStartByteIndex + (curSegment - numSegments) * 10;\r\n [es1Index, es2Index, n1, n2] = getUint24SilPair(byteIndex);\r\n }\r\n\r\n if (remapIndex(remappedIndex, es1Index, nodes)) {\r\n let entry = edges.get(remappedIndex.id);\r\n if (!entry)\r\n edges.set(remappedIndex.id, entry = { });\r\n\r\n if (!entry.indexed)\r\n entry.indexed = { edges: new Uint8ArrayBuilder(), silhouettes: new Uint8ArrayBuilder() };\r\n\r\n if (curSegment < numSegments) { // edges\r\n const newE1Index = remappedIndex.node.remappedIndices.get(es1Index);\r\n assert(undefined !== newE1Index);\r\n const newE2Index = remappedIndex.node.remappedIndices.get(es2Index);\r\n assert(undefined !== newE2Index);\r\n setUint24EdgePair(entry.indexed, newE1Index, newE2Index);\r\n } else { // silhouettes\r\n const newS1Index = remappedIndex.node.remappedIndices.get(es1Index);\r\n assert(undefined !== newS1Index);\r\n const newS2Index = remappedIndex.node.remappedIndices.get(es2Index);\r\n assert(undefined !== newS2Index);\r\n setUint24SilPair(entry.indexed, newS1Index, newS2Index, n1, n2);\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction splitEdges(source: EdgeParams, nodes: Map<number, Node>, maxDimension: number): Map<number, EdgeParams> {\r\n const edges = new Map<number, RemappedEdges>();\r\n remapSegmentEdges(\"segments\", source, nodes, edges);\r\n remapSegmentEdges(\"silhouettes\", source, nodes, edges);\r\n\r\n if (source.polylines)\r\n remapPolylineEdges(source.polylines, nodes, edges);\r\n\r\n if (source.indexed)\r\n remapIndexedEdges(source.indexed, nodes, edges);\r\n\r\n const result = new Map<number, EdgeParams>();\r\n for (const [id, remappedEdges] of edges) {\r\n if (!remappedEdges.segments && !remappedEdges.silhouettes && !remappedEdges.indexed)\r\n continue;\r\n\r\n let edgeTable = { } as unknown as EdgeTable;\r\n let edgeIndices = { } as unknown as VertexIndices;\r\n if (remappedEdges.indexed) {\r\n const numSegmentEdges = remappedEdges.indexed.edges.length / 6;\r\n const numSilhouettes = remappedEdges.indexed.silhouettes.length / 10;\r\n const { width, height, silhouettePadding, silhouetteStartByteIndex } = calculateEdgeTableParams(numSegmentEdges, numSilhouettes, maxDimension);\r\n const data = new Uint8Array(width * height * 4);\r\n data.set(remappedEdges.indexed.edges.toTypedArray(), 0);\r\n if (numSilhouettes > 0)\r\n data.set(remappedEdges.indexed.silhouettes.toTypedArray(), silhouetteStartByteIndex + silhouettePadding);\r\n\r\n const numTotalEdges = numSegmentEdges + numSilhouettes;\r\n edgeIndices = new VertexIndices(new Uint8Array(numTotalEdges * 6 * 3));\r\n for (let i = 0; i < numTotalEdges; i++)\r\n for (let j = 0; j < 6; j++)\r\n edgeIndices.setNthIndex(i * 6 + j, i);\r\n\r\n edgeTable = {\r\n data,\r\n width,\r\n height,\r\n numSegments: numSegmentEdges,\r\n silhouettePadding,\r\n };\r\n }\r\n\r\n result.set(id, {\r\n weight: source.weight,\r\n linePixels: source.linePixels,\r\n segments: remappedEdges.segments ? {\r\n indices: remappedEdges.segments.indices.toVertexIndices(),\r\n endPointAndQuadIndices: remappedEdges.segments.endPointAndQuadIndices.toUint8Array(),\r\n } : undefined,\r\n silhouettes: remappedEdges.silhouettes ? {\r\n indices: remappedEdges.silhouettes.indices.toVertexIndices(),\r\n endPointAndQuadIndices: remappedEdges.silhouettes.endPointAndQuadIndices.toUint8Array(),\r\n normalPairs: remappedEdges.silhouettes.normalPairs.toUint8Array(),\r\n } : undefined,\r\n polylines: remappedEdges.polylines ? {\r\n indices: remappedEdges.polylines.indices.toVertexIndices(),\r\n prevIndices: remappedEdges.polylines.prevIndices.toVertexIndices(),\r\n nextIndicesAndParams: remappedEdges.polylines.nextIndicesAndParams.toUint8Array(),\r\n } : undefined,\r\n indexed: remappedEdges.indexed ? {\r\n indices: edgeIndices,\r\n edges: edgeTable,\r\n } : undefined,\r\n });\r\n }\r\n\r\n return result;\r\n}\r\n\r\n/** @internal */\r\nexport interface SplitMeshArgs extends SplitVertexTableArgs {\r\n params: MeshParams;\r\n createMaterial: CreateRenderMaterial;\r\n}\r\n\r\n/** @internal */\r\nexport function splitMeshParams(args: SplitMeshArgs): Map<number, MeshParams> {\r\n const result = new Map<number, MeshParams>();\r\n\r\n const mat = args.params.surface.material;\r\n const atlasOffset = undefined !== mat && mat.isAtlas ? mat.vertexTableOffset : undefined;\r\n const atlasInfo = undefined !== atlasOffset ? { offset: atlasOffset, createMaterial: args.createMaterial } : undefined;\r\n\r\n const nodes = VertexTableSplitter.split({\r\n indices: args.params.surface.indices,\r\n vertices: args.params.vertices,\r\n featureTable: args.featureTable,\r\n atlasInfo,\r\n }, args.computeNodeId);\r\n\r\n const edges = args.params.edges ? splitEdges(args.params.edges, nodes, args.maxDimension) : undefined;\r\n\r\n for (const [id, node] of nodes) {\r\n const { vertices, indices, material } = node.buildOutput(args.maxDimension);\r\n const params: MeshParams = {\r\n vertices,\r\n surface: {\r\n type: args.params.surface.type,\r\n indices,\r\n fillFlags: args.params.surface.fillFlags,\r\n hasBakedLighting: args.params.surface.hasBakedLighting,\r\n textureMapping: args.params.surface.textureMapping,\r\n material: material !== undefined ? material : args.params.surface.material,\r\n },\r\n edges: edges?.get(id),\r\n isPlanar: args.params.isPlanar,\r\n // ###TODO handle aux channels.......\r\n auxChannels: args.params.auxChannels,\r\n };\r\n\r\n result.set(id, params);\r\n }\r\n\r\n return result;\r\n}\r\n\r\n/** @internal */\r\nexport interface SplitPolylineArgs extends SplitVertexTableArgs {\r\n params: PolylineParams;\r\n}\r\n\r\ninterface PolylineNode extends Node {\r\n prevIndices?: IndexBuffer;\r\n nextIndicesAndParams?: Uint32ArrayBuilder;\r\n}\r\n\r\n/** @internal */\r\nexport function splitPolylineParams(args: SplitPolylineArgs): Map<number, PolylineParams> {\r\n const nodes = VertexTableSplitter.split({\r\n indices: args.params.polyline.indices,\r\n vertices: args.params.vertices,\r\n featureTable: args.featureTable,\r\n }, args.computeNodeId) as Map<number, PolylineNode>;\r\n\r\n const src = args.params.polyline;\r\n const srcNextAndParam = new Uint32Array(src.nextIndicesAndParams.buffer, src.nextIndicesAndParams.byteOffset, src.nextIndicesAndParams.length / 4);\r\n let curIndexIndex = 0;\r\n const remappedIndex = { } as unknown as RemappedIndex;\r\n for (const prevIndex of src.prevIndices) {\r\n if (remapIndex(remappedIndex, prevIndex, nodes)) {\r\n const node = remappedIndex.node as PolylineNode;\r\n if (!node.prevIndices) {\r\n assert(undefined === node.nextIndicesAndParams);\r\n node.prevIndices = new IndexBuffer(node.indices.numIndices);\r\n node.nextIndicesAndParams = new Uint32ArrayBuilder({ initialCapacity: node.indices.numIndices });\r\n } else {\r\n assert(undefined !== node.nextIndicesAndParams);\r\n }\r\n\r\n node.prevIndices.push(remappedIndex.index);\r\n\r\n let nextAndParam = srcNextAndParam[curIndexIndex];\r\n const nextIndex = (nextAndParam & 0x00ffffff) >>> 0;\r\n const newNextIndex = remappedIndex.node.remappedIndices.get(nextIndex);\r\n assert(undefined !== newNextIndex);\r\n nextAndParam = (nextAndParam & 0xff000000) | newNextIndex;\r\n node.nextIndicesAndParams.push(nextAndParam);\r\n }\r\n\r\n ++curIndexIndex;\r\n }\r\n\r\n const result = new Map<number, PolylineParams>();\r\n for (const [id, node] of nodes) {\r\n assert(undefined !== node.prevIndices && undefined !== node.nextIndicesAndParams);\r\n const { vertices, indices } = node.buildOutput(args.maxDimension);\r\n const params: PolylineParams = {\r\n ...args.params,\r\n vertices,\r\n polyline: {\r\n indices,\r\n prevIndices: node.prevIndices.toVertexIndices(),\r\n nextIndicesAndParams: node.nextIndicesAndParams.toUint8Array(),\r\n },\r\n };\r\n\r\n result.set(id, params);\r\n }\r\n\r\n return result;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"VertexTableSplitter.js","sourceRoot":"","sources":["../../../../../src/common/internal/render/VertexTableSplitter.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAoF;AACpF,oDAAkF;AAClF,6CAAkG;AAClG,+CAA+D;AAC/D,mDAAgD;AAChD,mDAAyE;AAazE;;;GAGG;AACH,MAAa,WAAW;IAKtB,YAAmB,eAAe,GAAG,CAAC;QAHrB,aAAQ,GAAG,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC;QAC9B,YAAO,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QAGpE,IAAI,CAAC,QAAQ,GAAG,IAAI,gCAAiB,CAAC,EAAE,eAAe,EAAE,eAAe,GAAG,CAAC,EAAE,CAAC,CAAC;IAClF,CAAC;IAED,IAAW,UAAU;QACnB,IAAA,qBAAM,EAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QACzC,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;IAClC,CAAC;IAEM,IAAI,CAAC,KAAa;QACvB,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;QACzB,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;IAEM,eAAe;QACpB,OAAO,IAAI,6BAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,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AC,aAAa,CAAC,CAAC;YAClD,MAAM,SAAS,GAAG,CAAC,YAAY,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;YACpD,MAAM,YAAY,GAAG,aAAa,CAAC,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YACvE,IAAA,qBAAM,EAAC,SAAS,KAAK,YAAY,CAAC,CAAC;YACnC,YAAY,GAAG,CAAC,YAAY,GAAG,UAAU,CAAC,GAAG,YAAY,CAAC;YAC1D,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC/C,CAAC;QAED,EAAE,aAAa,CAAC;IAClB,CAAC;IAED,MAAM,MAAM,GAAG,IAAI,GAAG,EAA0B,CAAC;IACjD,KAAK,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC;QAC/B,IAAA,qBAAM,EAAC,SAAS,KAAK,IAAI,CAAC,WAAW,IAAI,SAAS,KAAK,IAAI,CAAC,oBAAoB,CAAC,CAAC;QAClF,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAClE,MAAM,MAAM,GAAmB;YAC7B,GAAG,IAAI,CAAC,MAAM;YACd,QAAQ;YACR,QAAQ,EAAE;gBACR,OAAO;gBACP,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE;gBAC/C,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,CAAC,YAAY,EAAE;aAC/D;SACF,CAAC;QAEF,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IACzB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AArDD,kDAqDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { assert, Uint32ArrayBuilder, Uint8ArrayBuilder } from \"@itwin/core-bentley\";\r\nimport { ColorDef, RenderFeatureTable, RenderMaterial } from \"@itwin/core-common\";\r\nimport { calculateEdgeTableParams, EdgeParams, EdgeTable, IndexedEdgeParams } from \"./EdgeParams\";\r\nimport { computeDimensions, VertexTable } from \"./VertexTable\";\r\nimport { VertexIndices } from \"./VertexIndices\";\r\nimport { createSurfaceMaterial, SurfaceMaterial } from \"./SurfaceParams\";\r\nimport { MaterialParams } from \"../../render/MaterialParams\";\r\nimport { MeshParams } from \"./MeshParams\";\r\nimport { PointStringParams } from \"./PointStringParams\";\r\nimport { PolylineParams, TesselatedPolyline } from \"./PolylineParams\";\r\n\r\n/** @internal */\r\nexport interface VertexTableWithIndices {\r\n vertices: VertexTable;\r\n indices: VertexIndices;\r\n material?: SurfaceMaterial;\r\n}\r\n\r\n/** Builds up a [[VertexIndices]].\r\n * Exported strictly for tests.\r\n * @internal\r\n */\r\nexport class IndexBuffer {\r\n private readonly _builder: Uint8ArrayBuilder;\r\n private readonly _index32 = new Uint32Array(1);\r\n private readonly _index8 = new Uint8Array(this._index32.buffer, 0, 3);\r\n\r\n public constructor(initialCapacity = 3) {\r\n this._builder = new Uint8ArrayBuilder({ initialCapacity: initialCapacity * 3 });\r\n }\r\n\r\n public get numIndices(): number {\r\n assert((this._builder.length % 3) === 0);\r\n return this._builder.length / 3;\r\n }\r\n\r\n public push(index: number): void {\r\n this._index32[0] = index;\r\n this._builder.append(this._index8);\r\n }\r\n\r\n public toVertexIndices(): VertexIndices {\r\n return new VertexIndices(this._builder.toTypedArray());\r\n }\r\n}\r\n\r\n/** Builds up a [[VertexTable]]. */\r\nclass VertexBuffer {\r\n private readonly _builder: Uint32ArrayBuilder;\r\n private readonly _source: VertexTable;\r\n\r\n /** `source` is the original table containing the vertex data from which individual vertices will be obtained. */\r\n public constructor(source: VertexTable) {\r\n this._source = source;\r\n this._builder = new Uint32ArrayBuilder({ initialCapacity: 3 * source.numRgbaPerVertex });\r\n }\r\n\r\n /** The number of vertices currently in the table. */\r\n public get length(): number {\r\n assert((this._builder.length % this.vertexSize) === 0);\r\n return this._builder.length / this.vertexSize;\r\n }\r\n\r\n /** The number of 32-bit unsigned integers (RGBA values) per vertex. */\r\n public get vertexSize(): number {\r\n return this._source.numRgbaPerVertex;\r\n }\r\n\r\n /** Append a vertex. `vertex` must be of size [[vertexSize]]. */\r\n public push(vertex: Uint32Array): void {\r\n assert(vertex.length === this.vertexSize);\r\n this._builder.append(vertex);\r\n }\r\n\r\n /** Construct the finished vertex table. */\r\n public buildVertexTable(maxDimension: number, colorTable: ColorTable | undefined, materialAtlasTable: MaterialAtlasTable): VertexTable {\r\n const source = this._source;\r\n colorTable = colorTable ?? source.uniformColor;\r\n assert(undefined !== colorTable);\r\n\r\n const colorTableLength = colorTable instanceof Uint32Array ? colorTable.length : 0;\r\n const materialAtlasTableLength = materialAtlasTable instanceof Uint32Array ? materialAtlasTable.length : 0;\r\n const dimensions = computeDimensions(this.length, this.vertexSize, colorTableLength + materialAtlasTableLength, maxDimension);\r\n\r\n let rgbaData = this._builder.toTypedArray();\r\n if (dimensions.width * dimensions.height > rgbaData.length) {\r\n const prevData = rgbaData;\r\n rgbaData = new Uint32Array(dimensions.width * dimensions.height);\r\n rgbaData.set(prevData, 0);\r\n }\r\n\r\n let tableSize = this.vertexSize * this.length;\r\n if (colorTable instanceof Uint32Array) {\r\n rgbaData.set(colorTable, tableSize);\r\n tableSize += colorTable.length;\r\n }\r\n\r\n if (materialAtlasTable instanceof Uint32Array)\r\n rgbaData.set(materialAtlasTable, tableSize);\r\n\r\n return {\r\n data: new Uint8Array(rgbaData.buffer, rgbaData.byteOffset, rgbaData.byteLength),\r\n usesUnquantizedPositions: source.usesUnquantizedPositions,\r\n qparams: source.qparams,\r\n width: dimensions.width,\r\n height: dimensions.height,\r\n hasTranslucency: source.hasTranslucency,\r\n uniformColor: colorTable instanceof ColorDef ? colorTable : undefined,\r\n featureIndexType: source.featureIndexType,\r\n uniformFeatureID: source.uniformFeatureID,\r\n numVertices: this.length,\r\n numRgbaPerVertex: source.numRgbaPerVertex,\r\n uvParams: source.uvParams,\r\n };\r\n }\r\n}\r\n\r\ntype ColorTable = Uint32Array | ColorDef;\r\n\r\n/** Remaps portions of a source color table into a filtered target color table. */\r\nclass ColorTableRemapper {\r\n private readonly _remappedIndices = new Map<number, number>();\r\n private readonly _colorTable: Uint32Array;\r\n public readonly colors: number[] = [];\r\n private readonly _32 = new Uint32Array(1);\r\n private readonly _16 = new Uint16Array(this._32.buffer);\r\n\r\n public constructor(colorTable: Uint32Array) {\r\n this._colorTable = colorTable;\r\n }\r\n\r\n /** Extract the color index stored in `vertex`, ensure it is present in the remapped color table, and return its index in that table. */\r\n public remap(vertex: Uint32Array, usesUnquantizedPositions: boolean | undefined): void {\r\n const vertIndex = usesUnquantizedPositions ? 4 : 1;\r\n const shortIndex = usesUnquantizedPositions ? 0 : 1;\r\n this._32[0] = vertex[vertIndex];\r\n const oldIndex = this._16[shortIndex];\r\n let newIndex = this._remappedIndices.get(oldIndex);\r\n if (undefined === newIndex) {\r\n newIndex = this.colors.length;\r\n this._remappedIndices.set(oldIndex, newIndex);\r\n const color = this._colorTable[oldIndex];\r\n this.colors.push(color);\r\n }\r\n\r\n this._16[shortIndex] = newIndex;\r\n vertex[vertIndex] = this._32[0];\r\n }\r\n\r\n /** Construct the finished color table. */\r\n public buildColorTable(): ColorTable {\r\n assert(this.colors.length > 0);\r\n return this.colors.length > 1 ? new Uint32Array(this.colors) : ColorDef.fromAbgr(this.colors[0]);\r\n }\r\n}\r\n\r\ntype MaterialAtlasTable = Uint32Array | SurfaceMaterial | undefined;\r\n\r\ntype CreateRenderMaterial = (args: MaterialParams) => RenderMaterial | undefined;\r\n\r\nclass MaterialAtlasRemapper {\r\n private readonly _remappedIndices = new Map<number, number>();\r\n private readonly _atlasTable: Uint32Array;\r\n private readonly _createMaterial: CreateRenderMaterial;\r\n public readonly materials: number[] = [];\r\n private readonly _32 = new Uint32Array(1);\r\n private readonly _8 = new Uint8Array(this._32.buffer);\r\n\r\n public constructor(_atlasTable: Uint32Array, createMaterial: CreateRenderMaterial) {\r\n this._atlasTable = _atlasTable;\r\n this._createMaterial = createMaterial;\r\n }\r\n\r\n /** Extract the mat index stored in `vertex`, ensure it is present in the remapped atlas table, and return its index in that table. */\r\n public remap(vertex: Uint32Array, usesUnquantizedPositions: boolean | undefined): void {\r\n const vertIndex = usesUnquantizedPositions ? 3 : 2;\r\n this._32[0] = vertex[vertIndex];\r\n const oldIndex = this._8[3];\r\n let newIndex = this._remappedIndices.get(oldIndex);\r\n if (undefined === newIndex) {\r\n newIndex = this.materials.length / 4;\r\n this._remappedIndices.set(oldIndex, newIndex);\r\n let index = oldIndex * 4;\r\n this.materials.push(this._atlasTable[index++]);\r\n this.materials.push(this._atlasTable[index++]);\r\n this.materials.push(this._atlasTable[index++]);\r\n this.materials.push(this._atlasTable[index]);\r\n }\r\n\r\n this._8[3] = newIndex;\r\n vertex[vertIndex] = this._32[0];\r\n }\r\n\r\n private unpackFloat(value: number): number {\r\n this._32[0] = value;\r\n const valUint32 = this._32[0];\r\n const bias = 38.0;\r\n const temp = (valUint32 >>> 24) / 2.0;\r\n let exponent = Math.floor(temp);\r\n let sign = (temp - exponent) * 2.0;\r\n sign = -(sign * 2.0 - 1.0);\r\n const base = sign * (valUint32 & 0xffffff) / 16777216.0;\r\n exponent = exponent - bias;\r\n return base * Math.pow(10.0, exponent);\r\n }\r\n\r\n private materialFromAtlasEntry(entry: Uint32Array): SurfaceMaterial | undefined {\r\n const rgbOverridden = (entry[1] & 0x1000000) !== 0;\r\n const alphaOverridden = (entry[1] & 0x2000000) !== 0;\r\n const args: MaterialParams = {\r\n alpha: alphaOverridden ? (entry[0] >>> 24) / 255.0 : undefined,\r\n diffuse: {\r\n color: rgbOverridden ? ColorDef.fromTbgr(entry[0] & 0xffffff) : undefined,\r\n weight: ((entry[1] >>> 8) & 0xff) / 255.0,\r\n },\r\n specular: {\r\n color: ColorDef.fromTbgr(entry[2]),\r\n weight: ((entry[1] >>> 16) & 0xff) / 255.0,\r\n exponent: this.unpackFloat(entry[3]),\r\n },\r\n };\r\n\r\n const material = this._createMaterial(args);\r\n return createSurfaceMaterial(material);\r\n }\r\n\r\n /** Construct the finished color table. */\r\n public buildAtlasTable(): MaterialAtlasTable {\r\n assert(this.materials.length > 0);\r\n const m = new Uint32Array(this.materials);\r\n return this.materials.length > 4 ? m : this.materialFromAtlasEntry(m);\r\n }\r\n}\r\n\r\n/** A node in a split vertex table. Each node corresponds to one or more elements. */\r\nclass Node {\r\n public readonly vertices: VertexBuffer;\r\n public readonly remappedIndices = new Map<number, number>();\r\n public readonly indices = new IndexBuffer();\r\n public readonly colors?: ColorTableRemapper;\r\n public readonly atlas?: MaterialAtlasRemapper;\r\n public readonly usesUnquantizedPositions?: boolean;\r\n\r\n /** `vertexTable` is the source table containing vertex data for all nodes, from which this node will extract the vertices belong to it. */\r\n public constructor(vertexTable: VertexTable, atlas?: AtlasInfo) {\r\n this.vertices = new VertexBuffer(vertexTable);\r\n if (undefined === vertexTable.uniformColor)\r\n this.colors = new ColorTableRemapper(new Uint32Array(vertexTable.data.buffer, vertexTable.data.byteOffset + 4 * vertexTable.numVertices * vertexTable.numRgbaPerVertex));\r\n\r\n if (atlas) {\r\n const atlasOffset = (vertexTable.numVertices * vertexTable.numRgbaPerVertex + atlas.offset) * 4;\r\n this.atlas = new MaterialAtlasRemapper(new Uint32Array(vertexTable.data.buffer, vertexTable.data.byteOffset + atlasOffset), atlas.createMaterial);\r\n }\r\n\r\n this.usesUnquantizedPositions = vertexTable.usesUnquantizedPositions;\r\n }\r\n\r\n public addVertex(originalIndex: number, vertex: Uint32Array): void {\r\n let newIndex = this.remappedIndices.get(originalIndex);\r\n if (undefined === newIndex) {\r\n newIndex = this.vertices.length;\r\n this.remappedIndices.set(originalIndex, newIndex);\r\n\r\n this.colors?.remap(vertex, this.usesUnquantizedPositions);\r\n this.atlas?.remap(vertex, this.usesUnquantizedPositions);\r\n this.vertices.push(vertex);\r\n }\r\n\r\n this.indices.push(newIndex);\r\n }\r\n\r\n public buildOutput(maxDimension: number, surfaceMaterial?: SurfaceMaterial): VertexTableWithIndices {\r\n const materialAtlas = this.atlas?.buildAtlasTable();\r\n\r\n let material: SurfaceMaterial | undefined;\r\n if (materialAtlas instanceof Uint32Array) {\r\n const colorTableOffset = undefined !== this.colors?.colors.length && this.colors?.colors.length > 1 ? this.colors?.colors.length : 0;\r\n material = {\r\n isAtlas: true,\r\n hasTranslucency: (surfaceMaterial?.isAtlas && surfaceMaterial?.hasTranslucency) ?? false,\r\n overridesAlpha: (surfaceMaterial?.isAtlas && surfaceMaterial?.overridesAlpha) ?? false,\r\n vertexTableOffset: colorTableOffset,\r\n numMaterials: materialAtlas.length / 4,\r\n };\r\n } else {\r\n material = materialAtlas;\r\n }\r\n\r\n return {\r\n indices: this.indices.toVertexIndices(),\r\n vertices: this.vertices.buildVertexTable(maxDimension, this.colors?.buildColorTable(), materialAtlas),\r\n material,\r\n };\r\n }\r\n}\r\n\r\ninterface AtlasInfo {\r\n offset: number;\r\n createMaterial: CreateRenderMaterial;\r\n}\r\n\r\ninterface VertexTableSplitArgs extends VertexTableWithIndices {\r\n featureTable: RenderFeatureTable;\r\n atlasInfo?: AtlasInfo;\r\n}\r\n\r\n/** @internal */\r\nexport type ComputeAnimationNodeId = (featureIndex: number) => number;\r\n\r\nclass VertexTableSplitter {\r\n private readonly _input: VertexTableSplitArgs;\r\n private readonly _computeNodeId: ComputeAnimationNodeId;\r\n private readonly _nodes = new Map<number, Node>();\r\n\r\n private constructor(input: VertexTableSplitArgs, computeNodeId: ComputeAnimationNodeId) {\r\n this._input = input;\r\n this._computeNodeId = computeNodeId;\r\n }\r\n\r\n /** Split the source into one or more output nodes, returning a mapping of integer node Id to node. */\r\n public static split(source: VertexTableSplitArgs, computeNodeId: ComputeAnimationNodeId): Map<number, Node> {\r\n const splitter = new VertexTableSplitter(source, computeNodeId);\r\n splitter.split();\r\n return splitter._nodes;\r\n }\r\n\r\n private split(): void {\r\n // Track the most recent feature and corresponding node to avoid repeated lookups - vertices for\r\n // individual features are largely contiguous.\r\n const curState = {\r\n featureIndex: -1,\r\n node: undefined as unknown as Node,\r\n };\r\n\r\n const vertSize = this._input.vertices.numRgbaPerVertex;\r\n const vertex = new Uint32Array(vertSize);\r\n const vertexTable = new Uint32Array(this._input.vertices.data.buffer, this._input.vertices.data.byteOffset, this._input.vertices.numVertices * vertSize);\r\n\r\n let extractFeatureIndex: () => number;\r\n if (this._input.vertices.usesUnquantizedPositions) {\r\n const vertexBytes = new Uint8Array(vertex.buffer);\r\n extractFeatureIndex = () => {\r\n return vertexBytes[3]\r\n | (vertexBytes[7] << 8)\r\n | (vertexBytes[11] << 16);\r\n };\r\n } else {\r\n extractFeatureIndex = () => vertex[2] & 0x00ffffff;\r\n }\r\n\r\n for (const index of this._input.indices) {\r\n // Extract the data for this vertex without allocating new typed arrays.\r\n const vertexOffset = index * vertSize;\r\n for (let i = 0; i < vertex.length; i++)\r\n vertex[i] = vertexTable[vertexOffset + i];\r\n\r\n // Determine to which element the vertex belongs and find the corresponding Node.\r\n const featureIndex = extractFeatureIndex();\r\n if (curState.featureIndex !== featureIndex) {\r\n curState.featureIndex = featureIndex;\r\n const nodeId = this._computeNodeId(featureIndex);\r\n let node = this._nodes.get(nodeId);\r\n if (undefined === node)\r\n this._nodes.set(nodeId, node = new Node(this._input.vertices, this._input.atlasInfo));\r\n\r\n curState.node = node;\r\n }\r\n\r\n // Add the vertex to the appropriate node.\r\n curState.node.addVertex(index, vertex);\r\n }\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport interface SplitVertexTableArgs {\r\n featureTable: RenderFeatureTable;\r\n maxDimension: number;\r\n computeNodeId: ComputeAnimationNodeId;\r\n}\r\n\r\n/** @internal */\r\nexport interface SplitPointStringArgs extends SplitVertexTableArgs {\r\n params: PointStringParams;\r\n}\r\n\r\n/** Given a PointStringParams and a function that can associate a node Id with an element Id, produce a mapping of nodes to PointStringParams, splitting up\r\n * the input params as needed.\r\n * @internal\r\n */\r\nexport function splitPointStringParams(args: SplitPointStringArgs): Map<number, PointStringParams> {\r\n const nodes = VertexTableSplitter.split({\r\n indices: args.params.indices,\r\n vertices: args.params.vertices,\r\n featureTable: args.featureTable,\r\n }, args.computeNodeId);\r\n\r\n const result = new Map<number, PointStringParams>();\r\n for (const [id, node] of nodes) {\r\n const { vertices, indices } = node.buildOutput(args.maxDimension);\r\n result.set(id, { vertices, indices, weight: args.params.weight });\r\n }\r\n\r\n return result;\r\n}\r\n\r\ninterface RemappedSegmentEdges {\r\n indices: IndexBuffer;\r\n endPointAndQuadIndices: Uint32ArrayBuilder;\r\n}\r\n\r\ninterface RemappedSilhouetteEdges extends RemappedSegmentEdges {\r\n normalPairs: Uint32ArrayBuilder;\r\n}\r\n\r\nclass RemappedPolylineEdges {\r\n public readonly indices = new IndexBuffer();\r\n public readonly prevIndices = new IndexBuffer();\r\n public readonly nextIndicesAndParams = new Uint32ArrayBuilder();\r\n}\r\n\r\ninterface RemappedIndexEdges {\r\n edges: Uint8ArrayBuilder;\r\n silhouettes: Uint8ArrayBuilder;\r\n}\r\n\r\ninterface RemappedEdges {\r\n segments?: RemappedSegmentEdges;\r\n silhouettes?: RemappedSilhouetteEdges;\r\n polylines?: RemappedPolylineEdges;\r\n indexed?: RemappedIndexEdges;\r\n}\r\n\r\ninterface RemappedIndex {\r\n node: Node;\r\n id: number;\r\n index: number;\r\n}\r\n\r\nfunction remapIndex(out: RemappedIndex, srcIndex: number, nodes: Map<number, Node>): boolean {\r\n for (const [id, node] of nodes) {\r\n const index = node.remappedIndices.get(srcIndex);\r\n if (undefined !== index) {\r\n out.index = index;\r\n out.node = node;\r\n out.id = id;\r\n return true;\r\n }\r\n }\r\n\r\n assert(false);\r\n return false;\r\n}\r\n\r\nfunction remapSegmentEdges(type: \"segments\" | \"silhouettes\", source: EdgeParams, nodes: Map<number, Node>, edges: Map<number, RemappedEdges>): void {\r\n const src = source[type];\r\n if (!src)\r\n return;\r\n\r\n const srcEndPts = new Uint32Array(src.endPointAndQuadIndices.buffer, src.endPointAndQuadIndices.byteOffset, src.endPointAndQuadIndices.length / 4);\r\n let srcNormalPairs;\r\n if (type === \"silhouettes\") {\r\n assert(undefined !== source.silhouettes);\r\n srcNormalPairs = new Uint32Array(source.silhouettes.normalPairs.buffer, source.silhouettes.normalPairs.byteOffset, source.silhouettes.normalPairs.length / 4);\r\n }\r\n\r\n let curIndexIndex = 0;\r\n const remappedIndex = { } as unknown as RemappedIndex;\r\n for (const srcIndex of src.indices) {\r\n if (remapIndex(remappedIndex, srcIndex, nodes)) {\r\n let endPointAndQuad = srcEndPts[curIndexIndex];\r\n const otherIndex = (endPointAndQuad & 0x00ffffff) >>> 0;\r\n const newOtherIndex = remappedIndex.node.remappedIndices.get(otherIndex);\r\n assert(undefined !== newOtherIndex);\r\n endPointAndQuad = (endPointAndQuad & 0xff000000) | newOtherIndex;\r\n\r\n let entry = edges.get(remappedIndex.id);\r\n if (!entry)\r\n edges.set(remappedIndex.id, entry = { });\r\n\r\n if (srcNormalPairs) {\r\n if (!entry.silhouettes)\r\n entry.silhouettes = { indices: new IndexBuffer(), endPointAndQuadIndices: new Uint32ArrayBuilder(), normalPairs: new Uint32ArrayBuilder() };\r\n\r\n entry.silhouettes.normalPairs.push(srcNormalPairs[curIndexIndex]);\r\n } else if (!entry.segments) {\r\n entry.segments = { indices: new IndexBuffer(), endPointAndQuadIndices: new Uint32ArrayBuilder() };\r\n }\r\n\r\n const segments = entry[type];\r\n assert(undefined !== segments);\r\n\r\n segments.indices.push(remappedIndex.index);\r\n segments.endPointAndQuadIndices.push(endPointAndQuad);\r\n }\r\n\r\n ++curIndexIndex;\r\n }\r\n}\r\n\r\nfunction remapPolylineEdges(src: TesselatedPolyline, nodes: Map<number, Node>, edges: Map<number, RemappedEdges>): void {\r\n const srcNextAndParam = new Uint32Array(src.nextIndicesAndParams.buffer, src.nextIndicesAndParams.byteOffset, src.nextIndicesAndParams.length / 4);\r\n const prevIter = src.prevIndices[Symbol.iterator]();\r\n let curIndexIndex = 0;\r\n const remappedIndex = { } as unknown as RemappedIndex;\r\n for (const srcIndex of src.indices) {\r\n if (remapIndex(remappedIndex, srcIndex, nodes)) {\r\n const prevIndex = prevIter.next().value;\r\n assert(undefined !== prevIndex);\r\n const newPrevIndex = remappedIndex.node.remappedIndices.get(prevIndex);\r\n assert(undefined !== newPrevIndex);\r\n\r\n let nextAndParam = srcNextAndParam[curIndexIndex];\r\n const nextIndex = (nextAndParam & 0x00ffffff) >>> 0;\r\n const newNextIndex = remappedIndex.node.remappedIndices.get(nextIndex);\r\n assert(undefined !== newNextIndex);\r\n nextAndParam = (nextAndParam & 0xff000000) | newNextIndex;\r\n\r\n let entry = edges.get(remappedIndex.id);\r\n if (!entry)\r\n edges.set(remappedIndex.id, entry = { });\r\n\r\n if (!entry.polylines)\r\n entry.polylines = new RemappedPolylineEdges();\r\n\r\n entry.polylines.indices.push(remappedIndex.index);\r\n entry.polylines.prevIndices.push(newPrevIndex);\r\n entry.polylines.nextIndicesAndParams.push(nextAndParam);\r\n }\r\n\r\n ++curIndexIndex;\r\n }\r\n}\r\n\r\nfunction remapIndexedEdges(src: IndexedEdgeParams, nodes: Map<number, Node>, edges: Map<number, RemappedEdges>): void {\r\n const srcEdgeData = src.edges.data;\r\n const numSegments = src.edges.numSegments;\r\n const silhouetteStartByteIndex = numSegments * 6 + src.edges.silhouettePadding;\r\n\r\n function getUint24EdgePair(byteIndex: number): [number, number] {\r\n return [srcEdgeData[byteIndex + 0] | (srcEdgeData[byteIndex + 1] << 8) | srcEdgeData[byteIndex + 2] << 16,\r\n srcEdgeData[byteIndex + 3] | (srcEdgeData[byteIndex + 4] << 8) | srcEdgeData[byteIndex + 5] << 16];\r\n }\r\n\r\n function setUint24EdgePair(indEdges: RemappedIndexEdges, value1: number, value2: number): void {\r\n indEdges.edges.push(value1 & 0x0000ff);\r\n indEdges.edges.push((value1 & 0x00ff00) >>> 8);\r\n indEdges.edges.push((value1 & 0xff0000) >>> 16);\r\n indEdges.edges.push(value2 & 0x0000ff);\r\n indEdges.edges.push((value2 & 0x00ff00) >>> 8);\r\n indEdges.edges.push((value2 & 0xff0000) >>> 16);\r\n }\r\n\r\n function getUint24SilPair(byteIndex: number): [number, number, number, number] {\r\n return [srcEdgeData[byteIndex + 0] | (srcEdgeData[byteIndex + 1] << 8) | srcEdgeData[byteIndex + 2] << 16,\r\n srcEdgeData[byteIndex + 3] | (srcEdgeData[byteIndex + 4] << 8) | srcEdgeData[byteIndex + 5] << 16,\r\n srcEdgeData[byteIndex + 6] | (srcEdgeData[byteIndex + 7] << 8), srcEdgeData[byteIndex + 8] | (srcEdgeData[byteIndex + 9] << 8)];\r\n }\r\n\r\n function setUint24SilPair(indSil: RemappedIndexEdges, value1: number, value2: number, norm1: number, norm2: number): void {\r\n indSil.silhouettes.push(value1 & 0x0000ff);\r\n indSil.silhouettes.push((value1 & 0x00ff00) >>> 8);\r\n indSil.silhouettes.push((value1 & 0xff0000) >>> 16);\r\n indSil.silhouettes.push(value2 & 0x0000ff);\r\n indSil.silhouettes.push((value2 & 0x00ff00) >>> 8);\r\n indSil.silhouettes.push((value2 & 0xff0000) >>> 16);\r\n indSil.silhouettes.push(norm1 & 0x0000ff);\r\n indSil.silhouettes.push((norm1 & 0x00ff00) >>> 8);\r\n indSil.silhouettes.push(norm2 & 0x0000ff);\r\n indSil.silhouettes.push((norm2 & 0x00ff00) >>> 8);\r\n }\r\n\r\n let maxIndex = 0;\r\n for (const srcIndex of src.indices)\r\n maxIndex = Math.max (srcIndex, maxIndex);\r\n\r\n const remappedIndex = { } as unknown as RemappedIndex;\r\n let es1Index = 0, es2Index = 0, n1 = 0, n2 = 0;\r\n for (let curSegment = 0, byteIndex = 0; curSegment <= maxIndex; ++curSegment) {\r\n if (curSegment < numSegments) { // edges\r\n [es1Index, es2Index] = getUint24EdgePair(byteIndex);\r\n byteIndex += 6;\r\n } else { // silhouettes\r\n byteIndex = silhouetteStartByteIndex + (curSegment - numSegments) * 10;\r\n [es1Index, es2Index, n1, n2] = getUint24SilPair(byteIndex);\r\n }\r\n\r\n if (remapIndex(remappedIndex, es1Index, nodes)) {\r\n let entry = edges.get(remappedIndex.id);\r\n if (!entry)\r\n edges.set(remappedIndex.id, entry = { });\r\n\r\n if (!entry.indexed)\r\n entry.indexed = { edges: new Uint8ArrayBuilder(), silhouettes: new Uint8ArrayBuilder() };\r\n\r\n if (curSegment < numSegments) { // edges\r\n const newE1Index = remappedIndex.node.remappedIndices.get(es1Index);\r\n assert(undefined !== newE1Index);\r\n const newE2Index = remappedIndex.node.remappedIndices.get(es2Index);\r\n assert(undefined !== newE2Index);\r\n setUint24EdgePair(entry.indexed, newE1Index, newE2Index);\r\n } else { // silhouettes\r\n const newS1Index = remappedIndex.node.remappedIndices.get(es1Index);\r\n assert(undefined !== newS1Index);\r\n const newS2Index = remappedIndex.node.remappedIndices.get(es2Index);\r\n assert(undefined !== newS2Index);\r\n setUint24SilPair(entry.indexed, newS1Index, newS2Index, n1, n2);\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction splitEdges(source: EdgeParams, nodes: Map<number, Node>, maxDimension: number): Map<number, EdgeParams> {\r\n const edges = new Map<number, RemappedEdges>();\r\n remapSegmentEdges(\"segments\", source, nodes, edges);\r\n remapSegmentEdges(\"silhouettes\", source, nodes, edges);\r\n\r\n if (source.polylines)\r\n remapPolylineEdges(source.polylines, nodes, edges);\r\n\r\n if (source.indexed)\r\n remapIndexedEdges(source.indexed, nodes, edges);\r\n\r\n const result = new Map<number, EdgeParams>();\r\n for (const [id, remappedEdges] of edges) {\r\n if (!remappedEdges.segments && !remappedEdges.silhouettes && !remappedEdges.indexed)\r\n continue;\r\n\r\n let edgeTable = { } as unknown as EdgeTable;\r\n let edgeIndices = { } as unknown as VertexIndices;\r\n if (remappedEdges.indexed) {\r\n const numSegmentEdges = remappedEdges.indexed.edges.length / 6;\r\n const numSilhouettes = remappedEdges.indexed.silhouettes.length / 10;\r\n const { width, height, silhouettePadding, silhouetteStartByteIndex } = calculateEdgeTableParams(numSegmentEdges, numSilhouettes, maxDimension);\r\n const data = new Uint8Array(width * height * 4);\r\n data.set(remappedEdges.indexed.edges.toTypedArray(), 0);\r\n if (numSilhouettes > 0)\r\n data.set(remappedEdges.indexed.silhouettes.toTypedArray(), silhouetteStartByteIndex + silhouettePadding);\r\n\r\n const numTotalEdges = numSegmentEdges + numSilhouettes;\r\n edgeIndices = new VertexIndices(new Uint8Array(numTotalEdges * 6 * 3));\r\n for (let i = 0; i < numTotalEdges; i++)\r\n for (let j = 0; j < 6; j++)\r\n edgeIndices.setNthIndex(i * 6 + j, i);\r\n\r\n edgeTable = {\r\n data,\r\n width,\r\n height,\r\n numSegments: numSegmentEdges,\r\n silhouettePadding,\r\n };\r\n }\r\n\r\n result.set(id, {\r\n weight: source.weight,\r\n linePixels: source.linePixels,\r\n segments: remappedEdges.segments ? {\r\n indices: remappedEdges.segments.indices.toVertexIndices(),\r\n endPointAndQuadIndices: remappedEdges.segments.endPointAndQuadIndices.toUint8Array(),\r\n } : undefined,\r\n silhouettes: remappedEdges.silhouettes ? {\r\n indices: remappedEdges.silhouettes.indices.toVertexIndices(),\r\n endPointAndQuadIndices: remappedEdges.silhouettes.endPointAndQuadIndices.toUint8Array(),\r\n normalPairs: remappedEdges.silhouettes.normalPairs.toUint8Array(),\r\n } : undefined,\r\n polylines: remappedEdges.polylines ? {\r\n indices: remappedEdges.polylines.indices.toVertexIndices(),\r\n prevIndices: remappedEdges.polylines.prevIndices.toVertexIndices(),\r\n nextIndicesAndParams: remappedEdges.polylines.nextIndicesAndParams.toUint8Array(),\r\n } : undefined,\r\n indexed: remappedEdges.indexed ? {\r\n indices: edgeIndices,\r\n edges: edgeTable,\r\n } : undefined,\r\n });\r\n }\r\n\r\n return result;\r\n}\r\n\r\n/** @internal */\r\nexport interface SplitMeshArgs extends SplitVertexTableArgs {\r\n params: MeshParams;\r\n createMaterial: CreateRenderMaterial;\r\n}\r\n\r\n/** @internal */\r\nexport function splitMeshParams(args: SplitMeshArgs): Map<number, MeshParams> {\r\n const result = new Map<number, MeshParams>();\r\n\r\n const mat = args.params.surface.material;\r\n const atlasOffset = undefined !== mat && mat.isAtlas ? mat.vertexTableOffset : undefined;\r\n const atlasInfo = undefined !== atlasOffset ? { offset: atlasOffset, createMaterial: args.createMaterial } : undefined;\r\n\r\n const nodes = VertexTableSplitter.split({\r\n indices: args.params.surface.indices,\r\n vertices: args.params.vertices,\r\n featureTable: args.featureTable,\r\n atlasInfo,\r\n }, args.computeNodeId);\r\n\r\n const edges = args.params.edges ? splitEdges(args.params.edges, nodes, args.maxDimension) : undefined;\r\n\r\n for (const [id, node] of nodes) {\r\n const { vertices, indices, material } = node.buildOutput(args.maxDimension, args.params.surface.material);\r\n const params: MeshParams = {\r\n vertices,\r\n surface: {\r\n type: args.params.surface.type,\r\n indices,\r\n fillFlags: args.params.surface.fillFlags,\r\n hasBakedLighting: args.params.surface.hasBakedLighting,\r\n textureMapping: args.params.surface.textureMapping,\r\n material: material !== undefined ? material : args.params.surface.material,\r\n },\r\n edges: edges?.get(id),\r\n isPlanar: args.params.isPlanar,\r\n // ###TODO handle aux channels.......\r\n auxChannels: args.params.auxChannels,\r\n };\r\n\r\n result.set(id, params);\r\n }\r\n\r\n return result;\r\n}\r\n\r\n/** @internal */\r\nexport interface SplitPolylineArgs extends SplitVertexTableArgs {\r\n params: PolylineParams;\r\n}\r\n\r\ninterface PolylineNode extends Node {\r\n prevIndices?: IndexBuffer;\r\n nextIndicesAndParams?: Uint32ArrayBuilder;\r\n}\r\n\r\n/** @internal */\r\nexport function splitPolylineParams(args: SplitPolylineArgs): Map<number, PolylineParams> {\r\n const nodes = VertexTableSplitter.split({\r\n indices: args.params.polyline.indices,\r\n vertices: args.params.vertices,\r\n featureTable: args.featureTable,\r\n }, args.computeNodeId) as Map<number, PolylineNode>;\r\n\r\n const src = args.params.polyline;\r\n const srcNextAndParam = new Uint32Array(src.nextIndicesAndParams.buffer, src.nextIndicesAndParams.byteOffset, src.nextIndicesAndParams.length / 4);\r\n let curIndexIndex = 0;\r\n const remappedIndex = { } as unknown as RemappedIndex;\r\n for (const prevIndex of src.prevIndices) {\r\n if (remapIndex(remappedIndex, prevIndex, nodes)) {\r\n const node = remappedIndex.node as PolylineNode;\r\n if (!node.prevIndices) {\r\n assert(undefined === node.nextIndicesAndParams);\r\n node.prevIndices = new IndexBuffer(node.indices.numIndices);\r\n node.nextIndicesAndParams = new Uint32ArrayBuilder({ initialCapacity: node.indices.numIndices });\r\n } else {\r\n assert(undefined !== node.nextIndicesAndParams);\r\n }\r\n\r\n node.prevIndices.push(remappedIndex.index);\r\n\r\n let nextAndParam = srcNextAndParam[curIndexIndex];\r\n const nextIndex = (nextAndParam & 0x00ffffff) >>> 0;\r\n const newNextIndex = remappedIndex.node.remappedIndices.get(nextIndex);\r\n assert(undefined !== newNextIndex);\r\n nextAndParam = (nextAndParam & 0xff000000) | newNextIndex;\r\n node.nextIndicesAndParams.push(nextAndParam);\r\n }\r\n\r\n ++curIndexIndex;\r\n }\r\n\r\n const result = new Map<number, PolylineParams>();\r\n for (const [id, node] of nodes) {\r\n assert(undefined !== node.prevIndices && undefined !== node.nextIndicesAndParams);\r\n const { vertices, indices } = node.buildOutput(args.maxDimension);\r\n const params: PolylineParams = {\r\n ...args.params,\r\n vertices,\r\n polyline: {\r\n indices,\r\n prevIndices: node.prevIndices.toVertexIndices(),\r\n nextIndicesAndParams: node.nextIndicesAndParams.toUint8Array(),\r\n },\r\n };\r\n\r\n result.set(id, params);\r\n }\r\n\r\n return result;\r\n}\r\n"]}
|
package/lib/esm/AccuDraw.d.ts
CHANGED
|
@@ -184,7 +184,10 @@ export declare class ThreeAxes {
|
|
|
184
184
|
* @public
|
|
185
185
|
*/
|
|
186
186
|
export declare class AccuDraw {
|
|
187
|
-
|
|
187
|
+
private _currentState;
|
|
188
|
+
/** Current AccuDraw state */
|
|
189
|
+
get currentState(): CurrentState;
|
|
190
|
+
set currentState(state: CurrentState);
|
|
188
191
|
compassMode: CompassMode;
|
|
189
192
|
rotationMode: RotationMode;
|
|
190
193
|
/** @internal */
|
|
@@ -399,6 +402,8 @@ export declare class AccuDraw {
|
|
|
399
402
|
decorate(context: DecorateContext): void;
|
|
400
403
|
private checkRotation;
|
|
401
404
|
private saveLockedCoords;
|
|
405
|
+
/** Called after compass state is changed between the active state and one of the disabled states */
|
|
406
|
+
onCompassDisplayChange(_state: "show" | "hide"): void;
|
|
402
407
|
/** Called after compass mode is changed between polar and rectangular */
|
|
403
408
|
onCompassModeChange(): void;
|
|
404
409
|
/** Called after compass rotation is changed */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccuDraw.d.ts","sourceRoot":"","sources":["../../src/AccuDraw.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EACwG,QAAQ,EAAyC,OAAO,EACtJ,KAAK,EAAE,SAAS,EAAE,QAAQ,EAC1C,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAe,QAAQ,EAAE,mBAAmB,EAAc,MAAM,oBAAoB,CAAC;AAE5F,OAAO,EAAqB,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAsB,MAAM,aAAa,CAAC;AAGxE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAY,aAAa,EAAwD,MAAM,cAAc,CAAC;AAE7G,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAQtD,gBAAgB;AAChB,oBAAY,aAAa;IACvB,IAAI,IAAI;IACR,Y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AAO;IA2C1C,2JAA2J;IACpJ,YAAY,CAAC,EAAE,EAAE,aAAa,GAAG,IAAI;IAI5C,iGAAiG;WACnF,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,aAAa,GAAE,OAAe,EAAE,QAAQ,GAAE,OAAe,GAAG,KAAK;IAkB3H;;OAEG;WACW,yBAAyB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,aAAa,GAAE,OAAe,EAAE,QAAQ,GAAE,OAAe,GAAG,OAAO,GAAG,SAAS;IAWhM;;OAEG;WACW,wBAAwB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,aAAa,GAAE,OAAe,EAAE,QAAQ,GAAE,OAAe,GAAG,OAAO,GAAG,SAAS;IAiBhM,iJAAiJ;WACnI,kBAAkB,CAAC,EAAE,EAAE,QAAQ,EAAE,aAAa,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS;IAKlI;;OAEG;WACW,eAAe,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS;IAKxF;;;;OAIG;WACW,kBAAkB,CAAC,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS;CA6B5F"}
|
package/lib/esm/AccuDraw.js
CHANGED
|
@@ -244,7 +244,7 @@ export class ThreeAxes {
|
|
|
244
244
|
*/
|
|
245
245
|
export class AccuDraw {
|
|
246
246
|
constructor() {
|
|
247
|
-
this.
|
|
247
|
+
this._currentState = CurrentState.NotEnabled;
|
|
248
248
|
this.compassMode = CompassMode.Rectangular; // Compass mode
|
|
249
249
|
this.rotationMode = RotationMode.View; // Compass rotation
|
|
250
250
|
/** @internal */
|
|
@@ -330,6 +330,16 @@ export class AccuDraw {
|
|
|
330
330
|
this.autoFocusFields = true;
|
|
331
331
|
this.autoPointPlacement = false;
|
|
332
332
|
}
|
|
333
|
+
/** Current AccuDraw state */
|
|
334
|
+
get currentState() { return this._currentState; }
|
|
335
|
+
set currentState(state) {
|
|
336
|
+
if (state === this._currentState)
|
|
337
|
+
return;
|
|
338
|
+
const wasActive = this.isActive;
|
|
339
|
+
this._currentState = state;
|
|
340
|
+
if (wasActive !== this.isActive)
|
|
341
|
+
this.onCompassDisplayChange(wasActive ? "hide" : "show");
|
|
342
|
+
}
|
|
333
343
|
/** @internal */
|
|
334
344
|
onInitialized() { this.enableForSession(); }
|
|
335
345
|
/** @internal */
|
|
@@ -1872,6 +1882,8 @@ export class AccuDraw {
|
|
|
1872
1882
|
this.saveCoordinate(ItemField.Z_Item, this.delta.z);
|
|
1873
1883
|
}
|
|
1874
1884
|
}
|
|
1885
|
+
/** Called after compass state is changed between the active state and one of the disabled states */
|
|
1886
|
+
onCompassDisplayChange(_state) { }
|
|
1875
1887
|
/** Called after compass mode is changed between polar and rectangular */
|
|
1876
1888
|
onCompassModeChange() { }
|
|
1877
1889
|
/** Called after compass rotation is changed */
|