@itwin/core-frontend
Version:
iTwin.js frontend components
44 lines • 1.95 kB
TypeScript
/** @packageDocumentation
* @module Rendering
*/
import { LinePixels, PolylineIndices, PolylineTypeFlags, QPoint3dList } from "@itwin/core-common";
import { VertexIndices } from "./VertexIndices";
import { VertexTable } from "./VertexTable";
import { MeshArgsPositions } from "../../../render/MeshArgs";
import { PolylineArgs } from "../../../render/PolylineArgs";
import { MeshPolylineList } from "@itwin/core-common/lib/cjs/internal/RenderMesh";
/** Represents a tesselated polyline.
* Given a polyline as a line string, each segment of the line string is triangulated into a quad.
* Based on the angle between two segments, additional joint triangles may be inserted in between to enable smoothly-rounded corners.
* @internal
*/
export interface TesselatedPolyline {
/** 24-bit index of each vertex. */
indices: VertexIndices;
/** 24-bit index of the previous vertex in the polyline. */
prevIndices: VertexIndices;
/** 24-bit index of the next vertex in the polyline, plus 8-bit parameter describing the semantics of this vertex. */
nextIndicesAndParams: Uint8Array;
}
/** @internal */
export interface PolylineParams {
vertices: VertexTable;
polyline: TesselatedPolyline;
isPlanar: boolean;
type: PolylineTypeFlags;
weight: number;
linePixels: LinePixels;
}
export declare function tesselatePolylineList(args: {
points: MeshArgsPositions;
polylines: MeshPolylineList;
width: number;
is2d: boolean;
}): TesselatedPolyline;
/** Strictly for tests. @internal */
export declare function tesselatePolyline(polylines: PolylineIndices[], points: QPoint3dList, doJointTriangles: boolean): TesselatedPolyline;
/** @internal */
export declare function createPolylineParams(args: PolylineArgs, maxDimension: number): PolylineParams | undefined;
/** @internal */
export declare function wantJointTriangles(weight: number, is2d: boolean): boolean;
//# sourceMappingURL=PolylineParams.d.ts.map