import { Observable, Color3 } from '../loader/babylonjs-import';
import { TrackCoordinate3D, TrackCoordinate2D } from './CoordinateTracker';
import { BimCoreApi } from '../BimCoreApi';
/** A polyline point type*/
export type PolyLinePoint = TrackCoordinate3D;
/**
 * Represents a dynamic polyline. It is possible to add, insert and remove points to it and
 * have those changes reflect its 3D visualization. Useful for tools that need to
 * calculate distances between start and end points etc.
 */
export declare class PolyLine<Point extends PolyLinePoint> {
    name: string;
    private readonly _api;
    private static readonly _tmp;
    private _coordinateTracker;
    private _linesMesh;
    private static readonly _renderingGroupId;
    /**
     * Triggered when {@link apply} is called or when camera moves around. By listening to this
     * event it is possible to know when new points are added, updated and removed. It is also possible
     * to see how far away the points are from the camera. What position they have in 2D space (perhaps one wants
     * to add a HTML element to the DOM there.).
     */
    readonly onPointTrackableScreen: Observable<TrackCoordinate2D<Point>>;
    /**
     * Points that make up the polyline. Use usual array operations to add, remove
     * insert points etc. When changes have been made call {@link apply} in
     * order to visualize the changes as a {@link LinesMesh}.
     */
    points: Point[];
    /**
     * Polyline constructor.
     * @param name Name of polyline
     * @param _api {@link BimCoreApi} instance
     * @param options - Options for line creation
     */
    constructor(name: string, _api: BimCoreApi, options?: {
        maxPointCount?: number;
    });
    /**
     * Color of the line.
     * @return The color
     */
    get color(): Color3;
    /**
     * Color of the line
     * @param c The color the line shall have.
     */
    set color(c: Color3);
    /**
     * Makes it possible to iterate each line that {@link points} represents
     * @param predicate Called for each line with start and end vector. If predicate returns `false` then iteration is stopped.
     */
    forEachLine(predicate: (start: Point, end: Point) => boolean): void;
    /**
     * Gets the distance of the polyline.
     * @param o Optional. Specifies point where distance calculation should end. That is distance from first point up to this point.
     * @returns distance.
     */
    distance(o?: {
        end: Point;
    }): number;
    /**
     * Apply changes made to the {@link points} array. This will
     * mirror the changes in the visual representation of the polygon line.
     * It will also trigger {@link onPointTrackableScreen} events.
     */
    apply(): void;
    /**
     * Sets point array to zero and disables visibility for the lines mesh.
     * Also removes coordinate trackers for labels if present.
     */
    clear(): void;
    /**
     * Sets point array to zero and disables visibility for the lines mesh.
     * Also removes coordinate trackers for labels if present.
     * And disposes the linemesh.
     */
    dispose(): void;
}
//# sourceMappingURL=PolyLine.d.ts.map