@itwin/core-frontend
Version:
iTwin.js frontend components
44 lines • 1.81 kB
JavaScript
/*---------------------------------------------------------------------------------------------
* 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
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.GraphicsCollectorDrawArgs = void 0;
const internal_1 = require("../../tile/internal");
/** @internal*/
class GraphicsCollectorDrawArgs extends internal_1.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; }
}
exports.GraphicsCollectorDrawArgs = GraphicsCollectorDrawArgs;
//# sourceMappingURL=GraphicsCollector.js.map
;