UNPKG

@itwin/core-frontend

Version:
83 lines 3.2 kB
/** @packageDocumentation * @module Rendering */ import { AuxChannel, Point2d, Range3d } from "@itwin/core-geometry"; import { ColorDef, EdgeArgs, Feature, FeatureIndex, FeatureTable, LinePixels, MeshEdges, MeshPolyline, MeshPolylineList, OctEncodedNormal, PolylineEdgeArgs, SilhouetteEdgeArgs } from "@itwin/core-common"; import { ColorMap } from "./ColorMap"; import { DisplayParams } from "./DisplayParams"; import { MeshPointList, MeshPrimitiveType } from "./MeshPrimitive"; import { Triangle, TriangleList } from "./Primitives"; import { VertexKeyProps } from "./VertexKey"; import { MeshArgs } from "../../../render/MeshArgs"; import { PolylineArgs } from "../../../render/PolylineArgs"; export declare function createPolylineArgs(mesh: Mesh): PolylineArgs | undefined; /** The vertices of the edges are shared with those of the surface. */ export declare class MeshArgsEdges { edges: EdgeArgs; silhouettes: SilhouetteEdgeArgs; polylines: PolylineEdgeArgs; width: number; linePixels: LinePixels; color?: ColorDef; clear(): void; get isValid(): boolean; } export declare function createMeshArgs(mesh: Mesh): MeshArgs | undefined; export declare class Mesh { private readonly _data; readonly points: MeshPointList; readonly normals: OctEncodedNormal[]; readonly uvParams: Point2d[]; readonly colorMap: ColorMap; colors: number[]; edges?: MeshEdges; readonly features?: Mesh.Features; readonly type: MeshPrimitiveType; readonly is2d: boolean; readonly isPlanar: boolean; readonly hasBakedLighting: boolean; readonly isVolumeClassifier: boolean; displayParams: DisplayParams; private _auxChannels?; private constructor(); static create(props: Mesh.Props): Mesh; get triangles(): TriangleList | undefined; get polylines(): MeshPolylineList | undefined; get auxChannels(): ReadonlyArray<AuxChannel> | undefined; addAuxChannels(channels: ReadonlyArray<AuxChannel>, srcIndex: number): void; toFeatureIndex(index: FeatureIndex): void; toMeshArgs(): MeshArgs | undefined; toPolylineArgs(): PolylineArgs | undefined; addPolyline(poly: MeshPolyline): void; addTriangle(triangle: Triangle): void; addVertex(props: VertexKeyProps): number; } export declare namespace Mesh { class Features { readonly table: FeatureTable; indices: number[]; uniform: number; initialized: boolean; constructor(table: FeatureTable); add(feat: Feature, numVerts: number): void; setIndices(indices: number[]): void; toFeatureIndex(output?: FeatureIndex): FeatureIndex; } interface Props { displayParams: DisplayParams; features?: FeatureTable; type: MeshPrimitiveType; range: Range3d; quantizePositions: boolean; is2d: boolean; isPlanar: boolean; hasBakedLighting?: boolean; isVolumeClassifier?: boolean; } } export declare class MeshList extends Array<Mesh> { readonly features?: FeatureTable; readonly range?: Range3d; constructor(features?: FeatureTable, range?: Range3d); } //# sourceMappingURL=MeshPrimitives.d.ts.map