@itwin/core-frontend 4.10.0-dev.2 → 4.10.0-dev.22
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 +33 -1
- package/lib/cjs/AccuSnap.d.ts.map +1 -1
- package/lib/cjs/AccuSnap.js +9 -5
- package/lib/cjs/AccuSnap.js.map +1 -1
- package/lib/cjs/DisplayStyleState.d.ts.map +1 -1
- package/lib/cjs/DisplayStyleState.js +5 -1
- package/lib/cjs/DisplayStyleState.js.map +1 -1
- package/lib/cjs/ElementLocateManager.d.ts +7 -1
- package/lib/cjs/ElementLocateManager.d.ts.map +1 -1
- package/lib/cjs/ElementLocateManager.js +34 -10
- package/lib/cjs/ElementLocateManager.js.map +1 -1
- package/lib/cjs/HitDetail.d.ts +4 -0
- package/lib/cjs/HitDetail.d.ts.map +1 -1
- package/lib/cjs/HitDetail.js +3 -0
- package/lib/cjs/HitDetail.js.map +1 -1
- package/lib/cjs/IModelConnection.d.ts +1 -0
- package/lib/cjs/IModelConnection.d.ts.map +1 -1
- package/lib/cjs/IModelConnection.js +2 -1
- package/lib/cjs/IModelConnection.js.map +1 -1
- package/lib/cjs/NoRenderApp.d.ts +1 -0
- package/lib/cjs/NoRenderApp.d.ts.map +1 -1
- package/lib/cjs/NoRenderApp.js +1 -0
- package/lib/cjs/NoRenderApp.js.map +1 -1
- package/lib/cjs/SheetViewState.d.ts +0 -1
- package/lib/cjs/SheetViewState.d.ts.map +1 -1
- package/lib/cjs/SheetViewState.js +0 -1
- package/lib/cjs/SheetViewState.js.map +1 -1
- package/lib/cjs/Viewport.d.ts +25 -1
- package/lib/cjs/Viewport.d.ts.map +1 -1
- package/lib/cjs/Viewport.js +20 -12
- package/lib/cjs/Viewport.js.map +1 -1
- package/lib/cjs/common/WorkerProxy.d.ts +8 -4
- package/lib/cjs/common/WorkerProxy.d.ts.map +1 -1
- package/lib/cjs/common/WorkerProxy.js.map +1 -1
- package/lib/cjs/common/imdl/ImdlModel.d.ts +3 -8
- package/lib/cjs/common/imdl/ImdlModel.d.ts.map +1 -1
- package/lib/cjs/common/imdl/ImdlModel.js.map +1 -1
- package/lib/cjs/common/internal/Symbols.d.ts +7 -0
- package/lib/cjs/common/internal/Symbols.d.ts.map +1 -1
- package/lib/cjs/common/internal/Symbols.js +8 -1
- package/lib/cjs/common/internal/Symbols.js.map +1 -1
- package/lib/cjs/common/internal/render/InstancedGraphicPropsBuilder.d.ts +15 -0
- package/lib/cjs/common/internal/render/InstancedGraphicPropsBuilder.d.ts.map +1 -0
- package/lib/cjs/common/internal/render/InstancedGraphicPropsBuilder.js +95 -0
- package/lib/cjs/common/internal/render/InstancedGraphicPropsBuilder.js.map +1 -0
- package/lib/cjs/common/internal/render/LineCode.d.ts +9 -0
- package/lib/cjs/common/internal/render/LineCode.d.ts.map +1 -0
- package/lib/cjs/common/internal/render/LineCode.js +31 -0
- package/lib/cjs/common/internal/render/LineCode.js.map +1 -0
- package/lib/cjs/common/internal/render/OvrFlags.d.ts +27 -0
- package/lib/cjs/common/internal/render/OvrFlags.d.ts.map +1 -0
- package/lib/cjs/common/internal/render/OvrFlags.js +10 -0
- package/lib/cjs/common/internal/render/OvrFlags.js.map +1 -0
- package/lib/cjs/common/internal/render/VertexTable.d.ts.map +1 -1
- package/lib/cjs/common/internal/render/VertexTable.js +3 -5
- package/lib/cjs/common/internal/render/VertexTable.js.map +1 -1
- package/lib/cjs/common/render/InstancedGraphicParams.d.ts +25 -1
- package/lib/cjs/common/render/InstancedGraphicParams.d.ts.map +1 -1
- package/lib/cjs/common/render/InstancedGraphicParams.js +59 -0
- package/lib/cjs/common/render/InstancedGraphicParams.js.map +1 -1
- package/lib/cjs/common/render/RenderInstancesParams.d.ts +76 -0
- package/lib/cjs/common/render/RenderInstancesParams.d.ts.map +1 -0
- package/lib/cjs/common/render/RenderInstancesParams.js +33 -0
- package/lib/cjs/common/render/RenderInstancesParams.js.map +1 -0
- package/lib/cjs/common.d.ts +1 -0
- package/lib/cjs/common.d.ts.map +1 -1
- package/lib/cjs/common.js +1 -0
- package/lib/cjs/common.js.map +1 -1
- package/lib/cjs/core-frontend.d.ts +1 -0
- package/lib/cjs/core-frontend.d.ts.map +1 -1
- package/lib/cjs/core-frontend.js +1 -0
- package/lib/cjs/core-frontend.js.map +1 -1
- package/lib/cjs/internal/render/PrimitiveBuilder.d.ts +4 -1
- package/lib/cjs/internal/render/PrimitiveBuilder.d.ts.map +1 -1
- package/lib/cjs/internal/render/PrimitiveBuilder.js +82 -35
- package/lib/cjs/internal/render/PrimitiveBuilder.js.map +1 -1
- package/lib/cjs/internal/render/RenderGeometry.d.ts +20 -0
- package/lib/cjs/internal/render/RenderGeometry.d.ts.map +1 -0
- package/lib/cjs/internal/render/RenderGeometry.js +10 -0
- package/lib/cjs/internal/render/RenderGeometry.js.map +1 -0
- package/lib/cjs/internal/render/RenderInstancesParamsImpl.d.ts +24 -0
- package/lib/cjs/internal/render/RenderInstancesParamsImpl.d.ts.map +1 -0
- package/lib/cjs/internal/render/RenderInstancesParamsImpl.js +69 -0
- package/lib/cjs/internal/render/RenderInstancesParamsImpl.js.map +1 -0
- package/lib/cjs/render/GraphicBranch.d.ts +10 -1
- package/lib/cjs/render/GraphicBranch.d.ts.map +1 -1
- package/lib/cjs/render/GraphicBranch.js.map +1 -1
- package/lib/cjs/render/GraphicBuilder.d.ts +17 -3
- package/lib/cjs/render/GraphicBuilder.d.ts.map +1 -1
- package/lib/cjs/render/GraphicBuilder.js +7 -1
- package/lib/cjs/render/GraphicBuilder.js.map +1 -1
- package/lib/cjs/render/GraphicTemplate.d.ts +76 -0
- package/lib/cjs/render/GraphicTemplate.d.ts.map +1 -0
- package/lib/cjs/render/GraphicTemplate.js +41 -0
- package/lib/cjs/render/GraphicTemplate.js.map +1 -0
- package/lib/cjs/render/MockRender.d.ts +12 -2
- package/lib/cjs/render/MockRender.d.ts.map +1 -1
- package/lib/cjs/render/MockRender.js +19 -5
- package/lib/cjs/render/MockRender.js.map +1 -1
- package/lib/cjs/render/Pixel.d.ts +6 -0
- package/lib/cjs/render/Pixel.d.ts.map +1 -1
- package/lib/cjs/render/Pixel.js +2 -0
- package/lib/cjs/render/Pixel.js.map +1 -1
- package/lib/cjs/render/RealityMeshGraphicParams.d.ts +1 -0
- package/lib/cjs/render/RealityMeshGraphicParams.d.ts.map +1 -1
- package/lib/cjs/render/RealityMeshGraphicParams.js.map +1 -1
- package/lib/cjs/render/RenderMemory.d.ts +2 -0
- package/lib/cjs/render/RenderMemory.d.ts.map +1 -1
- package/lib/cjs/render/RenderMemory.js +2 -0
- package/lib/cjs/render/RenderMemory.js.map +1 -1
- package/lib/cjs/render/RenderPlan.d.ts +2 -1
- package/lib/cjs/render/RenderPlan.d.ts.map +1 -1
- package/lib/cjs/render/RenderPlan.js +2 -0
- package/lib/cjs/render/RenderPlan.js.map +1 -1
- package/lib/cjs/render/RenderSystem.d.ts +59 -11
- package/lib/cjs/render/RenderSystem.d.ts.map +1 -1
- package/lib/cjs/render/RenderSystem.js +44 -6
- package/lib/cjs/render/RenderSystem.js.map +1 -1
- package/lib/cjs/render/RenderTarget.d.ts +1 -1
- package/lib/cjs/render/RenderTarget.d.ts.map +1 -1
- package/lib/cjs/render/RenderTarget.js.map +1 -1
- package/lib/cjs/render/webgl/BatchUniforms.d.ts +4 -0
- package/lib/cjs/render/webgl/BatchUniforms.d.ts.map +1 -1
- package/lib/cjs/render/webgl/BatchUniforms.js +18 -0
- package/lib/cjs/render/webgl/BatchUniforms.js.map +1 -1
- package/lib/cjs/render/webgl/BranchState.d.ts +7 -0
- package/lib/cjs/render/webgl/BranchState.d.ts.map +1 -1
- package/lib/cjs/render/webgl/BranchState.js +4 -0
- package/lib/cjs/render/webgl/BranchState.js.map +1 -1
- package/lib/cjs/render/webgl/BranchUniforms.d.ts +1 -0
- package/lib/cjs/render/webgl/BranchUniforms.d.ts.map +1 -1
- package/lib/cjs/render/webgl/BranchUniforms.js +14 -1
- package/lib/cjs/render/webgl/BranchUniforms.js.map +1 -1
- package/lib/cjs/render/webgl/ContourUniforms.d.ts +22 -0
- package/lib/cjs/render/webgl/ContourUniforms.d.ts.map +1 -0
- package/lib/cjs/render/webgl/ContourUniforms.js +98 -0
- package/lib/cjs/render/webgl/ContourUniforms.js.map +1 -0
- package/lib/cjs/render/webgl/Contours.d.ts +34 -0
- package/lib/cjs/render/webgl/Contours.d.ts.map +1 -0
- package/lib/cjs/render/webgl/Contours.js +127 -0
- package/lib/cjs/render/webgl/Contours.js.map +1 -0
- package/lib/cjs/render/webgl/EdgeSettings.d.ts +2 -1
- package/lib/cjs/render/webgl/EdgeSettings.d.ts.map +1 -1
- package/lib/cjs/render/webgl/EdgeSettings.js +1 -1
- package/lib/cjs/render/webgl/EdgeSettings.js.map +1 -1
- package/lib/cjs/render/webgl/FeatureOverrides.d.ts +2 -0
- package/lib/cjs/render/webgl/FeatureOverrides.d.ts.map +1 -1
- package/lib/cjs/render/webgl/FeatureOverrides.js +83 -69
- package/lib/cjs/render/webgl/FeatureOverrides.js.map +1 -1
- package/lib/cjs/render/webgl/GL.d.ts +2 -1
- package/lib/cjs/render/webgl/GL.d.ts.map +1 -1
- package/lib/cjs/render/webgl/GL.js +1 -0
- package/lib/cjs/render/webgl/GL.js.map +1 -1
- package/lib/cjs/render/webgl/Graphic.d.ts +9 -0
- package/lib/cjs/render/webgl/Graphic.d.ts.map +1 -1
- package/lib/cjs/render/webgl/Graphic.js +27 -0
- package/lib/cjs/render/webgl/Graphic.js.map +1 -1
- package/lib/cjs/render/webgl/InstancedGeometry.d.ts +40 -10
- package/lib/cjs/render/webgl/InstancedGeometry.d.ts.map +1 -1
- package/lib/cjs/render/webgl/InstancedGeometry.js +99 -31
- package/lib/cjs/render/webgl/InstancedGeometry.js.map +1 -1
- package/lib/cjs/render/webgl/LineCode.d.ts.map +1 -1
- package/lib/cjs/render/webgl/LineCode.js +2 -14
- package/lib/cjs/render/webgl/LineCode.js.map +1 -1
- package/lib/cjs/render/webgl/Mesh.d.ts +9 -4
- package/lib/cjs/render/webgl/Mesh.d.ts.map +1 -1
- package/lib/cjs/render/webgl/Mesh.js +18 -16
- package/lib/cjs/render/webgl/Mesh.js.map +1 -1
- package/lib/cjs/render/webgl/PointCloud.d.ts +5 -1
- package/lib/cjs/render/webgl/PointCloud.d.ts.map +1 -1
- package/lib/cjs/render/webgl/PointCloud.js +7 -2
- package/lib/cjs/render/webgl/PointCloud.js.map +1 -1
- package/lib/cjs/render/webgl/PointString.d.ts +5 -1
- package/lib/cjs/render/webgl/PointString.d.ts.map +1 -1
- package/lib/cjs/render/webgl/PointString.js +8 -3
- package/lib/cjs/render/webgl/PointString.js.map +1 -1
- package/lib/cjs/render/webgl/Polyline.d.ts +5 -1
- package/lib/cjs/render/webgl/Polyline.d.ts.map +1 -1
- package/lib/cjs/render/webgl/Polyline.js +7 -2
- package/lib/cjs/render/webgl/Polyline.js.map +1 -1
- package/lib/cjs/render/webgl/Primitive.d.ts +1 -3
- package/lib/cjs/render/webgl/Primitive.d.ts.map +1 -1
- package/lib/cjs/render/webgl/Primitive.js +1 -6
- package/lib/cjs/render/webgl/Primitive.js.map +1 -1
- package/lib/cjs/render/webgl/RealityMesh.d.ts +5 -1
- package/lib/cjs/render/webgl/RealityMesh.d.ts.map +1 -1
- package/lib/cjs/render/webgl/RealityMesh.js +7 -1
- package/lib/cjs/render/webgl/RealityMesh.js.map +1 -1
- package/lib/cjs/render/webgl/RenderFlags.d.ts +2 -19
- package/lib/cjs/render/webgl/RenderFlags.d.ts.map +1 -1
- package/lib/cjs/render/webgl/RenderFlags.js +2 -0
- package/lib/cjs/render/webgl/RenderFlags.js.map +1 -1
- package/lib/cjs/render/webgl/SceneCompositor.d.ts.map +1 -1
- package/lib/cjs/render/webgl/SceneCompositor.js +12 -3
- package/lib/cjs/render/webgl/SceneCompositor.js.map +1 -1
- package/lib/cjs/render/webgl/ShaderBuilder.d.ts +15 -13
- package/lib/cjs/render/webgl/ShaderBuilder.d.ts.map +1 -1
- package/lib/cjs/render/webgl/ShaderBuilder.js +18 -10
- package/lib/cjs/render/webgl/ShaderBuilder.js.map +1 -1
- package/lib/cjs/render/webgl/ShaderProgram.d.ts.map +1 -1
- package/lib/cjs/render/webgl/ShaderProgram.js +26 -0
- package/lib/cjs/render/webgl/ShaderProgram.js.map +1 -1
- package/lib/cjs/render/webgl/System.d.ts +11 -5
- package/lib/cjs/render/webgl/System.d.ts.map +1 -1
- package/lib/cjs/render/webgl/System.js +81 -13
- package/lib/cjs/render/webgl/System.js.map +1 -1
- package/lib/cjs/render/webgl/Target.d.ts +6 -2
- package/lib/cjs/render/webgl/Target.d.ts.map +1 -1
- package/lib/cjs/render/webgl/Target.js +24 -1
- package/lib/cjs/render/webgl/Target.js.map +1 -1
- package/lib/cjs/render/webgl/TargetUniforms.d.ts +2 -0
- package/lib/cjs/render/webgl/TargetUniforms.d.ts.map +1 -1
- package/lib/cjs/render/webgl/TargetUniforms.js +2 -0
- package/lib/cjs/render/webgl/TargetUniforms.js.map +1 -1
- package/lib/cjs/render/webgl/Texture.d.ts +2 -1
- package/lib/cjs/render/webgl/Texture.d.ts.map +1 -1
- package/lib/cjs/render/webgl/Texture.js.map +1 -1
- package/lib/cjs/render/webgl/glsl/AmbientOcclusion.js +1 -1
- package/lib/cjs/render/webgl/glsl/Atmosphere.js +1 -1
- package/lib/cjs/render/webgl/glsl/Blur.js +1 -1
- package/lib/cjs/render/webgl/glsl/ClearPickAndColor.js +1 -1
- package/lib/cjs/render/webgl/glsl/ClearTranslucent.js +1 -1
- package/lib/cjs/render/webgl/glsl/Clipping.js +1 -1
- package/lib/cjs/render/webgl/glsl/Combine3Textures.js +1 -1
- package/lib/cjs/render/webgl/glsl/CombineTextures.js +1 -1
- package/lib/cjs/render/webgl/glsl/Composite.js +1 -1
- package/lib/cjs/render/webgl/glsl/Contours.d.ts +4 -0
- package/lib/cjs/render/webgl/glsl/Contours.d.ts.map +1 -0
- package/lib/cjs/render/webgl/glsl/Contours.js +138 -0
- package/lib/cjs/render/webgl/glsl/Contours.js.map +1 -0
- package/lib/cjs/render/webgl/glsl/CopyColor.js +1 -1
- package/lib/cjs/render/webgl/glsl/CopyPickBuffers.js +1 -1
- package/lib/cjs/render/webgl/glsl/CopyStencil.js +5 -5
- package/lib/cjs/render/webgl/glsl/EDL.js +4 -4
- package/lib/cjs/render/webgl/glsl/EVSMFromDepth.js +1 -1
- package/lib/cjs/render/webgl/glsl/Edge.js +1 -1
- package/lib/cjs/render/webgl/glsl/FeatureSymbology.d.ts +2 -1
- package/lib/cjs/render/webgl/glsl/FeatureSymbology.d.ts.map +1 -1
- package/lib/cjs/render/webgl/glsl/FeatureSymbology.js +28 -15
- package/lib/cjs/render/webgl/glsl/FeatureSymbology.js.map +1 -1
- package/lib/cjs/render/webgl/glsl/Fragment.js +9 -9
- package/lib/cjs/render/webgl/glsl/LogarithmicDepthBuffer.js +1 -1
- package/lib/cjs/render/webgl/glsl/PlanarClassification.js +4 -4
- package/lib/cjs/render/webgl/glsl/PointCloud.js +1 -1
- package/lib/cjs/render/webgl/glsl/RealityMesh.js +3 -3
- package/lib/cjs/render/webgl/glsl/ScreenSpaceEffect.js +1 -1
- package/lib/cjs/render/webgl/glsl/SkyBox.js +1 -1
- package/lib/cjs/render/webgl/glsl/SkySphere.js +1 -1
- package/lib/cjs/render/webgl/glsl/SolarShadowMapping.js +1 -1
- package/lib/cjs/render/webgl/glsl/Surface.d.ts.map +1 -1
- package/lib/cjs/render/webgl/glsl/Surface.js +5 -3
- package/lib/cjs/render/webgl/glsl/Surface.js.map +1 -1
- package/lib/cjs/render/webgl/glsl/Translucency.js +1 -1
- package/lib/cjs/render/webgl/glsl/Wiremesh.js +1 -1
- package/lib/cjs/tile/GltfReader.d.ts +27 -7
- package/lib/cjs/tile/GltfReader.d.ts.map +1 -1
- package/lib/cjs/tile/GltfReader.js +84 -68
- package/lib/cjs/tile/GltfReader.js.map +1 -1
- package/lib/cjs/tile/ImdlGraphicsCreator.d.ts +4 -1
- package/lib/cjs/tile/ImdlGraphicsCreator.d.ts.map +1 -1
- package/lib/cjs/tile/ImdlGraphicsCreator.js +32 -22
- package/lib/cjs/tile/ImdlGraphicsCreator.js.map +1 -1
- package/lib/cjs/tile/TileDrawArgs.d.ts +4 -0
- package/lib/cjs/tile/TileDrawArgs.d.ts.map +1 -1
- package/lib/cjs/tile/TileDrawArgs.js +2 -0
- package/lib/cjs/tile/TileDrawArgs.js.map +1 -1
- package/lib/cjs/tile/TileTreeReference.d.ts +2 -0
- package/lib/cjs/tile/TileTreeReference.d.ts.map +1 -1
- package/lib/cjs/tile/TileTreeReference.js +3 -0
- package/lib/cjs/tile/TileTreeReference.js.map +1 -1
- package/lib/cjs/tile/map/MapTile.js +1 -1
- package/lib/cjs/tile/map/MapTile.js.map +1 -1
- package/lib/esm/AccuSnap.d.ts.map +1 -1
- package/lib/esm/AccuSnap.js +9 -5
- package/lib/esm/AccuSnap.js.map +1 -1
- package/lib/esm/DisplayStyleState.d.ts.map +1 -1
- package/lib/esm/DisplayStyleState.js +5 -1
- package/lib/esm/DisplayStyleState.js.map +1 -1
- package/lib/esm/ElementLocateManager.d.ts +7 -1
- package/lib/esm/ElementLocateManager.d.ts.map +1 -1
- package/lib/esm/ElementLocateManager.js +34 -10
- package/lib/esm/ElementLocateManager.js.map +1 -1
- package/lib/esm/HitDetail.d.ts +4 -0
- package/lib/esm/HitDetail.d.ts.map +1 -1
- package/lib/esm/HitDetail.js +3 -0
- package/lib/esm/HitDetail.js.map +1 -1
- package/lib/esm/IModelConnection.d.ts +1 -0
- package/lib/esm/IModelConnection.d.ts.map +1 -1
- package/lib/esm/IModelConnection.js +2 -1
- package/lib/esm/IModelConnection.js.map +1 -1
- package/lib/esm/NoRenderApp.d.ts +1 -0
- package/lib/esm/NoRenderApp.d.ts.map +1 -1
- package/lib/esm/NoRenderApp.js +1 -0
- package/lib/esm/NoRenderApp.js.map +1 -1
- package/lib/esm/SheetViewState.d.ts +0 -1
- package/lib/esm/SheetViewState.d.ts.map +1 -1
- package/lib/esm/SheetViewState.js +0 -1
- package/lib/esm/SheetViewState.js.map +1 -1
- package/lib/esm/Viewport.d.ts +25 -1
- package/lib/esm/Viewport.d.ts.map +1 -1
- package/lib/esm/Viewport.js +20 -12
- package/lib/esm/Viewport.js.map +1 -1
- package/lib/esm/common/WorkerProxy.d.ts +8 -4
- package/lib/esm/common/WorkerProxy.d.ts.map +1 -1
- package/lib/esm/common/WorkerProxy.js.map +1 -1
- package/lib/esm/common/imdl/ImdlModel.d.ts +3 -8
- package/lib/esm/common/imdl/ImdlModel.d.ts.map +1 -1
- package/lib/esm/common/imdl/ImdlModel.js.map +1 -1
- package/lib/esm/common/internal/Symbols.d.ts +7 -0
- package/lib/esm/common/internal/Symbols.d.ts.map +1 -1
- package/lib/esm/common/internal/Symbols.js +7 -0
- package/lib/esm/common/internal/Symbols.js.map +1 -1
- package/lib/esm/common/internal/render/InstancedGraphicPropsBuilder.d.ts +15 -0
- package/lib/esm/common/internal/render/InstancedGraphicPropsBuilder.d.ts.map +1 -0
- package/lib/esm/common/internal/render/InstancedGraphicPropsBuilder.js +91 -0
- package/lib/esm/common/internal/render/InstancedGraphicPropsBuilder.js.map +1 -0
- package/lib/esm/common/internal/render/LineCode.d.ts +9 -0
- package/lib/esm/common/internal/render/LineCode.d.ts.map +1 -0
- package/lib/esm/common/internal/render/LineCode.js +27 -0
- package/lib/esm/common/internal/render/LineCode.js.map +1 -0
- package/lib/esm/common/internal/render/OvrFlags.d.ts +27 -0
- package/lib/esm/common/internal/render/OvrFlags.d.ts.map +1 -0
- package/lib/esm/common/internal/render/OvrFlags.js +9 -0
- package/lib/esm/common/internal/render/OvrFlags.js.map +1 -0
- package/lib/esm/common/internal/render/VertexTable.d.ts.map +1 -1
- package/lib/esm/common/internal/render/VertexTable.js +3 -5
- package/lib/esm/common/internal/render/VertexTable.js.map +1 -1
- package/lib/esm/common/render/InstancedGraphicParams.d.ts +25 -1
- package/lib/esm/common/render/InstancedGraphicParams.d.ts.map +1 -1
- package/lib/esm/common/render/InstancedGraphicParams.js +58 -1
- package/lib/esm/common/render/InstancedGraphicParams.js.map +1 -1
- package/lib/esm/common/render/RenderInstancesParams.d.ts +76 -0
- package/lib/esm/common/render/RenderInstancesParams.d.ts.map +1 -0
- package/lib/esm/common/render/RenderInstancesParams.js +30 -0
- package/lib/esm/common/render/RenderInstancesParams.js.map +1 -0
- package/lib/esm/common.d.ts +1 -0
- package/lib/esm/common.d.ts.map +1 -1
- package/lib/esm/common.js +1 -0
- package/lib/esm/common.js.map +1 -1
- package/lib/esm/core-frontend.d.ts +1 -0
- package/lib/esm/core-frontend.d.ts.map +1 -1
- package/lib/esm/core-frontend.js +1 -0
- package/lib/esm/core-frontend.js.map +1 -1
- package/lib/esm/internal/render/PrimitiveBuilder.d.ts +4 -1
- package/lib/esm/internal/render/PrimitiveBuilder.d.ts.map +1 -1
- package/lib/esm/internal/render/PrimitiveBuilder.js +82 -35
- package/lib/esm/internal/render/PrimitiveBuilder.js.map +1 -1
- package/lib/esm/internal/render/RenderGeometry.d.ts +20 -0
- package/lib/esm/internal/render/RenderGeometry.d.ts.map +1 -0
- package/lib/esm/internal/render/RenderGeometry.js +9 -0
- package/lib/esm/internal/render/RenderGeometry.js.map +1 -0
- package/lib/esm/internal/render/RenderInstancesParamsImpl.d.ts +24 -0
- package/lib/esm/internal/render/RenderInstancesParamsImpl.d.ts.map +1 -0
- package/lib/esm/internal/render/RenderInstancesParamsImpl.js +64 -0
- package/lib/esm/internal/render/RenderInstancesParamsImpl.js.map +1 -0
- package/lib/esm/render/GraphicBranch.d.ts +10 -1
- package/lib/esm/render/GraphicBranch.d.ts.map +1 -1
- package/lib/esm/render/GraphicBranch.js.map +1 -1
- package/lib/esm/render/GraphicBuilder.d.ts +17 -3
- package/lib/esm/render/GraphicBuilder.d.ts.map +1 -1
- package/lib/esm/render/GraphicBuilder.js +7 -1
- package/lib/esm/render/GraphicBuilder.js.map +1 -1
- package/lib/esm/render/GraphicTemplate.d.ts +76 -0
- package/lib/esm/render/GraphicTemplate.d.ts.map +1 -0
- package/lib/esm/render/GraphicTemplate.js +37 -0
- package/lib/esm/render/GraphicTemplate.js.map +1 -0
- package/lib/esm/render/MockRender.d.ts +12 -2
- package/lib/esm/render/MockRender.d.ts.map +1 -1
- package/lib/esm/render/MockRender.js +19 -5
- package/lib/esm/render/MockRender.js.map +1 -1
- package/lib/esm/render/Pixel.d.ts +6 -0
- package/lib/esm/render/Pixel.d.ts.map +1 -1
- package/lib/esm/render/Pixel.js +2 -0
- package/lib/esm/render/Pixel.js.map +1 -1
- package/lib/esm/render/RealityMeshGraphicParams.d.ts +1 -0
- package/lib/esm/render/RealityMeshGraphicParams.d.ts.map +1 -1
- package/lib/esm/render/RealityMeshGraphicParams.js.map +1 -1
- package/lib/esm/render/RenderMemory.d.ts +2 -0
- package/lib/esm/render/RenderMemory.d.ts.map +1 -1
- package/lib/esm/render/RenderMemory.js +2 -0
- package/lib/esm/render/RenderMemory.js.map +1 -1
- package/lib/esm/render/RenderPlan.d.ts +2 -1
- package/lib/esm/render/RenderPlan.d.ts.map +1 -1
- package/lib/esm/render/RenderPlan.js +2 -0
- package/lib/esm/render/RenderPlan.js.map +1 -1
- package/lib/esm/render/RenderSystem.d.ts +59 -11
- package/lib/esm/render/RenderSystem.d.ts.map +1 -1
- package/lib/esm/render/RenderSystem.js +46 -8
- package/lib/esm/render/RenderSystem.js.map +1 -1
- package/lib/esm/render/RenderTarget.d.ts +1 -1
- package/lib/esm/render/RenderTarget.d.ts.map +1 -1
- package/lib/esm/render/RenderTarget.js.map +1 -1
- package/lib/esm/render/webgl/BatchUniforms.d.ts +4 -0
- package/lib/esm/render/webgl/BatchUniforms.d.ts.map +1 -1
- package/lib/esm/render/webgl/BatchUniforms.js +18 -0
- package/lib/esm/render/webgl/BatchUniforms.js.map +1 -1
- package/lib/esm/render/webgl/BranchState.d.ts +7 -0
- package/lib/esm/render/webgl/BranchState.d.ts.map +1 -1
- package/lib/esm/render/webgl/BranchState.js +4 -0
- package/lib/esm/render/webgl/BranchState.js.map +1 -1
- package/lib/esm/render/webgl/BranchUniforms.d.ts +1 -0
- package/lib/esm/render/webgl/BranchUniforms.d.ts.map +1 -1
- package/lib/esm/render/webgl/BranchUniforms.js +14 -1
- package/lib/esm/render/webgl/BranchUniforms.js.map +1 -1
- package/lib/esm/render/webgl/ContourUniforms.d.ts +22 -0
- package/lib/esm/render/webgl/ContourUniforms.d.ts.map +1 -0
- package/lib/esm/render/webgl/ContourUniforms.js +94 -0
- package/lib/esm/render/webgl/ContourUniforms.js.map +1 -0
- package/lib/esm/render/webgl/Contours.d.ts +34 -0
- package/lib/esm/render/webgl/Contours.d.ts.map +1 -0
- package/lib/esm/render/webgl/Contours.js +123 -0
- package/lib/esm/render/webgl/Contours.js.map +1 -0
- package/lib/esm/render/webgl/EdgeSettings.d.ts +2 -1
- package/lib/esm/render/webgl/EdgeSettings.d.ts.map +1 -1
- package/lib/esm/render/webgl/EdgeSettings.js +1 -1
- package/lib/esm/render/webgl/EdgeSettings.js.map +1 -1
- package/lib/esm/render/webgl/FeatureOverrides.d.ts +2 -0
- package/lib/esm/render/webgl/FeatureOverrides.d.ts.map +1 -1
- package/lib/esm/render/webgl/FeatureOverrides.js +83 -69
- package/lib/esm/render/webgl/FeatureOverrides.js.map +1 -1
- package/lib/esm/render/webgl/GL.d.ts +2 -1
- package/lib/esm/render/webgl/GL.d.ts.map +1 -1
- package/lib/esm/render/webgl/GL.js +1 -0
- package/lib/esm/render/webgl/GL.js.map +1 -1
- package/lib/esm/render/webgl/Graphic.d.ts +9 -0
- package/lib/esm/render/webgl/Graphic.d.ts.map +1 -1
- package/lib/esm/render/webgl/Graphic.js +27 -0
- package/lib/esm/render/webgl/Graphic.js.map +1 -1
- package/lib/esm/render/webgl/InstancedGeometry.d.ts +40 -10
- package/lib/esm/render/webgl/InstancedGeometry.d.ts.map +1 -1
- package/lib/esm/render/webgl/InstancedGeometry.js +97 -30
- package/lib/esm/render/webgl/InstancedGeometry.js.map +1 -1
- package/lib/esm/render/webgl/LineCode.d.ts.map +1 -1
- package/lib/esm/render/webgl/LineCode.js +2 -14
- package/lib/esm/render/webgl/LineCode.js.map +1 -1
- package/lib/esm/render/webgl/Mesh.d.ts +9 -4
- package/lib/esm/render/webgl/Mesh.d.ts.map +1 -1
- package/lib/esm/render/webgl/Mesh.js +19 -17
- package/lib/esm/render/webgl/Mesh.js.map +1 -1
- package/lib/esm/render/webgl/PointCloud.d.ts +5 -1
- package/lib/esm/render/webgl/PointCloud.d.ts.map +1 -1
- package/lib/esm/render/webgl/PointCloud.js +7 -2
- package/lib/esm/render/webgl/PointCloud.js.map +1 -1
- package/lib/esm/render/webgl/PointString.d.ts +5 -1
- package/lib/esm/render/webgl/PointString.d.ts.map +1 -1
- package/lib/esm/render/webgl/PointString.js +8 -3
- package/lib/esm/render/webgl/PointString.js.map +1 -1
- package/lib/esm/render/webgl/Polyline.d.ts +5 -1
- package/lib/esm/render/webgl/Polyline.d.ts.map +1 -1
- package/lib/esm/render/webgl/Polyline.js +7 -2
- package/lib/esm/render/webgl/Polyline.js.map +1 -1
- package/lib/esm/render/webgl/Primitive.d.ts +1 -3
- package/lib/esm/render/webgl/Primitive.d.ts.map +1 -1
- package/lib/esm/render/webgl/Primitive.js +2 -7
- package/lib/esm/render/webgl/Primitive.js.map +1 -1
- package/lib/esm/render/webgl/RealityMesh.d.ts +5 -1
- package/lib/esm/render/webgl/RealityMesh.d.ts.map +1 -1
- package/lib/esm/render/webgl/RealityMesh.js +7 -1
- package/lib/esm/render/webgl/RealityMesh.js.map +1 -1
- package/lib/esm/render/webgl/RenderFlags.d.ts +2 -19
- package/lib/esm/render/webgl/RenderFlags.d.ts.map +1 -1
- package/lib/esm/render/webgl/RenderFlags.js +2 -0
- package/lib/esm/render/webgl/RenderFlags.js.map +1 -1
- package/lib/esm/render/webgl/SceneCompositor.d.ts.map +1 -1
- package/lib/esm/render/webgl/SceneCompositor.js +12 -3
- package/lib/esm/render/webgl/SceneCompositor.js.map +1 -1
- package/lib/esm/render/webgl/ShaderBuilder.d.ts +15 -13
- package/lib/esm/render/webgl/ShaderBuilder.d.ts.map +1 -1
- package/lib/esm/render/webgl/ShaderBuilder.js +18 -10
- package/lib/esm/render/webgl/ShaderBuilder.js.map +1 -1
- package/lib/esm/render/webgl/ShaderProgram.d.ts.map +1 -1
- package/lib/esm/render/webgl/ShaderProgram.js +26 -0
- package/lib/esm/render/webgl/ShaderProgram.js.map +1 -1
- package/lib/esm/render/webgl/System.d.ts +11 -5
- package/lib/esm/render/webgl/System.d.ts.map +1 -1
- package/lib/esm/render/webgl/System.js +82 -14
- package/lib/esm/render/webgl/System.js.map +1 -1
- package/lib/esm/render/webgl/Target.d.ts +6 -2
- package/lib/esm/render/webgl/Target.d.ts.map +1 -1
- package/lib/esm/render/webgl/Target.js +24 -1
- package/lib/esm/render/webgl/Target.js.map +1 -1
- package/lib/esm/render/webgl/TargetUniforms.d.ts +2 -0
- package/lib/esm/render/webgl/TargetUniforms.d.ts.map +1 -1
- package/lib/esm/render/webgl/TargetUniforms.js +2 -0
- package/lib/esm/render/webgl/TargetUniforms.js.map +1 -1
- package/lib/esm/render/webgl/Texture.d.ts +2 -1
- package/lib/esm/render/webgl/Texture.d.ts.map +1 -1
- package/lib/esm/render/webgl/Texture.js.map +1 -1
- package/lib/esm/render/webgl/glsl/AmbientOcclusion.js +1 -1
- package/lib/esm/render/webgl/glsl/Atmosphere.js +1 -1
- package/lib/esm/render/webgl/glsl/Blur.js +1 -1
- package/lib/esm/render/webgl/glsl/ClearPickAndColor.js +1 -1
- package/lib/esm/render/webgl/glsl/ClearTranslucent.js +1 -1
- package/lib/esm/render/webgl/glsl/Clipping.js +1 -1
- package/lib/esm/render/webgl/glsl/Combine3Textures.js +1 -1
- package/lib/esm/render/webgl/glsl/CombineTextures.js +1 -1
- package/lib/esm/render/webgl/glsl/Composite.js +1 -1
- package/lib/esm/render/webgl/glsl/Contours.d.ts +4 -0
- package/lib/esm/render/webgl/glsl/Contours.d.ts.map +1 -0
- package/lib/esm/render/webgl/glsl/Contours.js +134 -0
- package/lib/esm/render/webgl/glsl/Contours.js.map +1 -0
- package/lib/esm/render/webgl/glsl/CopyColor.js +1 -1
- package/lib/esm/render/webgl/glsl/CopyPickBuffers.js +1 -1
- package/lib/esm/render/webgl/glsl/CopyStencil.js +5 -5
- package/lib/esm/render/webgl/glsl/EDL.js +4 -4
- package/lib/esm/render/webgl/glsl/EVSMFromDepth.js +1 -1
- package/lib/esm/render/webgl/glsl/Edge.js +1 -1
- package/lib/esm/render/webgl/glsl/FeatureSymbology.d.ts +2 -1
- package/lib/esm/render/webgl/glsl/FeatureSymbology.d.ts.map +1 -1
- package/lib/esm/render/webgl/glsl/FeatureSymbology.js +27 -15
- package/lib/esm/render/webgl/glsl/FeatureSymbology.js.map +1 -1
- package/lib/esm/render/webgl/glsl/Fragment.js +9 -9
- package/lib/esm/render/webgl/glsl/LogarithmicDepthBuffer.js +1 -1
- package/lib/esm/render/webgl/glsl/PlanarClassification.js +4 -4
- package/lib/esm/render/webgl/glsl/PointCloud.js +1 -1
- package/lib/esm/render/webgl/glsl/RealityMesh.js +3 -3
- package/lib/esm/render/webgl/glsl/ScreenSpaceEffect.js +1 -1
- package/lib/esm/render/webgl/glsl/SkyBox.js +1 -1
- package/lib/esm/render/webgl/glsl/SkySphere.js +1 -1
- package/lib/esm/render/webgl/glsl/SolarShadowMapping.js +1 -1
- package/lib/esm/render/webgl/glsl/Surface.d.ts.map +1 -1
- package/lib/esm/render/webgl/glsl/Surface.js +5 -3
- package/lib/esm/render/webgl/glsl/Surface.js.map +1 -1
- package/lib/esm/render/webgl/glsl/Translucency.js +1 -1
- package/lib/esm/render/webgl/glsl/Wiremesh.js +1 -1
- package/lib/esm/tile/GltfReader.d.ts +27 -7
- package/lib/esm/tile/GltfReader.d.ts.map +1 -1
- package/lib/esm/tile/GltfReader.js +82 -67
- package/lib/esm/tile/GltfReader.js.map +1 -1
- package/lib/esm/tile/ImdlGraphicsCreator.d.ts +4 -1
- package/lib/esm/tile/ImdlGraphicsCreator.d.ts.map +1 -1
- package/lib/esm/tile/ImdlGraphicsCreator.js +31 -22
- package/lib/esm/tile/ImdlGraphicsCreator.js.map +1 -1
- package/lib/esm/tile/TileDrawArgs.d.ts +4 -0
- package/lib/esm/tile/TileDrawArgs.d.ts.map +1 -1
- package/lib/esm/tile/TileDrawArgs.js +2 -0
- package/lib/esm/tile/TileDrawArgs.js.map +1 -1
- package/lib/esm/tile/TileTreeReference.d.ts +2 -0
- package/lib/esm/tile/TileTreeReference.d.ts.map +1 -1
- package/lib/esm/tile/TileTreeReference.js +3 -0
- package/lib/esm/tile/TileTreeReference.js.map +1 -1
- package/lib/esm/tile/map/MapTile.js +1 -1
- package/lib/esm/tile/map/MapTile.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":"PrimitiveBuilder.js","sourceRoot":"","sources":["../../../../src/internal/render/PrimitiveBuilder.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;AAEH,wDAAmE;AACnE,oDAA6G;AAC7G,gEAAyH;AAMzH,8DAA2D;AAC3D,sDAA6C;AAC7C,2DAAwF;AAExF,gFAAgF;AAChF,IAAI,gBAAgB,GAAG,KAAK,CAAC;AAE7B,gBAAgB;AAChB,MAAa,gBAAiB,SAAQ,+BAAc;IAOlD,YAAmB,MAAoB,EAAE,OAAoE;QAC3G,KAAK,CAAC,OAAO,CAAC,CAAC;QAPD,QAA2B,GAAG,SAAS,CAAC;QAEjD,eAAU,GAAoB,EAAE,CAAC;QAMtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,sBAAsB,GAAG,OAAO,CAAC,qBAAqB,EAA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,CAAC;YACH,CAAC;YAED,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,EAAE,IAAI,CAAC,sBAAsB,CAAC,CAAC;YAClF,IAAI,OAAO;gBACT,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACxB,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,IAAA,qBAAM,EAAC,SAAS,KAAK,eAAe,CAAC,CAAC;YACtC,MAAM,SAAS,GAAG,yBAAS,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC;YAC/D,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;YAC3D,IAAI,iBAAiB,EAAE,CAAC,CAAC,qDAAqD;gBAC5E,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;gBAC9C,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;YACjD,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAnID,4CAmIC;KAlIkB,mCAAyB","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 { Point3d, Range3d, Transform } from \"@itwin/core-geometry\";\r\nimport { FeatureTable, Gradient, PackedFeatureTable, QPoint3dList, RenderTexture } from \"@itwin/core-common\";\r\nimport { CustomGraphicBuilderOptions, GraphicBuilder, ViewportGraphicBuilderOptions } from \"../../render/GraphicBuilder\";\r\nimport { RenderGraphic } from \"../../render/RenderGraphic\";\r\nimport { RenderSystem } from \"../../render/RenderSystem\";\r\nimport { GeometryOptions } from \"../../common/internal/render/Primitives\";\r\nimport { GeometryAccumulator } from \"../../common/internal/render/GeometryAccumulator\";\r\nimport { MeshList } from \"../../common/internal/render/MeshPrimitives\";\r\nimport { GraphicBranch } from \"../../render/GraphicBranch\";\r\nimport { assert } from \"@itwin/core-bentley\";\r\nimport { _accumulator, _implementationProhibited } from \"../../common/internal/Symbols\";\r\n\r\n// Set to true to add a range box to every graphic produced by PrimitiveBuilder.\r\nlet addDebugRangeBox = false;\r\n\r\n/** @internal */\r\nexport class PrimitiveBuilder extends GraphicBuilder {\r\n public readonly [_implementationProhibited] = undefined;\r\n public readonly system: RenderSystem;\r\n public primitives: RenderGraphic[] = [];\r\n private readonly _options: CustomGraphicBuilderOptions | ViewportGraphicBuilderOptions;\r\n private readonly _viewIndependentOrigin?: Point3d;\r\n\r\n public constructor(system: RenderSystem, options: ViewportGraphicBuilderOptions | CustomGraphicBuilderOptions) {\r\n super(options);\r\n this.system = system;\r\n this._options = options;\r\n this._viewIndependentOrigin = options.viewIndependentOrigin?.clone();\r\n }\r\n\r\n public override finish(): RenderGraphic {\r\n const graphic = this.finishGraphic(this[_accumulator]);\r\n this[_accumulator].clear();\r\n return graphic;\r\n }\r\n\r\n private finishGraphic(accum: GeometryAccumulator): RenderGraphic {\r\n let meshes: MeshList | undefined;\r\n let range: Range3d | undefined;\r\n let featureTable: FeatureTable | undefined;\r\n if (!accum.isEmpty) {\r\n // Overlay decorations don't test Z. Tools like to layer multiple primitives on top of one another; they rely on the primitives rendering\r\n // in that same order to produce correct results (e.g., a thin line rendered atop a thick line of another color).\r\n // No point generating edges for graphics that are always rendered in smooth shade mode.\r\n const tolerance = this.computeTolerance(accum);\r\n meshes = this.saveToGraphicList(this.primitives, this, tolerance, this.pickable);\r\n if (undefined !== meshes) {\r\n if (meshes.features?.anyDefined)\r\n featureTable = meshes.features;\r\n\r\n range = meshes.range;\r\n }\r\n }\r\n\r\n let graphic = (this.primitives.length !== 1) ? this.system.createGraphicList(this.primitives) : this.primitives.pop() as RenderGraphic;\r\n if (undefined !== featureTable) {\r\n const batchRange = range ?? new Range3d();\r\n const batchOptions = this._options.pickable;\r\n graphic = this.system.createBatch(graphic, PackedFeatureTable.pack(featureTable), batchRange, batchOptions);\r\n }\r\n\r\n if (addDebugRangeBox && range) {\r\n addDebugRangeBox = false;\r\n const builder = this.system.createGraphic({ ...this._options });\r\n builder.addRangeBox(range);\r\n graphic = this.system.createGraphicList([graphic, builder.finish()]);\r\n addDebugRangeBox = true;\r\n }\r\n\r\n return graphic;\r\n }\r\n\r\n public computeTolerance(accum: GeometryAccumulator): number {\r\n return this._computeChordTolerance({\r\n graphic: this,\r\n computeRange: () => accum.geometries.computeRange(),\r\n });\r\n }\r\n\r\n protected override resolveGradient(gradient: Gradient.Symb): RenderTexture | undefined {\r\n return this.system.getGradientTexture(gradient, this.iModel);\r\n }\r\n\r\n /**\r\n * Populate a list of Graphic objects from the accumulated Geometry objects.\r\n * removed ViewContext\r\n */\r\n public saveToGraphicList(graphics: RenderGraphic[], options: GeometryOptions, tolerance: number, pickable: { isVolumeClassifier?: boolean, modelId?: string } | undefined): MeshList | undefined {\r\n const meshes = this[_accumulator].toMeshes(options, tolerance, pickable);\r\n if (0 === meshes.length)\r\n return undefined;\r\n\r\n // If the meshes contain quantized positions, they are all quantized to the same range. If that range is small relative to the distance\r\n // from the origin, quantization errors can produce display artifacts. Remove the translation from the quantization parameters and apply\r\n // it in the transform instead.\r\n //\r\n // If the positions are not quantized, they have already been transformed to be relative to the center of the meshes' range.\r\n // Apply the inverse translation to put them back into model space.\r\n const branch = new GraphicBranch(true);\r\n let transformOrigin: Point3d | undefined;\r\n let meshesRangeOffset = false;\r\n\r\n for (const mesh of meshes) {\r\n const verts = mesh.points;\r\n if (branch.isEmpty) {\r\n if (verts instanceof QPoint3dList) {\r\n transformOrigin = verts.params.origin.clone();\r\n verts.params.origin.setZero();\r\n } else {\r\n transformOrigin = verts.range.center;\r\n // In this case we need to modify the qOrigin of the graphic that will get created later since we have translated the origin.\r\n // We can't modify it directly, but if we temporarily modify the range of the mesh used to create it the qOrigin will get created properly.\r\n // Range is shared (not cloned) by all meshes and the mesh list itself, so modifying the range of the meshlist will modify it for all meshes.\r\n // We will then later add this offset back to the range once all of the graphics have been created because it is needed unmodified for locate.\r\n if (!meshesRangeOffset) {\r\n meshes.range?.low.subtractInPlace(transformOrigin);\r\n meshes.range?.high.subtractInPlace(transformOrigin);\r\n meshesRangeOffset = true;\r\n }\r\n }\r\n } else {\r\n assert(undefined !== transformOrigin);\r\n if (verts instanceof QPoint3dList) {\r\n assert(transformOrigin.isAlmostEqual(verts.params.origin));\r\n verts.params.origin.setZero();\r\n } else {\r\n assert(verts.range.center.isAlmostZero);\r\n }\r\n }\r\n\r\n const graphic = this.system.createMeshGraphics(mesh, this._viewIndependentOrigin);\r\n if (graphic)\r\n branch.add(graphic);\r\n }\r\n\r\n if (!branch.isEmpty) {\r\n assert(undefined !== transformOrigin);\r\n const transform = Transform.createTranslation(transformOrigin);\r\n graphics.push(this.system.createBranch(branch, transform));\r\n if (meshesRangeOffset) { // restore the meshes range that we modified earlier.\r\n meshes.range?.low.addInPlace(transformOrigin);\r\n meshes.range?.high.addInPlace(transformOrigin);\r\n }\r\n }\r\n\r\n return meshes;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"PrimitiveBuilder.js","sourceRoot":"","sources":["../../../../src/internal/render/PrimitiveBuilder.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;AAEH,wDAAmE;AACnE,oDAA+F;AAC/F,gEAAyH;AAMzH,8DAA2D;AAC3D,sDAA6C;AAC7C,2DAAwF;AACxF,kEAA4G;AAG5G,gBAAgB;AAChB,MAAa,gBAAiB,SAAQ,+BAAc;IAOlD,YAAmB,MAAoB,EAAE,OAAoE;QAC3G,KAAK,CAAC,OAAO,CAAC,CAAC;QAPD,QAA2B,GAAG,SAAS,CAAC;QAEjD,eAAU,GAAoB,EAAE,CAAC;QAMtC,IAAI,C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AE,CAAC;gBAChC,CAAC;qBAAM,CAAC;oBACN,IAAA,qBAAM,EAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;gBAC1C,CAAC;YACH,CAAC;YAED,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC,IAAI,EAAE,IAAI,CAAC,sBAAsB,CAAC,CAAC;YACnF,IAAI,IAAI,EAAE,CAAC;gBACT,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,CAAC;QACH,CAAC;QAED,IAAI,SAAS,CAAC;QACd,IAAI,eAAe,EAAE,CAAC;YACpB,SAAS,GAAG,yBAAS,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC;YACzD,IAAI,iBAAiB,EAAE,CAAC,CAAC,qDAAqD;gBAC5E,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;gBAC9C,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;YACjD,CAAC;QACH,CAAC;QAED,IAAI,KAAuC,CAAC;QAC5C,IAAI,MAAM,CAAC,QAAQ,EAAE,UAAU,EAAE,CAAC;YAChC,KAAK,GAAG;gBACN,YAAY,EAAE,gCAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;gBACtD,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,IAAI,uBAAO,EAAE;gBACpC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ;aAChC,CAAC;QACJ,CAAC;QAED,OAAO,IAAA,uCAAqB,EAAC;YAC3B,KAAK;YACL,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;YAChC,SAAS;SACV,CAAC,CAAC;IACL,CAAC;CACF;AArLD,4CAqLC;KApLkB,mCAAyB","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 { Point3d, Range3d, Transform } from \"@itwin/core-geometry\";\r\nimport { Gradient, PackedFeatureTable, QPoint3dList, RenderTexture } from \"@itwin/core-common\";\r\nimport { CustomGraphicBuilderOptions, GraphicBuilder, ViewportGraphicBuilderOptions } from \"../../render/GraphicBuilder\";\r\nimport { RenderGraphic } from \"../../render/RenderGraphic\";\r\nimport { RenderSystem } from \"../../render/RenderSystem\";\r\nimport { GeometryOptions } from \"../../common/internal/render/Primitives\";\r\nimport { GeometryAccumulator } from \"../../common/internal/render/GeometryAccumulator\";\r\nimport { MeshList } from \"../../common/internal/render/MeshPrimitives\";\r\nimport { GraphicBranch } from \"../../render/GraphicBranch\";\r\nimport { assert } from \"@itwin/core-bentley\";\r\nimport { _accumulator, _implementationProhibited } from \"../../common/internal/Symbols\";\r\nimport { createGraphicTemplate, GraphicTemplate, GraphicTemplateBatch } from \"../../render/GraphicTemplate\";\r\nimport { RenderGeometry } from \"./RenderGeometry\";\r\n\r\n/** @internal */\r\nexport class PrimitiveBuilder extends GraphicBuilder {\r\n public readonly [_implementationProhibited] = undefined;\r\n public readonly system: RenderSystem;\r\n public primitives: RenderGraphic[] = [];\r\n private readonly _options: CustomGraphicBuilderOptions | ViewportGraphicBuilderOptions;\r\n private readonly _viewIndependentOrigin?: Point3d;\r\n\r\n public constructor(system: RenderSystem, options: ViewportGraphicBuilderOptions | CustomGraphicBuilderOptions) {\r\n super(options);\r\n this.system = system;\r\n this._options = options;\r\n this._viewIndependentOrigin = options.viewIndependentOrigin?.clone();\r\n }\r\n\r\n public override finish(): RenderGraphic {\r\n const template = this.toTemplate(false);\r\n const graphic = this.system.createGraphicFromTemplate({ template });\r\n return graphic ?? this.system.createGraphicList([]);\r\n }\r\n\r\n public override finishTemplate(): GraphicTemplate {\r\n return this.toTemplate(true);\r\n }\r\n\r\n private toTemplate(noDispose: boolean): GraphicTemplate {\r\n const accum = this[_accumulator];\r\n const tolerance = this.computeTolerance(accum);\r\n const result = this.saveToTemplate(this, tolerance, this.pickable, noDispose);\r\n accum.clear();\r\n\r\n return result ?? createGraphicTemplate({ nodes: [], noDispose });\r\n }\r\n\r\n public computeTolerance(accum: GeometryAccumulator): number {\r\n return this._computeChordTolerance({\r\n graphic: this,\r\n computeRange: () => accum.geometries.computeRange(),\r\n });\r\n }\r\n\r\n protected override resolveGradient(gradient: Gradient.Symb): RenderTexture | undefined {\r\n return this.system.getGradientTexture(gradient, this.iModel);\r\n }\r\n\r\n /**\r\n * Populate a list of Graphic objects from the accumulated Geometry objects.\r\n * removed ViewContext\r\n */\r\n public saveToGraphicList(graphics: RenderGraphic[], options: GeometryOptions, tolerance: number, pickable: { isVolumeClassifier?: boolean, modelId?: string } | undefined): MeshList | undefined {\r\n const meshes = this[_accumulator].toMeshes(options, tolerance, pickable);\r\n if (0 === meshes.length)\r\n return undefined;\r\n\r\n // If the meshes contain quantized positions, they are all quantized to the same range. If that range is small relative to the distance\r\n // from the origin, quantization errors can produce display artifacts. Remove the translation from the quantization parameters and apply\r\n // it in the transform instead.\r\n //\r\n // If the positions are not quantized, they have already been transformed to be relative to the center of the meshes' range.\r\n // Apply the inverse translation to put them back into model space.\r\n const branch = new GraphicBranch(true);\r\n let transformOrigin: Point3d | undefined;\r\n let meshesRangeOffset = false;\r\n\r\n for (const mesh of meshes) {\r\n const verts = mesh.points;\r\n if (branch.isEmpty) {\r\n if (verts instanceof QPoint3dList) {\r\n transformOrigin = verts.params.origin.clone();\r\n verts.params.origin.setZero();\r\n } else {\r\n transformOrigin = verts.range.center;\r\n // In this case we need to modify the qOrigin of the graphic that will get created later since we have translated the origin.\r\n // We can't modify it directly, but if we temporarily modify the range of the mesh used to create it the qOrigin will get created properly.\r\n // Range is shared (not cloned) by all meshes and the mesh list itself, so modifying the range of the meshlist will modify it for all meshes.\r\n // We will then later add this offset back to the range once all of the graphics have been created because it is needed unmodified for locate.\r\n if (!meshesRangeOffset) {\r\n meshes.range?.low.subtractInPlace(transformOrigin);\r\n meshes.range?.high.subtractInPlace(transformOrigin);\r\n meshesRangeOffset = true;\r\n }\r\n }\r\n } else {\r\n assert(undefined !== transformOrigin);\r\n if (verts instanceof QPoint3dList) {\r\n assert(transformOrigin.isAlmostEqual(verts.params.origin));\r\n verts.params.origin.setZero();\r\n } else {\r\n assert(verts.range.center.isAlmostZero);\r\n }\r\n }\r\n\r\n const graphic = this.system.createMeshGraphics(mesh, this._viewIndependentOrigin);\r\n if (graphic)\r\n branch.add(graphic);\r\n }\r\n\r\n if (!branch.isEmpty) {\r\n assert(undefined !== transformOrigin);\r\n const transform = Transform.createTranslation(transformOrigin);\r\n graphics.push(this.system.createBranch(branch, transform));\r\n if (meshesRangeOffset) { // restore the meshes range that we modified earlier.\r\n meshes.range?.low.addInPlace(transformOrigin);\r\n meshes.range?.high.addInPlace(transformOrigin);\r\n }\r\n }\r\n\r\n return meshes;\r\n }\r\n\r\n private saveToTemplate(options: GeometryOptions, tolerance: number, pickable: { isVolumeClassifier?: boolean, modelId?: string } | undefined, noDispose: boolean): GraphicTemplate | undefined {\r\n const meshes = this[_accumulator].toMeshes(options, tolerance, pickable);\r\n if (0 === meshes.length)\r\n return undefined;\r\n\r\n // If the meshes contain quantized positions, they are all quantized to the same range. If that range is small relative to the distance\r\n // from the origin, quantization errors can produce display artifacts. Remove the translation from the quantization parameters and apply\r\n // it in the transform instead.\r\n //\r\n // If the positions are not quantized, they have already been transformed to be relative to the center of the meshes' range.\r\n // Apply the inverse translation to put them back into model space.\r\n let transformOrigin: Point3d | undefined;\r\n let meshesRangeOffset = false;\r\n const geometry: RenderGeometry[] = [];\r\n\r\n for (const mesh of meshes) {\r\n const verts = mesh.points;\r\n if (!transformOrigin){\r\n if (verts instanceof QPoint3dList) {\r\n transformOrigin = verts.params.origin.clone();\r\n verts.params.origin.setZero();\r\n } else {\r\n transformOrigin = verts.range.center;\r\n // In this case we need to modify the qOrigin of the graphic that will get created later since we have translated the origin.\r\n // We can't modify it directly, but if we temporarily modify the range of the mesh used to create it the qOrigin will get created properly.\r\n // Range is shared (not cloned) by all meshes and the mesh list itself, so modifying the range of the meshlist will modify it for all meshes.\r\n // We will then later add this offset back to the range once all of the graphics have been created because it is needed unmodified for locate.\r\n if (!meshesRangeOffset) {\r\n meshes.range?.low.subtractInPlace(transformOrigin);\r\n meshes.range?.high.subtractInPlace(transformOrigin);\r\n meshesRangeOffset = true;\r\n }\r\n }\r\n } else {\r\n if (verts instanceof QPoint3dList) {\r\n assert(transformOrigin.isAlmostEqual(verts.params.origin));\r\n verts.params.origin.setZero();\r\n } else {\r\n assert(verts.range.center.isAlmostZero);\r\n }\r\n }\r\n\r\n const geom = this.system.createGeometryFromMesh(mesh, this._viewIndependentOrigin);\r\n if (geom) {\r\n geometry.push(geom);\r\n }\r\n }\r\n\r\n let transform;\r\n if (transformOrigin) {\r\n transform = Transform.createTranslation(transformOrigin);\r\n if (meshesRangeOffset) { // restore the meshes range that we modified earlier.\r\n meshes.range?.low.addInPlace(transformOrigin);\r\n meshes.range?.high.addInPlace(transformOrigin);\r\n }\r\n }\r\n\r\n let batch: GraphicTemplateBatch | undefined;\r\n if (meshes.features?.anyDefined) {\r\n batch = {\r\n featureTable: PackedFeatureTable.pack(meshes.features),\r\n range: meshes.range ?? new Range3d(),\r\n options: this._options.pickable,\r\n };\r\n }\r\n\r\n return createGraphicTemplate({\r\n batch,\r\n nodes: [{ geometry, transform }],\r\n noDispose,\r\n });\r\n }\r\n}\r\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Rendering
|
|
3
|
+
*/
|
|
4
|
+
import { IDisposable } from "@itwin/core-bentley";
|
|
5
|
+
import { RenderMemory } from "../../render/RenderMemory";
|
|
6
|
+
import { Range3d } from "@itwin/core-geometry";
|
|
7
|
+
/** An opaque representation of geometry allocated by a [[RenderSystem]] to be supplied to [[RenderSystem.createRenderGraphic]]. */
|
|
8
|
+
export interface RenderGeometry extends IDisposable, RenderMemory.Consumer {
|
|
9
|
+
readonly renderGeometryType: "mesh" | "polyline" | "point-string" | "point-cloud" | "reality-mesh";
|
|
10
|
+
readonly isInstanceable: boolean;
|
|
11
|
+
readonly isDisposed: boolean;
|
|
12
|
+
/** If true, this geometry is intended for reuse. Its `dispose` method will do nothing. Instead, we will rely on the JS garbage collector
|
|
13
|
+
* to dispose of any WebGL resources it contains.
|
|
14
|
+
* When creating a reusable `GraphicTemplate`, we set this to `true` for all geometry in the template. We never set it to `false`.
|
|
15
|
+
*/
|
|
16
|
+
noDispose: boolean;
|
|
17
|
+
/** @internal */
|
|
18
|
+
computeRange(out?: Range3d): Range3d;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=RenderGeometry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RenderGeometry.d.ts","sourceRoot":"","sources":["../../../../src/internal/render/RenderGeometry.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,mIAAmI;AACnI,MAAM,WAAW,cAAe,SAAQ,WAAW,EAAE,YAAY,CAAC,QAAQ;IACxE,QAAQ,CAAC,kBAAkB,EAAE,MAAM,GAAG,UAAU,GAAG,cAAc,GAAG,aAAa,GAAG,cAAc,CAAC;IACnG,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB,gBAAgB;IAChB,YAAY,CAAC,GAAG,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;CACtC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
/** @packageDocumentation
|
|
7
|
+
* @module Rendering
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
//# sourceMappingURL=RenderGeometry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RenderGeometry.js","sourceRoot":"","sources":["../../../../src/internal/render/RenderGeometry.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","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 { IDisposable } from \"@itwin/core-bentley\";\r\nimport { RenderMemory } from \"../../render/RenderMemory\";\r\nimport { Range3d } from \"@itwin/core-geometry\";\r\n\r\n/** An opaque representation of geometry allocated by a [[RenderSystem]] to be supplied to [[RenderSystem.createRenderGraphic]]. */\r\nexport interface RenderGeometry extends IDisposable, RenderMemory.Consumer {\r\n readonly renderGeometryType: \"mesh\" | \"polyline\" | \"point-string\" | \"point-cloud\" | \"reality-mesh\";\r\n readonly isInstanceable: boolean;\r\n readonly isDisposed: boolean;\r\n /** If true, this geometry is intended for reuse. Its `dispose` method will do nothing. Instead, we will rely on the JS garbage collector\r\n * to dispose of any WebGL resources it contains.\r\n * When creating a reusable `GraphicTemplate`, we set this to `true` for all geometry in the template. We never set it to `false`.\r\n */\r\n noDispose: boolean;\r\n /** @internal */\r\n computeRange(out?: Range3d): Range3d;\r\n}\r\n\r\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Rendering
|
|
3
|
+
*/
|
|
4
|
+
import { Id64String } from "@itwin/core-bentley";
|
|
5
|
+
import { _implementationProhibited } from "../../common/internal/Symbols";
|
|
6
|
+
import { InstancedGraphicProps } from "../../common/render/InstancedGraphicParams";
|
|
7
|
+
import { CreateRenderInstancesParamsBuilderArgs, RenderInstancesParams, RenderInstancesParamsBuilder } from "../../common/render/RenderInstancesParams";
|
|
8
|
+
/** Intermediate representation of `RenderInstances[_batch]`. */
|
|
9
|
+
export interface InstancedFeaturesParams {
|
|
10
|
+
modelId: Id64String;
|
|
11
|
+
data: Uint32Array;
|
|
12
|
+
count: number;
|
|
13
|
+
}
|
|
14
|
+
/** This exists so that [[RenderInstancesParams]] can be an opaque type that can be copied between Workers.
|
|
15
|
+
* (`Symbol`s are dropped during structured cloning).
|
|
16
|
+
*/
|
|
17
|
+
export interface RenderInstancesParamsImpl extends RenderInstancesParams {
|
|
18
|
+
[_implementationProhibited]: "renderInstancesParams";
|
|
19
|
+
instances: InstancedGraphicProps;
|
|
20
|
+
features?: InstancedFeaturesParams;
|
|
21
|
+
}
|
|
22
|
+
export declare function createRenderInstancesParamsBuilder(args: CreateRenderInstancesParamsBuilderArgs): RenderInstancesParamsBuilder;
|
|
23
|
+
export declare function collectRenderInstancesParamsTransferables(xfers: Set<Transferable>, inParams: RenderInstancesParams): void;
|
|
24
|
+
//# sourceMappingURL=RenderInstancesParamsImpl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RenderInstancesParamsImpl.d.ts","sourceRoot":"","sources":["../../../../src/internal/render/RenderInstancesParamsImpl.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EAAE,sCAAsC,EAAY,qBAAqB,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AAIlK,gEAAgE;AAChE,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,UAAU,CAAC;IACpB,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,qBAAqB;IACtE,CAAC,yBAAyB,CAAC,EAAE,uBAAuB,CAAC;IACrD,SAAS,EAAE,qBAAqB,CAAC;IACjC,QAAQ,CAAC,EAAE,uBAAuB,CAAC;CACpC;AAkDD,wBAAgB,kCAAkC,CAAC,IAAI,EAAE,sCAAsC,GAAG,4BAA4B,CAE7H;AAED,wBAAgB,yCAAyC,CAAC,KAAK,EAAE,GAAG,CAAC,YAAY,CAAC,EAAE,QAAQ,EAAE,qBAAqB,GAAG,IAAI,CASzH"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
/** @packageDocumentation
|
|
7
|
+
* @module Rendering
|
|
8
|
+
*/
|
|
9
|
+
var _a;
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.collectRenderInstancesParamsTransferables = exports.createRenderInstancesParamsBuilder = void 0;
|
|
12
|
+
const Symbols_1 = require("../../common/internal/Symbols");
|
|
13
|
+
const InstancedGraphicParams_1 = require("../../common/render/InstancedGraphicParams");
|
|
14
|
+
const InstancedGraphicPropsBuilder_1 = require("../../common/internal/render/InstancedGraphicPropsBuilder");
|
|
15
|
+
const core_common_1 = require("@itwin/core-common");
|
|
16
|
+
class Builder {
|
|
17
|
+
constructor(modelId) {
|
|
18
|
+
this[_a] = undefined;
|
|
19
|
+
this._instances = new InstancedGraphicPropsBuilder_1.InstancedGraphicPropsBuilder();
|
|
20
|
+
this._containsFeatures = false;
|
|
21
|
+
this._modelId = modelId;
|
|
22
|
+
}
|
|
23
|
+
add(instance) {
|
|
24
|
+
this._instances.add(instance);
|
|
25
|
+
if (undefined !== instance.feature) {
|
|
26
|
+
this._containsFeatures = true;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
finish() {
|
|
30
|
+
const numInstances = this._instances.length;
|
|
31
|
+
if (numInstances === 0) {
|
|
32
|
+
throw new Error("No instances defined");
|
|
33
|
+
}
|
|
34
|
+
let featureTable;
|
|
35
|
+
if (this._containsFeatures) {
|
|
36
|
+
featureTable = new core_common_1.FeatureTable(numInstances, this._modelId);
|
|
37
|
+
}
|
|
38
|
+
const instances = this._instances.finish(featureTable);
|
|
39
|
+
const result = {
|
|
40
|
+
[Symbols_1._implementationProhibited]: "renderInstancesParams",
|
|
41
|
+
instances,
|
|
42
|
+
};
|
|
43
|
+
if (featureTable) {
|
|
44
|
+
const packedTable = core_common_1.PackedFeatureTable.pack(featureTable);
|
|
45
|
+
result.features = {
|
|
46
|
+
data: packedTable.data,
|
|
47
|
+
modelId: packedTable.batchModelId,
|
|
48
|
+
count: packedTable.numFeatures,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
return result;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
_a = Symbols_1._implementationProhibited;
|
|
55
|
+
function createRenderInstancesParamsBuilder(args) {
|
|
56
|
+
return new Builder(args.modelId);
|
|
57
|
+
}
|
|
58
|
+
exports.createRenderInstancesParamsBuilder = createRenderInstancesParamsBuilder;
|
|
59
|
+
function collectRenderInstancesParamsTransferables(xfers, inParams) {
|
|
60
|
+
const params = inParams;
|
|
61
|
+
if (params.instances) {
|
|
62
|
+
InstancedGraphicParams_1.InstancedGraphicProps.collectTransferables(xfers, params.instances);
|
|
63
|
+
}
|
|
64
|
+
if (params.features) {
|
|
65
|
+
xfers.add(params.features.data.buffer);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.collectRenderInstancesParamsTransferables = collectRenderInstancesParamsTransferables;
|
|
69
|
+
//# sourceMappingURL=RenderInstancesParamsImpl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RenderInstancesParamsImpl.js","sourceRoot":"","sources":["../../../../src/internal/render/RenderInstancesParamsImpl.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;AAGH,2DAA0E;AAC1E,uFAAmF;AAEnF,4GAAyG;AACzG,oDAAsE;AAkBtE,MAAM,OAAO;IAMX,YAAmB,OAAoB;QALvB,QAA2B,GAAG,SAAS,CAAC;QACvC,eAAU,GAAG,IAAI,2DAA4B,EAAE,CAAC;QAEzD,sBAAiB,GAAG,KAAK,CAAC;QAGhC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC1B,CAAC;IAEM,GAAG,CAAC,QAAkB;QAC3B,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAE9B,IAAI,SAAS,KAAK,QAAQ,CAAC,OAAO,EAAE,CAAC;YACnC,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;QAChC,CAAC;IACH,CAAC;IAEM,MAAM;QACX,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;QAC5C,IAAI,YAAY,KAAK,CAAC,EAAE,CAAC;YACvB,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;QAC1C,CAAC;QAED,IAAI,YAAY,CAAC;QACjB,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC3B,YAAY,GAAG,IAAI,0BAAY,CAAC,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC/D,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QACvD,MAAM,MAAM,GAA8B;YACxC,CAAC,mCAAyB,CAAC,EAAE,uBAAuB;YACpD,SAAS;SACV,CAAC;QAEF,IAAI,YAAY,EAAE,CAAC;YACjB,MAAM,WAAW,GAAG,gCAAkB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YAC1D,MAAM,CAAC,QAAQ,GAAG;gBAChB,IAAI,EAAE,WAAW,CAAC,IAAI;gBACtB,OAAO,EAAE,WAAW,CAAC,YAAY;gBACjC,KAAK,EAAE,WAAW,CAAC,WAAW;aAC/B,CAAC;QACJ,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;KA7CkB,mCAAyB;AA+C5C,SAAgB,kCAAkC,CAAC,IAA4C;IAC7F,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC;AAFD,gFAEC;AAED,SAAgB,yCAAyC,CAAC,KAAwB,EAAE,QAA+B;IACjH,MAAM,MAAM,GAAG,QAAqC,CAAC;IACrD,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;QACrB,8CAAqB,CAAC,oBAAoB,CAAC,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;IACtE,CAAC;IAED,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;QACpB,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC;AACH,CAAC;AATD,8FASC","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 { Id64String } from \"@itwin/core-bentley\";\r\nimport { _implementationProhibited } from \"../../common/internal/Symbols\";\r\nimport { InstancedGraphicProps } from \"../../common/render/InstancedGraphicParams\";\r\nimport { CreateRenderInstancesParamsBuilderArgs, Instance, RenderInstancesParams, RenderInstancesParamsBuilder } from \"../../common/render/RenderInstancesParams\";\r\nimport { InstancedGraphicPropsBuilder } from \"../../common/internal/render/InstancedGraphicPropsBuilder\";\r\nimport { FeatureTable, PackedFeatureTable } from \"@itwin/core-common\";\r\n\r\n/** Intermediate representation of `RenderInstances[_batch]`. */\r\nexport interface InstancedFeaturesParams {\r\n modelId: Id64String;\r\n data: Uint32Array;\r\n count: number;\r\n}\r\n\r\n/** This exists so that [[RenderInstancesParams]] can be an opaque type that can be copied between Workers.\r\n * (`Symbol`s are dropped during structured cloning).\r\n */\r\nexport interface RenderInstancesParamsImpl extends RenderInstancesParams {\r\n [_implementationProhibited]: \"renderInstancesParams\";\r\n instances: InstancedGraphicProps;\r\n features?: InstancedFeaturesParams;\r\n}\r\n\r\nclass Builder implements RenderInstancesParamsBuilder {\r\n public readonly [_implementationProhibited] = undefined;\r\n private readonly _instances = new InstancedGraphicPropsBuilder();\r\n private readonly _modelId?: Id64String;\r\n private _containsFeatures = false;\r\n\r\n public constructor(modelId?: Id64String) {\r\n this._modelId = modelId;\r\n }\r\n\r\n public add(instance: Instance): void {\r\n this._instances.add(instance);\r\n\r\n if (undefined !== instance.feature) {\r\n this._containsFeatures = true;\r\n }\r\n }\r\n\r\n public finish(): RenderInstancesParams {\r\n const numInstances = this._instances.length;\r\n if (numInstances === 0) {\r\n throw new Error(\"No instances defined\");\r\n }\r\n\r\n let featureTable;\r\n if (this._containsFeatures) {\r\n featureTable = new FeatureTable(numInstances, this._modelId);\r\n }\r\n\r\n const instances = this._instances.finish(featureTable);\r\n const result: RenderInstancesParamsImpl = {\r\n [_implementationProhibited]: \"renderInstancesParams\",\r\n instances,\r\n };\r\n\r\n if (featureTable) {\r\n const packedTable = PackedFeatureTable.pack(featureTable);\r\n result.features = {\r\n data: packedTable.data,\r\n modelId: packedTable.batchModelId,\r\n count: packedTable.numFeatures,\r\n };\r\n }\r\n\r\n return result;\r\n }\r\n}\r\n\r\nexport function createRenderInstancesParamsBuilder(args: CreateRenderInstancesParamsBuilderArgs): RenderInstancesParamsBuilder {\r\n return new Builder(args.modelId);\r\n}\r\n\r\nexport function collectRenderInstancesParamsTransferables(xfers: Set<Transferable>, inParams: RenderInstancesParams): void {\r\n const params = inParams as RenderInstancesParamsImpl;\r\n if (params.instances) {\r\n InstancedGraphicProps.collectTransferables(xfers, params.instances);\r\n }\r\n\r\n if (params.features) {\r\n xfers.add(params.features.data.buffer);\r\n }\r\n}\r\n"]}
|
|
@@ -10,7 +10,7 @@ import { RenderGraphic } from "./RenderGraphic";
|
|
|
10
10
|
import { RenderMemory } from "./RenderMemory";
|
|
11
11
|
import { RenderPlanarClassifier } from "./RenderPlanarClassifier";
|
|
12
12
|
import { RenderTextureDrape } from "./RenderSystem";
|
|
13
|
-
import { Range3d } from "@itwin/core-geometry";
|
|
13
|
+
import { Range3d, Transform } from "@itwin/core-geometry";
|
|
14
14
|
import { AnimationNodeId } from "../common/internal/render/AnimationNodeId";
|
|
15
15
|
/** Carries information in a GraphicBranchOptions about a GraphicBranch produced by drawing one view into the context of another.
|
|
16
16
|
* @internal
|
|
@@ -102,6 +102,11 @@ export interface GraphicBranchOptions {
|
|
|
102
102
|
hline?: HiddenLine.Settings;
|
|
103
103
|
/** The iModel from which the graphics originate, if different than that associated with the view. */
|
|
104
104
|
iModel?: IModelConnection;
|
|
105
|
+
/** An optional transform from the coordinate system of [[iModel]] to those of a different [[IModelConnection]].
|
|
106
|
+
* This is used by [[AccuSnap]] when displaying one iModel in the context of another iModel (i.e., the iModel associated
|
|
107
|
+
* with the [[Viewport]]).
|
|
108
|
+
*/
|
|
109
|
+
transformFromIModel?: Transform;
|
|
105
110
|
/** @internal */
|
|
106
111
|
frustum?: GraphicBranchFrustum;
|
|
107
112
|
/** Supplements the view's [[FeatureSymbology.Overrides]] for graphics in the branch. */
|
|
@@ -112,6 +117,10 @@ export interface GraphicBranchOptions {
|
|
|
112
117
|
* @internal
|
|
113
118
|
*/
|
|
114
119
|
viewAttachmentId?: Id64String;
|
|
120
|
+
/** If true, the view's [DisplayStyleSettings.clipStyle]($common) will be disabled for this branch.
|
|
121
|
+
* No [ClipStyle.insideColor]($common), [ClipStyle.outsideColor]($common), or [ClipStyle.intersectionStyle]($common) will be applied.
|
|
122
|
+
*/
|
|
123
|
+
disableClipStyle?: true;
|
|
115
124
|
}
|
|
116
125
|
/** Clip/Transform for a branch that are varied over time.
|
|
117
126
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GraphicBranch.d.ts","sourceRoot":"","sources":["../../../src/render/GraphicBranch.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAgB,UAAU,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EACL,yBAAyB,EAAE,UAAU,EAAE,2BAA2B,EAAE,cAAc,EAAE,iBAAiB,EAAE,SAAS,EACjH,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"GraphicBranch.d.ts","sourceRoot":"","sources":["../../../src/render/GraphicBranch.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAgB,UAAU,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EACL,yBAAyB,EAAE,UAAU,EAAE,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IAAI,IAAI;QACN,QAAQ,CAAC,GAAG,CAAC,uBAAuB,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;AACvE,CAAC;AAYD,gBAAgB;AAChB,IAAiB,qBAAqB,CAqBrC;AArBD,WAAiB,qBAAqB;IACpC,SAAgB,UAAU,CAAC,MAA6B,EAAE,IAAY;QACpE,IAAI,CAAC,MAAM,CAAC,qBAAqB,IAAI,CAAC,MAAM,CAAC,gBAAgB;YAC3D,OAAO,SAAS,CAAC;QAEnB,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAgC,CAAC;QACzD,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,cAAc,EAAE,CAAC;YAC1C,kBAAkB,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;YAC7D,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,gBAAgB,EAAE,CAAC;gBAC1C,IAAI,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC;oBAC/B,QAAQ,CAAC,GAAG,CAAC,uBAAuB,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;;oBAEnF,kBAAkB,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;YAC1E,CAAC;QACH,CAAC;QAED,OAAO;YACL,YAAY,EAAE,QAAQ;YACtB,gBAAgB,EAAE,MAAM,CAAC,iBAAiB;SAC3C,CAAC;IACJ,CAAC;IAnBe,gCAAU,aAmBzB,CAAA;AACH,CAAC,EArBgB,qBAAqB,qCAArB,qBAAqB,QAqBrC","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 { disposeArray, Id64String, IDisposable } from \"@itwin/core-bentley\";\r\nimport {\r\n FeatureAppearanceProvider, HiddenLine, RealityModelDisplaySettings, RenderSchedule, ViewFlagOverrides, ViewFlags,\r\n} from \"@itwin/core-common\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport { IModelApp } from \"../IModelApp\";\r\nimport { FeatureSymbology } from \"./FeatureSymbology\";\r\nimport { RenderClipVolume } from \"./RenderClipVolume\";\r\nimport { RenderGraphic } from \"./RenderGraphic\";\r\nimport { RenderMemory } from \"./RenderMemory\";\r\nimport { RenderPlanarClassifier } from \"./RenderPlanarClassifier\";\r\nimport { RenderTextureDrape } from \"./RenderSystem\";\r\nimport { Range3d } from \"@itwin/core-geometry\";\r\nimport { AnimationNodeId } from \"../common/internal/render/AnimationNodeId\";\r\n\r\n/** Carries information in a GraphicBranchOptions about a GraphicBranch produced by drawing one view into the context of another.\r\n * @internal\r\n */\r\nexport interface GraphicBranchFrustum {\r\n is3d: boolean;\r\n scale: {\r\n x: number;\r\n y: number;\r\n };\r\n}\r\n\r\n/**\r\n * A node in a scene graph. The branch itself is not renderable. Instead it contains a list of RenderGraphics,\r\n * and a transform, symbology overrides, and clip volume which are to be applied when rendering them.\r\n * Branches can be nested to build an arbitrarily-complex scene graph.\r\n * @see [[RenderSystem.createBranch]]\r\n * @public\r\n * @extensions\r\n */\r\nexport class GraphicBranch implements IDisposable /* , RenderMemory.Consumer */ {\r\n /** The child nodes of this branch */\r\n public readonly entries: RenderGraphic[] = [];\r\n /** If true, when the branch is disposed of, the RenderGraphics in its entries array will also be disposed */\r\n public readonly ownsEntries: boolean;\r\n /** Selectively overrides the view's [ViewFlags]($common) while drawing graphics within this branch. The default overrides nothing.\r\n * @see [[setViewFlagOverrides]].\r\n */\r\n public viewFlagOverrides: ViewFlagOverrides = {};\r\n /** Controls how reality models are displayed within this branch.\r\n * @beta\r\n */\r\n public realityModelDisplaySettings?: RealityModelDisplaySettings;\r\n /** @internal */\r\n public realityModelRange?: Range3d;\r\n /** Optional symbology overrides to be applied to all graphics in this branch */\r\n public symbologyOverrides?: FeatureSymbology.Overrides;\r\n /** Optional animation branch Id that incorporates the model Id and, for element timelines, the batch Id.\r\n * @internal\r\n */\r\n public animationId?: string;\r\n /** Identifies the node in the [RenderSchedule.Script]($backend) with which this branch is associated.\r\n * @internal\r\n */\r\n public animationNodeId?: AnimationNodeId | number;\r\n\r\n /** Identifies the \"group\" to which this branch belongs.\r\n * Groups represent cross-cutting subsets of a tile tree's contents.\r\n * For example, if a tile tree contains geometry from multiple models, each model (or smaller groups of multiple models) could be considered a group.\r\n * The top-level branches containing graphics from multiple tiles will each specify the group they represent, and the child branches within each\r\n * tile will likewise specify the group to which they belong.\r\n * When drawing, only the graphics within a tile that correlate with the current group will be drawn.\r\n * Groups cannot nest.\r\n * @internal\r\n */\r\n public groupNodeId?: number;\r\n\r\n /** Constructor\r\n * @param ownsEntries If true, when this branch is [[dispose]]d, all of the [[RenderGraphic]]s it contains will also be disposed.\r\n */\r\n public constructor(ownsEntries: boolean = false) {\r\n this.ownsEntries = ownsEntries;\r\n }\r\n\r\n /** Add a graphic to this branch. */\r\n public add(graphic: RenderGraphic): void {\r\n this.entries.push(graphic);\r\n }\r\n\r\n /** Compute the view flags that result from applying this branch's [[viewFlagOverrides]] to the input flags.\r\n * @param flags The input view flags, e.g., from the view's [[DisplayStyleState]].\r\n * @returns The result of applying [[viewFlagOverrides]] to `flags`.\r\n */\r\n public getViewFlags(flags: ViewFlags): ViewFlags {\r\n return flags.override(this.viewFlagOverrides);\r\n }\r\n\r\n /** Set [[viewFlagOverrides]] to override **all** ViewFlags as specified by `flags`. */\r\n public setViewFlags(flags: ViewFlags): void {\r\n this.viewFlagOverrides = { ...flags };\r\n }\r\n\r\n /** Change [[viewFlagOverrides]]. */\r\n public setViewFlagOverrides(ovr: ViewFlagOverrides): void {\r\n this.viewFlagOverrides = { ...ovr };\r\n }\r\n\r\n /** Disposes of all graphics in this branch, if and only if [[ownsEntries]] is true. */\r\n public dispose() {\r\n this.clear();\r\n }\r\n\r\n /** Returns true if this branch contains no graphics. */\r\n public get isEmpty(): boolean {\r\n return 0 === this.entries.length;\r\n }\r\n\r\n /** Empties the list of [[RenderGraphic]]s contained in this branch, and if the [[ownsEntries]] flag is set, also disposes of them. */\r\n public clear(): void {\r\n if (this.ownsEntries)\r\n disposeArray(this.entries);\r\n else\r\n this.entries.length = 0;\r\n }\r\n\r\n /** @internal */\r\n public collectStatistics(stats: RenderMemory.Statistics): void {\r\n for (const entry of this.entries)\r\n entry.collectStatistics(stats);\r\n }\r\n}\r\n\r\n/** Options passed to [[RenderSystem.createGraphicBranch]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicBranchOptions {\r\n /** Clip applied to the graphics in the branch. */\r\n clipVolume?: RenderClipVolume;\r\n /** @internal */\r\n classifierOrDrape?: RenderPlanarClassifier | RenderTextureDrape;\r\n /** Optionally replaces the view's hidden line settings when drawing the branch. */\r\n hline?: HiddenLine.Settings;\r\n /** The iModel from which the graphics originate, if different than that associated with the view. */\r\n iModel?: IModelConnection;\r\n /** @internal */\r\n frustum?: GraphicBranchFrustum;\r\n /** Supplements the view's [[FeatureSymbology.Overrides]] for graphics in the branch. */\r\n appearanceProvider?: FeatureAppearanceProvider;\r\n /** @internal Secondary planar classifiers (map layers) */\r\n secondaryClassifiers?: Map<number, RenderPlanarClassifier>;\r\n /** The Id of the [ViewAttachment]($backend) from which this branch's graphics originated.\r\n * @internal\r\n */\r\n viewAttachmentId?: Id64String;\r\n}\r\n\r\n/** Clip/Transform for a branch that are varied over time.\r\n * @internal\r\n */\r\nexport interface AnimationBranchState {\r\n readonly clip?: RenderClipVolume;\r\n readonly omit?: boolean;\r\n}\r\n\r\n/** @internal */\r\nexport function formatAnimationBranchId(modelId: Id64String, branchId: number): string {\r\n if (branchId < 0)\r\n return modelId;\r\n\r\n return `${modelId}_Node_${branchId.toString()}`;\r\n}\r\n\r\nfunction addAnimationBranch(modelId: Id64String, timeline: RenderSchedule.Timeline, branchId: number, branches: Map<string, AnimationBranchState>, time: number): void {\r\n const clipVector = timeline.getClipVector(time);\r\n const clip = clipVector ? IModelApp.renderSystem.createClipVolume(clipVector) : undefined;\r\n if (clip)\r\n branches.set(formatAnimationBranchId(modelId, branchId), { clip });\r\n}\r\n\r\n/** Mapping from node/branch IDs to animation branch state\r\n * @internal\r\n */\r\nexport interface AnimationBranchStates {\r\n /** Maps node Id to branch state. */\r\n readonly branchStates: Map<string, AnimationBranchState>;\r\n /** Ids of nodes that apply a transform. */\r\n readonly transformNodeIds: ReadonlySet<number>;\r\n}\r\n\r\n/** @internal */\r\nexport namespace AnimationBranchStates {\r\n export function fromScript(script: RenderSchedule.Script, time: number): AnimationBranchStates | undefined {\r\n if (!script.containsModelClipping && !script.requiresBatching)\r\n return undefined;\r\n\r\n const branches = new Map<string, AnimationBranchState>();\r\n for (const model of script.modelTimelines) {\r\n addAnimationBranch(model.modelId, model, -1, branches, time);\r\n for (const elem of model.elementTimelines) {\r\n if (elem.getVisibility(time) <= 0)\r\n branches.set(formatAnimationBranchId(model.modelId, elem.batchId), { omit: true });\r\n else\r\n addAnimationBranch(model.modelId, elem, elem.batchId, branches, time);\r\n }\r\n }\r\n\r\n return {\r\n branchStates: branches,\r\n transformNodeIds: script.transformBatchIds,\r\n };\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"GraphicBranch.js","sourceRoot":"","sources":["../../../src/render/GraphicBranch.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA4E;AAK5E,4CAAyC;AAqBzC;;;;;;;GAOG;AACH,MAAa,aAAa;IAqCxB;;OAEG;IACH,YAAmB,cAAuB,KAAK;QAvC/C,qCAAqC;QACrB,YAAO,GAAoB,EAAE,CAAC;QAG9C;;WAEG;QAC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AE,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;YAC1E,CAAC;QACH,CAAC;QAED,OAAO;YACL,YAAY,EAAE,QAAQ;YACtB,gBAAgB,EAAE,MAAM,CAAC,iBAAiB;SAC3C,CAAC;IACJ,CAAC;IAnBe,gCAAU,aAmBzB,CAAA;AACH,CAAC,EArBgB,qBAAqB,qCAArB,qBAAqB,QAqBrC","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 { disposeArray, Id64String, IDisposable } from \"@itwin/core-bentley\";\r\nimport {\r\n FeatureAppearanceProvider, HiddenLine, RealityModelDisplaySettings, RenderSchedule, ViewFlagOverrides, ViewFlags,\r\n} from \"@itwin/core-common\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport { IModelApp } from \"../IModelApp\";\r\nimport { FeatureSymbology } from \"./FeatureSymbology\";\r\nimport { RenderClipVolume } from \"./RenderClipVolume\";\r\nimport { RenderGraphic } from \"./RenderGraphic\";\r\nimport { RenderMemory } from \"./RenderMemory\";\r\nimport { RenderPlanarClassifier } from \"./RenderPlanarClassifier\";\r\nimport { RenderTextureDrape } from \"./RenderSystem\";\r\nimport { Range3d, Transform } from \"@itwin/core-geometry\";\r\nimport { AnimationNodeId } from \"../common/internal/render/AnimationNodeId\";\r\n\r\n/** Carries information in a GraphicBranchOptions about a GraphicBranch produced by drawing one view into the context of another.\r\n * @internal\r\n */\r\nexport interface GraphicBranchFrustum {\r\n is3d: boolean;\r\n scale: {\r\n x: number;\r\n y: number;\r\n };\r\n}\r\n\r\n/**\r\n * A node in a scene graph. The branch itself is not renderable. Instead it contains a list of RenderGraphics,\r\n * and a transform, symbology overrides, and clip volume which are to be applied when rendering them.\r\n * Branches can be nested to build an arbitrarily-complex scene graph.\r\n * @see [[RenderSystem.createBranch]]\r\n * @public\r\n * @extensions\r\n */\r\nexport class GraphicBranch implements IDisposable /* , RenderMemory.Consumer */ {\r\n /** The child nodes of this branch */\r\n public readonly entries: RenderGraphic[] = [];\r\n /** If true, when the branch is disposed of, the RenderGraphics in its entries array will also be disposed */\r\n public readonly ownsEntries: boolean;\r\n /** Selectively overrides the view's [ViewFlags]($common) while drawing graphics within this branch. The default overrides nothing.\r\n * @see [[setViewFlagOverrides]].\r\n */\r\n public viewFlagOverrides: ViewFlagOverrides = {};\r\n /** Controls how reality models are displayed within this branch.\r\n * @beta\r\n */\r\n public realityModelDisplaySettings?: RealityModelDisplaySettings;\r\n /** @internal */\r\n public realityModelRange?: Range3d;\r\n /** Optional symbology overrides to be applied to all graphics in this branch */\r\n public symbologyOverrides?: FeatureSymbology.Overrides;\r\n /** Optional animation branch Id that incorporates the model Id and, for element timelines, the batch Id.\r\n * @internal\r\n */\r\n public animationId?: string;\r\n /** Identifies the node in the [RenderSchedule.Script]($backend) with which this branch is associated.\r\n * @internal\r\n */\r\n public animationNodeId?: AnimationNodeId | number;\r\n\r\n /** Identifies the \"group\" to which this branch belongs.\r\n * Groups represent cross-cutting subsets of a tile tree's contents.\r\n * For example, if a tile tree contains geometry from multiple models, each model (or smaller groups of multiple models) could be considered a group.\r\n * The top-level branches containing graphics from multiple tiles will each specify the group they represent, and the child branches within each\r\n * tile will likewise specify the group to which they belong.\r\n * When drawing, only the graphics within a tile that correlate with the current group will be drawn.\r\n * Groups cannot nest.\r\n * @internal\r\n */\r\n public groupNodeId?: number;\r\n\r\n /** Constructor\r\n * @param ownsEntries If true, when this branch is [[dispose]]d, all of the [[RenderGraphic]]s it contains will also be disposed.\r\n */\r\n public constructor(ownsEntries: boolean = false) {\r\n this.ownsEntries = ownsEntries;\r\n }\r\n\r\n /** Add a graphic to this branch. */\r\n public add(graphic: RenderGraphic): void {\r\n this.entries.push(graphic);\r\n }\r\n\r\n /** Compute the view flags that result from applying this branch's [[viewFlagOverrides]] to the input flags.\r\n * @param flags The input view flags, e.g., from the view's [[DisplayStyleState]].\r\n * @returns The result of applying [[viewFlagOverrides]] to `flags`.\r\n */\r\n public getViewFlags(flags: ViewFlags): ViewFlags {\r\n return flags.override(this.viewFlagOverrides);\r\n }\r\n\r\n /** Set [[viewFlagOverrides]] to override **all** ViewFlags as specified by `flags`. */\r\n public setViewFlags(flags: ViewFlags): void {\r\n this.viewFlagOverrides = { ...flags };\r\n }\r\n\r\n /** Change [[viewFlagOverrides]]. */\r\n public setViewFlagOverrides(ovr: ViewFlagOverrides): void {\r\n this.viewFlagOverrides = { ...ovr };\r\n }\r\n\r\n /** Disposes of all graphics in this branch, if and only if [[ownsEntries]] is true. */\r\n public dispose() {\r\n this.clear();\r\n }\r\n\r\n /** Returns true if this branch contains no graphics. */\r\n public get isEmpty(): boolean {\r\n return 0 === this.entries.length;\r\n }\r\n\r\n /** Empties the list of [[RenderGraphic]]s contained in this branch, and if the [[ownsEntries]] flag is set, also disposes of them. */\r\n public clear(): void {\r\n if (this.ownsEntries)\r\n disposeArray(this.entries);\r\n else\r\n this.entries.length = 0;\r\n }\r\n\r\n /** @internal */\r\n public collectStatistics(stats: RenderMemory.Statistics): void {\r\n for (const entry of this.entries)\r\n entry.collectStatistics(stats);\r\n }\r\n}\r\n\r\n/** Options passed to [[RenderSystem.createGraphicBranch]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicBranchOptions {\r\n /** Clip applied to the graphics in the branch. */\r\n clipVolume?: RenderClipVolume;\r\n /** @internal */\r\n classifierOrDrape?: RenderPlanarClassifier | RenderTextureDrape;\r\n /** Optionally replaces the view's hidden line settings when drawing the branch. */\r\n hline?: HiddenLine.Settings;\r\n /** The iModel from which the graphics originate, if different than that associated with the view. */\r\n iModel?: IModelConnection;\r\n /** An optional transform from the coordinate system of [[iModel]] to those of a different [[IModelConnection]].\r\n * This is used by [[AccuSnap]] when displaying one iModel in the context of another iModel (i.e., the iModel associated\r\n * with the [[Viewport]]).\r\n */\r\n transformFromIModel?: Transform;\r\n /** @internal */\r\n frustum?: GraphicBranchFrustum;\r\n /** Supplements the view's [[FeatureSymbology.Overrides]] for graphics in the branch. */\r\n appearanceProvider?: FeatureAppearanceProvider;\r\n /** @internal Secondary planar classifiers (map layers) */\r\n secondaryClassifiers?: Map<number, RenderPlanarClassifier>;\r\n /** The Id of the [ViewAttachment]($backend) from which this branch's graphics originated.\r\n * @internal\r\n */\r\n viewAttachmentId?: Id64String;\r\n /** If true, the view's [DisplayStyleSettings.clipStyle]($common) will be disabled for this branch.\r\n * No [ClipStyle.insideColor]($common), [ClipStyle.outsideColor]($common), or [ClipStyle.intersectionStyle]($common) will be applied.\r\n */\r\n disableClipStyle?: true;\r\n}\r\n\r\n/** Clip/Transform for a branch that are varied over time.\r\n * @internal\r\n */\r\nexport interface AnimationBranchState {\r\n readonly clip?: RenderClipVolume;\r\n readonly omit?: boolean;\r\n}\r\n\r\n/** @internal */\r\nexport function formatAnimationBranchId(modelId: Id64String, branchId: number): string {\r\n if (branchId < 0)\r\n return modelId;\r\n\r\n return `${modelId}_Node_${branchId.toString()}`;\r\n}\r\n\r\nfunction addAnimationBranch(modelId: Id64String, timeline: RenderSchedule.Timeline, branchId: number, branches: Map<string, AnimationBranchState>, time: number): void {\r\n const clipVector = timeline.getClipVector(time);\r\n const clip = clipVector ? IModelApp.renderSystem.createClipVolume(clipVector) : undefined;\r\n if (clip)\r\n branches.set(formatAnimationBranchId(modelId, branchId), { clip });\r\n}\r\n\r\n/** Mapping from node/branch IDs to animation branch state\r\n * @internal\r\n */\r\nexport interface AnimationBranchStates {\r\n /** Maps node Id to branch state. */\r\n readonly branchStates: Map<string, AnimationBranchState>;\r\n /** Ids of nodes that apply a transform. */\r\n readonly transformNodeIds: ReadonlySet<number>;\r\n}\r\n\r\n/** @internal */\r\nexport namespace AnimationBranchStates {\r\n export function fromScript(script: RenderSchedule.Script, time: number): AnimationBranchStates | undefined {\r\n if (!script.containsModelClipping && !script.requiresBatching)\r\n return undefined;\r\n\r\n const branches = new Map<string, AnimationBranchState>();\r\n for (const model of script.modelTimelines) {\r\n addAnimationBranch(model.modelId, model, -1, branches, time);\r\n for (const elem of model.elementTimelines) {\r\n if (elem.getVisibility(time) <= 0)\r\n branches.set(formatAnimationBranchId(model.modelId, elem.batchId), { omit: true });\r\n else\r\n addAnimationBranch(model.modelId, elem, elem.batchId, branches, time);\r\n }\r\n }\r\n\r\n return {\r\n branchStates: branches,\r\n transformNodeIds: script.transformBatchIds,\r\n };\r\n }\r\n}\r\n"]}
|
|
@@ -9,6 +9,7 @@ import { RenderGraphic } from "./RenderGraphic";
|
|
|
9
9
|
import { GraphicType } from "../common/render/GraphicType";
|
|
10
10
|
import type { PickableGraphicOptions } from "../common/render/BatchOptions";
|
|
11
11
|
import { GraphicAssembler } from "../common/render/GraphicAssembler";
|
|
12
|
+
import { GraphicTemplate } from "./GraphicTemplate";
|
|
12
13
|
/** Options for creating a [[GraphicBuilder]] used by functions like [[DecorateContext.createGraphic]] and [[RenderSystem.createGraphic]].
|
|
13
14
|
* @see [[ViewportGraphicBuilderOptions]] to create a graphic builder for a [[Viewport]].
|
|
14
15
|
* @see [[CustomGraphicBuilderOptions]] to create a graphic builder unassociated with any [[Viewport]].
|
|
@@ -67,7 +68,7 @@ export interface ViewportGraphicBuilderOptions extends GraphicBuilderOptions {
|
|
|
67
68
|
iModel?: never;
|
|
68
69
|
computeChordTolerance?: never;
|
|
69
70
|
}
|
|
70
|
-
/** Arguments used to compute the chord tolerance (level of detail) of the [[RenderGraphic]]
|
|
71
|
+
/** Arguments used to compute the chord tolerance (level of detail) of the [[RenderGraphic]] or [[GraphicTemplate]] produced by a [[GraphicBuilder]].
|
|
71
72
|
* Generally, the chord tolerance should be roughly equivalent to the size in meters of one pixel on screen where the graphic is to be displayed.
|
|
72
73
|
* For [[GraphicType.ViewOverlay]] and [[GraphicType.ViewBackground]], which already define their geometry in pixels, the chord tolerance should typically be 1.
|
|
73
74
|
* @see [[CustomGraphicBuilderOptions.computeChordTolerance]].
|
|
@@ -80,7 +81,7 @@ export interface ComputeChordToleranceArgs {
|
|
|
80
81
|
/** A function that computes a range enclosing all of the geometry that was added to the builder. */
|
|
81
82
|
readonly computeRange: () => Range3d;
|
|
82
83
|
}
|
|
83
|
-
/** Options for creating a [[GraphicBuilder]] to produce a [[RenderGraphic]] that is not associated with any particular [[Viewport]] and may not be associated with
|
|
84
|
+
/** Options for creating a [[GraphicBuilder]] to produce a [[RenderGraphic]] or [[GraphicTemplate]] that is not associated with any particular [[Viewport]] and may not be associated with
|
|
84
85
|
* any particular [[IModelConnection]].
|
|
85
86
|
* This is primarily useful when the same graphic is to be saved and reused for display in multiple viewports and for which a chord tolerance can be computed
|
|
86
87
|
* independently of each viewport's [Frustum]($common).
|
|
@@ -95,7 +96,7 @@ export interface CustomGraphicBuilderOptions extends GraphicBuilderOptions {
|
|
|
95
96
|
applyAspectRatioSkew?: never;
|
|
96
97
|
viewport?: never;
|
|
97
98
|
}
|
|
98
|
-
/** Provides methods for constructing a [[RenderGraphic]] from geometric primitives and symbology.
|
|
99
|
+
/** Provides methods for constructing a [[RenderGraphic]] or [[GraphicTemplate]] from geometric primitives and symbology.
|
|
99
100
|
* GraphicBuilder is primarily used for creating [[Decorations]] to be displayed inside a [[Viewport]].
|
|
100
101
|
*
|
|
101
102
|
* The typical process for constructing a [[RenderGraphic]] proceeds as follows:
|
|
@@ -104,6 +105,12 @@ export interface CustomGraphicBuilderOptions extends GraphicBuilderOptions {
|
|
|
104
105
|
* 3. Add one or more geometric primitives using methods like [[GraphicBuilder.addShape]] and [[GraphicBuilder.addLineString]], possibly setting new symbology in between.
|
|
105
106
|
* 4. Use [[GraphicBuilder.finish]] to produce the finished [[RenderGraphic]].
|
|
106
107
|
*
|
|
108
|
+
* The process for constructing a [[GraphicTemplate]] is similar:
|
|
109
|
+
* 1. Use [[RenderSystem.createGraphic]] to obtain a builder.
|
|
110
|
+
* 2. Set up the symbology using [[GraphicBuilder.activateGraphicParams]] or [[GraphicBuilder.setSymbology]].
|
|
111
|
+
* 3. Add one or more geometric primitives using methods like [[GraphicBuilder.addShape]] and [[GraphicBuilder.addLineString]], possibly setting new symbology in between.
|
|
112
|
+
* 4. Use [[GraphicBuilder.finishTemplate]] to produce the finished [[GraphicTemplate]].
|
|
113
|
+
*
|
|
107
114
|
* @note Most of the methods which add geometry to the builder take ownership of their inputs rather than cloning them.
|
|
108
115
|
* So, for example, if you pass an array of points to addLineString(), you should not subsequently modify that array.
|
|
109
116
|
*
|
|
@@ -125,7 +132,14 @@ export declare abstract class GraphicBuilder extends GraphicAssembler {
|
|
|
125
132
|
/**
|
|
126
133
|
* Processes the accumulated symbology and geometry to produce a renderable graphic.
|
|
127
134
|
* This function can only be called once; after the [[RenderGraphic]] has been extracted the [[GraphicBuilder]] should no longer be used.
|
|
135
|
+
* @see [[finishTemplate]] to obtain a [[GraphicTemplate]] instead.
|
|
128
136
|
*/
|
|
129
137
|
abstract finish(): RenderGraphic;
|
|
138
|
+
/** Processes the accumulated symbology and geometry to produce a reusable template for a [[RenderGraphic]].
|
|
139
|
+
* This function can only be called once; after the [[GraphicTemplate]] has been extracted the [[GraphicBuilder]] should no longer be used.
|
|
140
|
+
* @see [[finish]] to obtain a [[RenderGraphic]] instead.
|
|
141
|
+
* @beta
|
|
142
|
+
*/
|
|
143
|
+
abstract finishTemplate(): GraphicTemplate;
|
|
130
144
|
}
|
|
131
145
|
//# sourceMappingURL=GraphicBuilder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GraphicBuilder.d.ts","sourceRoot":"","sources":["../../../src/render/GraphicBuilder.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,M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@@ const core_geometry_1 = require("@itwin/core-geometry");
|
|
|
12
12
|
const GraphicType_1 = require("../common/render/GraphicType");
|
|
13
13
|
const GraphicAssembler_1 = require("../common/render/GraphicAssembler");
|
|
14
14
|
const Symbols_1 = require("../common/internal/Symbols");
|
|
15
|
-
/** Provides methods for constructing a [[RenderGraphic]] from geometric primitives and symbology.
|
|
15
|
+
/** Provides methods for constructing a [[RenderGraphic]] or [[GraphicTemplate]] from geometric primitives and symbology.
|
|
16
16
|
* GraphicBuilder is primarily used for creating [[Decorations]] to be displayed inside a [[Viewport]].
|
|
17
17
|
*
|
|
18
18
|
* The typical process for constructing a [[RenderGraphic]] proceeds as follows:
|
|
@@ -21,6 +21,12 @@ const Symbols_1 = require("../common/internal/Symbols");
|
|
|
21
21
|
* 3. Add one or more geometric primitives using methods like [[GraphicBuilder.addShape]] and [[GraphicBuilder.addLineString]], possibly setting new symbology in between.
|
|
22
22
|
* 4. Use [[GraphicBuilder.finish]] to produce the finished [[RenderGraphic]].
|
|
23
23
|
*
|
|
24
|
+
* The process for constructing a [[GraphicTemplate]] is similar:
|
|
25
|
+
* 1. Use [[RenderSystem.createGraphic]] to obtain a builder.
|
|
26
|
+
* 2. Set up the symbology using [[GraphicBuilder.activateGraphicParams]] or [[GraphicBuilder.setSymbology]].
|
|
27
|
+
* 3. Add one or more geometric primitives using methods like [[GraphicBuilder.addShape]] and [[GraphicBuilder.addLineString]], possibly setting new symbology in between.
|
|
28
|
+
* 4. Use [[GraphicBuilder.finishTemplate]] to produce the finished [[GraphicTemplate]].
|
|
29
|
+
*
|
|
24
30
|
* @note Most of the methods which add geometry to the builder take ownership of their inputs rather than cloning them.
|
|
25
31
|
* So, for example, if you pass an array of points to addLineString(), you should not subsequently modify that array.
|
|
26
32
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GraphicBuilder.js","sourceRoot":"","sources":["../../../src/render/GraphicBuilder.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;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GAAG,CAAC,CAAC;YAClB,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;gBAC5B,uGAAuG;gBACvG,SAAS,GAAG,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,MAAM,CAAC,CAAC;gBAC7E,SAAS,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC;gBAErE,kIAAkI;gBAClI,MAAM,IAAI,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC3F,IAAI,IAAI,GAAG,CAAC;oBACV,SAAS,IAAI,IAAI,CAAC;YACtB,CAAC;YAED,OAAO,SAAS,GAAG,IAAI,CAAC;QAC1B,CAAC,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC;IAC3B,CAAC;CAOF;AA5DD,wCA4DC","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 { Id64String } from \"@itwin/core-bentley\";\r\nimport { Point3d, Range3d, Transform } from \"@itwin/core-geometry\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport { Viewport } from \"../Viewport\";\r\nimport { RenderGraphic } from \"./RenderGraphic\";\r\nimport { GraphicType } from \"../common/render/GraphicType\";\r\nimport type { PickableGraphicOptions} from \"../common/render/BatchOptions\";\r\nimport { GraphicAssembler } from \"../common/render/GraphicAssembler\";\r\nimport { _implementationProhibited } from \"../common/internal/Symbols\";\r\n\r\n/** Options for creating a [[GraphicBuilder]] used by functions like [[DecorateContext.createGraphic]] and [[RenderSystem.createGraphic]].\r\n * @see [[ViewportGraphicBuilderOptions]] to create a graphic builder for a [[Viewport]].\r\n * @see [[CustomGraphicBuilderOptions]] to create a graphic builder unassociated with any [[Viewport]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicBuilderOptions {\r\n /** The type of graphic to produce. */\r\n type: GraphicType;\r\n\r\n /** The local-to-world transform in which the builder's geometry is to be defined - by default, an identity transform. */\r\n placement?: Transform;\r\n\r\n /** If the graphic is to be pickable, specifies the pickable Id and other options. */\r\n pickable?: PickableGraphicOptions;\r\n\r\n /** If true, the order in which geometry is added to the builder is preserved.\r\n * This is useful for overlay and background graphics because they draw without using the depth buffer. For example, to draw an overlay containing a red shape with a white outline,\r\n * you would add the shape to the GraphicBuilder first, followed by the outline, to ensure the outline draws \"in front of\" the shape.\r\n * It defaults to true for overlays and background graphics, and false for other graphic types.\r\n * It is not useful for other types of graphics and imposes a performance penalty due to increased number of draw calls.\r\n * For overlay and background graphics that do not need to draw in any particular order, the performance penalty can be eliminated by setting this to `false`.\r\n */\r\n preserveOrder?: boolean;\r\n\r\n /** Controls whether normals are generated for surfaces. Normals allow 3d geometry to receive lighting; without them the geometry will be unaffected by lighting.\r\n * By default, normals are generated only for graphics of type [[GraphicType.Scene]]; or for any type of graphic if [[GraphicBuilder.wantEdges]] is true, because\r\n * normals are required to prevent z-fighting between surfaces and their edges. This default can be overridden by explicitly specifying `true` or `false`.\r\n * @see [[GraphicType]] for a description of whether and how different types of graphics are affected by lighting.\r\n */\r\n wantNormals?: boolean;\r\n\r\n /** Controls whether edges are generated for surfaces.\r\n * Edges are only displayed if [ViewFlags.renderMode]($common) is not [RenderMode.SmoothShade]($common) or [ViewFlags.visibleEdges]($common) is `true`.\r\n * Since all decoration graphics except [[GraphicType.Scene]] are drawn in smooth shaded mode with no visible edges, by default edges are only produced for scene graphics, and\r\n * - if a [[Viewport]] is supplied with the options - only if [ViewFlags.edgesRequired]($common) is true for the viewport.\r\n * That default can be overridden by explicitly specifying `true` or `false`. This can be useful for non-scene decorations contained in a [[GraphicBranch]] that applies [ViewFlagOverrides]($common)\r\n * that change the edge display settings; or for scene decorations that might be cached for reuse after the viewport's edge settings are changed.\r\n * @note Edges will tend to z-fight with their surfaces unless the graphic is [[pickable]].\r\n */\r\n generateEdges?: boolean;\r\n\r\n /** If defined, specifies a point about which the graphic will rotate such that it always faces the viewer.\r\n * This can be particular useful for planar regions to create a billboarding effect - e.g., to implement [[Marker]]-like WebGL decorations.\r\n * The graphic's [[placement]] transform is not applied to the point.\r\n * @note This has no effect for graphics displayed in a 2d view.\r\n */\r\n viewIndependentOrigin?: Point3d;\r\n}\r\n\r\n/** Options for creating a [[GraphicBuilder]] to produce a [[RenderGraphic]] to be displayed in a specific [[Viewport]].\r\n * The level of detail of the graphic will be computed from the position of its geometry within the viewport's [Frustum]($common).\r\n * Default values for [[GraphicBuilderOptions.wantNormals]] and [[GraphicBuilderOptions.generateEdges]] will be determined by the viewport's [ViewFlags]($common).\r\n * The [[GraphicBuilder.iModel]] will be set to the viewport's [[IModelConnection]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewportGraphicBuilderOptions extends GraphicBuilderOptions {\r\n /** The viewport in which the resultant [[RenderGraphic]] is to be drawn. */\r\n viewport: Viewport;\r\n\r\n /** If true, [[ViewState.getAspectRatioSkew]] will be taken into account when computing the level of detail for the produced graphics. */\r\n applyAspectRatioSkew?: boolean;\r\n\r\n iModel?: never;\r\n computeChordTolerance?: never;\r\n}\r\n\r\n/** Arguments used to compute the chord tolerance (level of detail) of the [[RenderGraphic]]s produced by a [[GraphicBuilder]].\r\n * Generally, the chord tolerance should be roughly equivalent to the size in meters of one pixel on screen where the graphic is to be displayed.\r\n * For [[GraphicType.ViewOverlay]] and [[GraphicType.ViewBackground]], which already define their geometry in pixels, the chord tolerance should typically be 1.\r\n * @see [[CustomGraphicBuilderOptions.computeChordTolerance]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ComputeChordToleranceArgs {\r\n /** The graphic builder being used to produce the graphics. */\r\n readonly graphic: GraphicBuilder;\r\n /** A function that computes a range enclosing all of the geometry that was added to the builder. */\r\n readonly computeRange: () => Range3d;\r\n}\r\n\r\n/** Options for creating a [[GraphicBuilder]] to produce a [[RenderGraphic]] that is not associated with any particular [[Viewport]] and may not be associated with\r\n * any particular [[IModelConnection]].\r\n * This is primarily useful when the same graphic is to be saved and reused for display in multiple viewports and for which a chord tolerance can be computed\r\n * independently of each viewport's [Frustum]($common).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CustomGraphicBuilderOptions extends GraphicBuilderOptions {\r\n /** Optionally, the IModelConnection with which the graphic is associated. */\r\n iModel?: IModelConnection;\r\n /** A function that can compute the level of detail for the graphics produced by the builder. */\r\n computeChordTolerance: (args: ComputeChordToleranceArgs) => number;\r\n\r\n applyAspectRatioSkew?: never;\r\n viewport?: never;\r\n}\r\n\r\n/** Provides methods for constructing a [[RenderGraphic]] from geometric primitives and symbology.\r\n * GraphicBuilder is primarily used for creating [[Decorations]] to be displayed inside a [[Viewport]].\r\n *\r\n * The typical process for constructing a [[RenderGraphic]] proceeds as follows:\r\n * 1. Use [[DecorateContext.createGraphic]] or [[RenderSystem.createGraphic]] to obtain a builder.\r\n * 2. Set up the symbology using [[GraphicBuilder.activateGraphicParams]] or [[GraphicBuilder.setSymbology]].\r\n * 3. Add one or more geometric primitives using methods like [[GraphicBuilder.addShape]] and [[GraphicBuilder.addLineString]], possibly setting new symbology in between.\r\n * 4. Use [[GraphicBuilder.finish]] to produce the finished [[RenderGraphic]].\r\n *\r\n * @note Most of the methods which add geometry to the builder take ownership of their inputs rather than cloning them.\r\n * So, for example, if you pass an array of points to addLineString(), you should not subsequently modify that array.\r\n *\r\n * @public\r\n * @extensions\r\n */\r\nexport abstract class GraphicBuilder extends GraphicAssembler {\r\n /** The iModel associated with this builder, if any. */\r\n public readonly iModel?: IModelConnection;\r\n\r\n /** @internal */\r\n protected readonly _computeChordTolerance: (args: ComputeChordToleranceArgs) => number;\r\n\r\n /** @internal */\r\n protected constructor(options: ViewportGraphicBuilderOptions | CustomGraphicBuilderOptions) {\r\n const vp = options.viewport;\r\n const placement = options.placement ?? Transform.createIdentity();\r\n const wantEdges = options.generateEdges ?? (options.type === GraphicType.Scene && (!vp || vp.viewFlags.edgesRequired()));\r\n const wantNormals = options.wantNormals ?? (wantEdges || options.type === GraphicType.Scene);\r\n const preserveOrder = options.preserveOrder ?? (options.type === GraphicType.ViewOverlay || options.type === GraphicType.WorldOverlay || options.type === GraphicType.ViewBackground);\r\n\r\n super({\r\n ...options,\r\n [_implementationProhibited]: undefined,\r\n placement,\r\n wantEdges,\r\n wantNormals,\r\n preserveOrder,\r\n });\r\n\r\n this.iModel = vp?.iModel ?? options.iModel;\r\n if (!options.viewport) {\r\n this._computeChordTolerance = options.computeChordTolerance;\r\n return;\r\n }\r\n\r\n this._computeChordTolerance = (args: ComputeChordToleranceArgs) => {\r\n let pixelSize = 1;\r\n if (!this.isViewCoordinates) {\r\n // Compute the horizontal distance in meters between two adjacent pixels at the center of the geometry.\r\n pixelSize = options.viewport.getPixelSizeAtPoint(args.computeRange().center);\r\n pixelSize = options.viewport.target.adjustPixelSizeForLOD(pixelSize);\r\n\r\n // Aspect ratio skew > 1.0 stretches the view in Y. In that case use the smaller vertical pixel distance for our stroke tolerance.\r\n const skew = options.applyAspectRatioSkew ? options.viewport.view.getAspectRatioSkew() : 0;\r\n if (skew > 1)\r\n pixelSize /= skew;\r\n }\r\n\r\n return pixelSize * 0.25;\r\n };\r\n }\r\n\r\n /** The Id to be associated with the graphic for picking.\r\n * @see [[GraphicBuilderOptions.pickable]] for more options.\r\n * @deprecated in 3.x. This provides only the **first** pickable Id for this graphic - you should keep track of the **current** pickable Id yourself.\r\n */\r\n public get pickId(): Id64String | undefined {\r\n return this.pickable?.id;\r\n }\r\n\r\n /**\r\n * Processes the accumulated symbology and geometry to produce a renderable graphic.\r\n * This function can only be called once; after the [[RenderGraphic]] has been extracted the [[GraphicBuilder]] should no longer be used.\r\n */\r\n public abstract finish(): RenderGraphic;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"GraphicBuilder.js","sourceRoot":"","sources":["../../../src/render/GraphicBuilder.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,wDAAmE;AAInE,8DAA2D;AAE3D,wEAAqE;AACrE,wDAAuE;AAsGvE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAsB,cAAe,SAAQ,mCAAgB;IAO3D,gBAAgB;IAChB,YAAsB,OAAoE;QACxF,MAAM,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC;QAC5B,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,yBAAS,CAAC,cAAc,EAAE,CAAC;QAClE,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,yBAAW,CAAC,KAAK,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;QACzH,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,CAAC,SAAS,IAAI,OAAO,CAAC,IAAI,KAAK,yBAAW,CAAC,KAAK,CAAC,CAAC;QAC7F,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,yBAAW,CAAC,WAAW,IAAI,OAAO,CAAC,IAAI,KAAK,yBAAW,CAAC,YAAY,IAAI,OAAO,CAAC,IAAI,KAAK,yBAAW,CAAC,cAAc,CAAC,CAAC;QAEtL,KAAK,CAAC;YACJ,GAAG,OAAO;YACV,CAAC,mCAAyB,CAAC,EAAE,SAAS;YACtC,SAAS;YACT,SAAS;YACT,WAAW;YACX,aAAa;SACd,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,GAAG,EAAE,EAAE,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC;QAC3C,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;YACtB,IAAI,CAAC,sBAAsB,GAAG,OAAO,CAAC,qBAAqB,CAAC;YAC5D,OAAO;QACT,CAAC;QAED,IAAI,CAAC,sBAAsB,GAAG,CAAC,IAA+B,EAAE,EAAE;YAChE,IAAI,SAAS,GAAG,CAAC,CAAC;YAClB,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;gBAC5B,uGAAuG;gBACvG,SAAS,GAAG,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,MAAM,CAAC,CAAC;gBAC7E,SAAS,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC;gBAErE,kIAAkI;gBAClI,MAAM,IAAI,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC3F,IAAI,IAAI,GAAG,CAAC;oBACV,SAAS,IAAI,IAAI,CAAC;YACtB,CAAC;YAED,OAAO,SAAS,GAAG,IAAI,CAAC;QAC1B,CAAC,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC;IAC3B,CAAC;CAeF;AApED,wCAoEC","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 { Id64String } from \"@itwin/core-bentley\";\r\nimport { Point3d, Range3d, Transform } from \"@itwin/core-geometry\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport { Viewport } from \"../Viewport\";\r\nimport { RenderGraphic } from \"./RenderGraphic\";\r\nimport { GraphicType } from \"../common/render/GraphicType\";\r\nimport type { PickableGraphicOptions} from \"../common/render/BatchOptions\";\r\nimport { GraphicAssembler } from \"../common/render/GraphicAssembler\";\r\nimport { _implementationProhibited } from \"../common/internal/Symbols\";\r\nimport { GraphicTemplate } from \"./GraphicTemplate\";\r\n\r\n/** Options for creating a [[GraphicBuilder]] used by functions like [[DecorateContext.createGraphic]] and [[RenderSystem.createGraphic]].\r\n * @see [[ViewportGraphicBuilderOptions]] to create a graphic builder for a [[Viewport]].\r\n * @see [[CustomGraphicBuilderOptions]] to create a graphic builder unassociated with any [[Viewport]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicBuilderOptions {\r\n /** The type of graphic to produce. */\r\n type: GraphicType;\r\n\r\n /** The local-to-world transform in which the builder's geometry is to be defined - by default, an identity transform. */\r\n placement?: Transform;\r\n\r\n /** If the graphic is to be pickable, specifies the pickable Id and other options. */\r\n pickable?: PickableGraphicOptions;\r\n\r\n /** If true, the order in which geometry is added to the builder is preserved.\r\n * This is useful for overlay and background graphics because they draw without using the depth buffer. For example, to draw an overlay containing a red shape with a white outline,\r\n * you would add the shape to the GraphicBuilder first, followed by the outline, to ensure the outline draws \"in front of\" the shape.\r\n * It defaults to true for overlays and background graphics, and false for other graphic types.\r\n * It is not useful for other types of graphics and imposes a performance penalty due to increased number of draw calls.\r\n * For overlay and background graphics that do not need to draw in any particular order, the performance penalty can be eliminated by setting this to `false`.\r\n */\r\n preserveOrder?: boolean;\r\n\r\n /** Controls whether normals are generated for surfaces. Normals allow 3d geometry to receive lighting; without them the geometry will be unaffected by lighting.\r\n * By default, normals are generated only for graphics of type [[GraphicType.Scene]]; or for any type of graphic if [[GraphicBuilder.wantEdges]] is true, because\r\n * normals are required to prevent z-fighting between surfaces and their edges. This default can be overridden by explicitly specifying `true` or `false`.\r\n * @see [[GraphicType]] for a description of whether and how different types of graphics are affected by lighting.\r\n */\r\n wantNormals?: boolean;\r\n\r\n /** Controls whether edges are generated for surfaces.\r\n * Edges are only displayed if [ViewFlags.renderMode]($common) is not [RenderMode.SmoothShade]($common) or [ViewFlags.visibleEdges]($common) is `true`.\r\n * Since all decoration graphics except [[GraphicType.Scene]] are drawn in smooth shaded mode with no visible edges, by default edges are only produced for scene graphics, and\r\n * - if a [[Viewport]] is supplied with the options - only if [ViewFlags.edgesRequired]($common) is true for the viewport.\r\n * That default can be overridden by explicitly specifying `true` or `false`. This can be useful for non-scene decorations contained in a [[GraphicBranch]] that applies [ViewFlagOverrides]($common)\r\n * that change the edge display settings; or for scene decorations that might be cached for reuse after the viewport's edge settings are changed.\r\n * @note Edges will tend to z-fight with their surfaces unless the graphic is [[pickable]].\r\n */\r\n generateEdges?: boolean;\r\n\r\n /** If defined, specifies a point about which the graphic will rotate such that it always faces the viewer.\r\n * This can be particular useful for planar regions to create a billboarding effect - e.g., to implement [[Marker]]-like WebGL decorations.\r\n * The graphic's [[placement]] transform is not applied to the point.\r\n * @note This has no effect for graphics displayed in a 2d view.\r\n */\r\n viewIndependentOrigin?: Point3d;\r\n}\r\n\r\n/** Options for creating a [[GraphicBuilder]] to produce a [[RenderGraphic]] to be displayed in a specific [[Viewport]].\r\n * The level of detail of the graphic will be computed from the position of its geometry within the viewport's [Frustum]($common).\r\n * Default values for [[GraphicBuilderOptions.wantNormals]] and [[GraphicBuilderOptions.generateEdges]] will be determined by the viewport's [ViewFlags]($common).\r\n * The [[GraphicBuilder.iModel]] will be set to the viewport's [[IModelConnection]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewportGraphicBuilderOptions extends GraphicBuilderOptions {\r\n /** The viewport in which the resultant [[RenderGraphic]] is to be drawn. */\r\n viewport: Viewport;\r\n\r\n /** If true, [[ViewState.getAspectRatioSkew]] will be taken into account when computing the level of detail for the produced graphics. */\r\n applyAspectRatioSkew?: boolean;\r\n\r\n iModel?: never;\r\n computeChordTolerance?: never;\r\n}\r\n\r\n/** Arguments used to compute the chord tolerance (level of detail) of the [[RenderGraphic]] or [[GraphicTemplate]] produced by a [[GraphicBuilder]].\r\n * Generally, the chord tolerance should be roughly equivalent to the size in meters of one pixel on screen where the graphic is to be displayed.\r\n * For [[GraphicType.ViewOverlay]] and [[GraphicType.ViewBackground]], which already define their geometry in pixels, the chord tolerance should typically be 1.\r\n * @see [[CustomGraphicBuilderOptions.computeChordTolerance]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ComputeChordToleranceArgs {\r\n /** The graphic builder being used to produce the graphics. */\r\n readonly graphic: GraphicBuilder;\r\n /** A function that computes a range enclosing all of the geometry that was added to the builder. */\r\n readonly computeRange: () => Range3d;\r\n}\r\n\r\n/** Options for creating a [[GraphicBuilder]] to produce a [[RenderGraphic]] or [[GraphicTemplate]] that is not associated with any particular [[Viewport]] and may not be associated with\r\n * any particular [[IModelConnection]].\r\n * This is primarily useful when the same graphic is to be saved and reused for display in multiple viewports and for which a chord tolerance can be computed\r\n * independently of each viewport's [Frustum]($common).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CustomGraphicBuilderOptions extends GraphicBuilderOptions {\r\n /** Optionally, the IModelConnection with which the graphic is associated. */\r\n iModel?: IModelConnection;\r\n /** A function that can compute the level of detail for the graphics produced by the builder. */\r\n computeChordTolerance: (args: ComputeChordToleranceArgs) => number;\r\n\r\n applyAspectRatioSkew?: never;\r\n viewport?: never;\r\n}\r\n\r\n/** Provides methods for constructing a [[RenderGraphic]] or [[GraphicTemplate]] from geometric primitives and symbology.\r\n * GraphicBuilder is primarily used for creating [[Decorations]] to be displayed inside a [[Viewport]].\r\n *\r\n * The typical process for constructing a [[RenderGraphic]] proceeds as follows:\r\n * 1. Use [[DecorateContext.createGraphic]] or [[RenderSystem.createGraphic]] to obtain a builder.\r\n * 2. Set up the symbology using [[GraphicBuilder.activateGraphicParams]] or [[GraphicBuilder.setSymbology]].\r\n * 3. Add one or more geometric primitives using methods like [[GraphicBuilder.addShape]] and [[GraphicBuilder.addLineString]], possibly setting new symbology in between.\r\n * 4. Use [[GraphicBuilder.finish]] to produce the finished [[RenderGraphic]].\r\n *\r\n * The process for constructing a [[GraphicTemplate]] is similar:\r\n * 1. Use [[RenderSystem.createGraphic]] to obtain a builder.\r\n * 2. Set up the symbology using [[GraphicBuilder.activateGraphicParams]] or [[GraphicBuilder.setSymbology]].\r\n * 3. Add one or more geometric primitives using methods like [[GraphicBuilder.addShape]] and [[GraphicBuilder.addLineString]], possibly setting new symbology in between.\r\n * 4. Use [[GraphicBuilder.finishTemplate]] to produce the finished [[GraphicTemplate]].\r\n *\r\n * @note Most of the methods which add geometry to the builder take ownership of their inputs rather than cloning them.\r\n * So, for example, if you pass an array of points to addLineString(), you should not subsequently modify that array.\r\n *\r\n * @public\r\n * @extensions\r\n */\r\nexport abstract class GraphicBuilder extends GraphicAssembler {\r\n /** The iModel associated with this builder, if any. */\r\n public readonly iModel?: IModelConnection;\r\n\r\n /** @internal */\r\n protected readonly _computeChordTolerance: (args: ComputeChordToleranceArgs) => number;\r\n\r\n /** @internal */\r\n protected constructor(options: ViewportGraphicBuilderOptions | CustomGraphicBuilderOptions) {\r\n const vp = options.viewport;\r\n const placement = options.placement ?? Transform.createIdentity();\r\n const wantEdges = options.generateEdges ?? (options.type === GraphicType.Scene && (!vp || vp.viewFlags.edgesRequired()));\r\n const wantNormals = options.wantNormals ?? (wantEdges || options.type === GraphicType.Scene);\r\n const preserveOrder = options.preserveOrder ?? (options.type === GraphicType.ViewOverlay || options.type === GraphicType.WorldOverlay || options.type === GraphicType.ViewBackground);\r\n\r\n super({\r\n ...options,\r\n [_implementationProhibited]: undefined,\r\n placement,\r\n wantEdges,\r\n wantNormals,\r\n preserveOrder,\r\n });\r\n\r\n this.iModel = vp?.iModel ?? options.iModel;\r\n if (!options.viewport) {\r\n this._computeChordTolerance = options.computeChordTolerance;\r\n return;\r\n }\r\n\r\n this._computeChordTolerance = (args: ComputeChordToleranceArgs) => {\r\n let pixelSize = 1;\r\n if (!this.isViewCoordinates) {\r\n // Compute the horizontal distance in meters between two adjacent pixels at the center of the geometry.\r\n pixelSize = options.viewport.getPixelSizeAtPoint(args.computeRange().center);\r\n pixelSize = options.viewport.target.adjustPixelSizeForLOD(pixelSize);\r\n\r\n // Aspect ratio skew > 1.0 stretches the view in Y. In that case use the smaller vertical pixel distance for our stroke tolerance.\r\n const skew = options.applyAspectRatioSkew ? options.viewport.view.getAspectRatioSkew() : 0;\r\n if (skew > 1)\r\n pixelSize /= skew;\r\n }\r\n\r\n return pixelSize * 0.25;\r\n };\r\n }\r\n\r\n /** The Id to be associated with the graphic for picking.\r\n * @see [[GraphicBuilderOptions.pickable]] for more options.\r\n * @deprecated in 3.x. This provides only the **first** pickable Id for this graphic - you should keep track of the **current** pickable Id yourself.\r\n */\r\n public get pickId(): Id64String | undefined {\r\n return this.pickable?.id;\r\n }\r\n\r\n /**\r\n * Processes the accumulated symbology and geometry to produce a renderable graphic.\r\n * This function can only be called once; after the [[RenderGraphic]] has been extracted the [[GraphicBuilder]] should no longer be used.\r\n * @see [[finishTemplate]] to obtain a [[GraphicTemplate]] instead.\r\n */\r\n public abstract finish(): RenderGraphic;\r\n\r\n /** Processes the accumulated symbology and geometry to produce a reusable template for a [[RenderGraphic]].\r\n * This function can only be called once; after the [[GraphicTemplate]] has been extracted the [[GraphicBuilder]] should no longer be used.\r\n * @see [[finish]] to obtain a [[RenderGraphic]] instead.\r\n * @beta\r\n */\r\n public abstract finishTemplate(): GraphicTemplate;\r\n}\r\n"]}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Rendering
|
|
3
|
+
*/
|
|
4
|
+
import { Range3d, Transform } from "@itwin/core-geometry";
|
|
5
|
+
import { _batch, _branch, _implementationProhibited, _nodes } from "../common/internal/Symbols";
|
|
6
|
+
import { RenderGeometry } from "../internal/render/RenderGeometry";
|
|
7
|
+
import { RenderFeatureTable, ViewFlagOverrides } from "@itwin/core-common";
|
|
8
|
+
import { InstancedGraphicParams } from "../common/render/InstancedGraphicParams";
|
|
9
|
+
import { BatchOptions } from "../common/render/BatchOptions";
|
|
10
|
+
/** @internal */
|
|
11
|
+
export interface GraphicTemplateNode {
|
|
12
|
+
geometry: RenderGeometry[];
|
|
13
|
+
/** For glTF models, the flattened transform of the scene graph node. */
|
|
14
|
+
transform?: Transform;
|
|
15
|
+
/** For glTF models, the instances associated with the scene graph node, or with the model as a whole. */
|
|
16
|
+
instances?: InstancedGraphicParams;
|
|
17
|
+
}
|
|
18
|
+
/** Describes the collection of $[Feature]($common)s in a [[GraphicTemplate]].
|
|
19
|
+
* If the template is used for instancing, the batch information in the [[RenderInstances]] overrides this.
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export interface GraphicTemplateBatch {
|
|
23
|
+
readonly featureTable: RenderFeatureTable;
|
|
24
|
+
readonly options?: BatchOptions;
|
|
25
|
+
readonly range: Range3d;
|
|
26
|
+
}
|
|
27
|
+
/** Applies a transform and/or view flag overrides to all of the nodes in a [[GraphicTemplate]].
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
export interface GraphicTemplateBranch {
|
|
31
|
+
readonly transform?: Transform;
|
|
32
|
+
readonly viewFlagOverrides?: ViewFlagOverrides;
|
|
33
|
+
}
|
|
34
|
+
/** A reusable representation of a [[RenderGraphic]].
|
|
35
|
+
* You can use [[RenderSystem.createGraphicFromTemplate]] to produce a [[RenderGraphic]] from a template.
|
|
36
|
+
* The template contains all of the WebGL resources required to render the graphics, so no matter how many times you use the template,
|
|
37
|
+
* no additional GPU resources will be allocated.
|
|
38
|
+
* The primary use for a template is [instanced rendering](https://webglfundamentals.org/webgl/lessons/webgl-instanced-drawing.html) - efficiently
|
|
39
|
+
* drawing many repetitions of the same graphic with different positions, scales, rotations, and symbology.
|
|
40
|
+
* Using instancing to draw 1 template N times is far more efficient than drawing N [[RenderGraphic]]s created from the same template.
|
|
41
|
+
* You can instance a template by supplying a [[RenderInstances]] to [[RenderSystem.createGraphicFromTemplate]], unless [[isInstanceable]] is `false`.
|
|
42
|
+
* @see [[GraphicBuilder.finishTemplate]] to create a template from a [[GraphicBuilder]].
|
|
43
|
+
* @see [[RenderSystem.createTemplateFromDescription]] to create a template from a [[GraphicDescription]].
|
|
44
|
+
* @see [[readGltfTemplate]] to create a template from a glTF model.
|
|
45
|
+
* @beta
|
|
46
|
+
*/
|
|
47
|
+
export interface GraphicTemplate {
|
|
48
|
+
/** @internal */
|
|
49
|
+
readonly [_implementationProhibited]: unknown;
|
|
50
|
+
/** Whether the graphics in this template can be instanced. Non-instanceable graphics include those produced from glTF models that already
|
|
51
|
+
* contain instanced geometry and view-independent geometry created from a [[GraphicBuilder]].
|
|
52
|
+
* [[RenderSystem.createGraphicFromTemplate]] will throw an error if you attempt to instance a non-instanceable template by supplying
|
|
53
|
+
* [[CreateGraphicFromTemplateArgs.instances]].
|
|
54
|
+
*/
|
|
55
|
+
readonly isInstanceable: boolean;
|
|
56
|
+
/** @internal */
|
|
57
|
+
readonly [_nodes]: GraphicTemplateNode[];
|
|
58
|
+
/** @internal */
|
|
59
|
+
readonly [_batch]?: GraphicTemplateBatch;
|
|
60
|
+
/** @internal */
|
|
61
|
+
readonly [_branch]?: GraphicTemplateBranch;
|
|
62
|
+
}
|
|
63
|
+
/** Create a GraphicTemplate.
|
|
64
|
+
* If the caller specifies `noDispose` as `true`, every RenderGeometry in every node will be marked `noDispose`;
|
|
65
|
+
* this permits the same template to be reused by multiple graphics. The garbage collector will reclaim its
|
|
66
|
+
* WebGL resources and its `dispose` method will do nothing.
|
|
67
|
+
* The `isInstancable` flag will be calculated from the nodes and their geometry.
|
|
68
|
+
* @internal
|
|
69
|
+
*/
|
|
70
|
+
export declare function createGraphicTemplate(args: {
|
|
71
|
+
nodes: GraphicTemplateNode[];
|
|
72
|
+
batch?: GraphicTemplateBatch;
|
|
73
|
+
noDispose: boolean;
|
|
74
|
+
branch?: GraphicTemplateBranch;
|
|
75
|
+
}): GraphicTemplate;
|
|
76
|
+
//# sour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