@equinor/videx-map
Version:
Component for Pixi-overlay in Leaflet.
52 lines (51 loc) • 2.04 kB
TypeScript
import { SegmentPoint, LineInterpolator } from './LineInterpolator';
import { TickConfig } from './wellbores/Config';
interface meshData {
vertices: number[];
triangles: number[];
vertexData: number[];
extraData: number[];
}
export declare class WellboreMesh {
/** Line interpolator used to construct mesh. */
interp: LineInterpolator;
/** Thickness of line. */
thickness: number;
/** Index of latest vertex, i.e. base for triangulation of new geometry. */
baseTris: number;
/** Width and height of tick. */
tick: TickConfig;
/**
* Constructor for creating a new line interpolator.
* @param interp Interpolator used to generate line
*/
constructor(interp: LineInterpolator, thickness: number, tick: TickConfig);
/**
* Generate mesh. Interval positioning should be relative.
* @param intervals Collection of intervals on the format: [ [Start0, End0], ..., [StartN, EndN] ]
*/
generate(intervals?: [number, number][]): meshData;
/**
* Append line segment from a section of points.
* @param section Collection of segment points
* @param type Type of segment, applied as vertex color
* @param vertices 1-dimensional array with vertices
* @param triangles 1-dimensional array with triangulation
* @param vertexData 1-dimensional array with vertex data
* @param extraData 1-dimensional array with type-data
* @private
*/
appendSegment(section: SegmentPoint[], type: number, vertices: number[], triangles: number[], vertexData: number[], extraData: number[]): void;
/**
* Creates a tick at the given position.
* @param p Position of tick
* @param baseTris Base triangle index
* @param vertices 1-dimensional array with vertices
* @param triangles 1-dimensional array with triangulation
* @param vertexData 1-dimensional array with vertex data
* @param extraData 1-dimensional array with type-data
* @private
*/
private generateCrossline;
}
export {};