UNPKG

@itwin/core-frontend

Version:
40 lines 1.63 kB
/*--------------------------------------------------------------------------------------------- * Copyright (c) Bentley Systems, Incorporated. All rights reserved. * See LICENSE.md in the project root for license terms and full copyright notice. *--------------------------------------------------------------------------------------------*/ /** @packageDocumentation * @module Tiles */ import { TileDrawArgs } from "../../tile/internal"; /** @internal*/ export class GraphicsCollectorDrawArgs extends TileDrawArgs { _planes; _worldToViewMap; _collector; constructor(planes, worldToViewMap, collector, args) { super(args); this._planes = planes; this._worldToViewMap = worldToViewMap; this._collector = collector; } get frustumPlanes() { return this._planes; } get worldToViewMap() { return this._worldToViewMap; } drawGraphicsWithType(_graphicType, graphics) { this._collector.addGraphic(this.context.createBranch(graphics, this.location)); } drawGraphics() { if (!this.graphics.isEmpty) { const graphics = this.produceGraphics(); if (undefined !== graphics) this._collector.addGraphic(graphics); } } static create(context, collector, ref, planes, worldToViewMap) { const args = ref.createDrawArgs(context); if (undefined === args) return undefined; return new GraphicsCollectorDrawArgs(planes, worldToViewMap, collector, args); } get shouldCollectClassifierGraphics() { return false; } } //# sourceMappingURL=GraphicsCollector.js.map