import { Observable, TransformNode, Matrix, Material, Plane, Mesh } from '../loader/babylonjs-import';
import { BimCoreApi } from '../BimCoreApi';
import { Vertex3 } from '../math';
import { ArbitraryShapePoint } from './ArbitraryShapePoint';
import { CoordinateTracker, TrackCoordinate2D } from './CoordinateTracker';
import { DragPointPositioningFunction, DynamicPolygonPointFactoryHandler } from './DynamicPolygon';
import { DynamicPolygonPoint } from './DynamicPolygonPoint';
import { DynamicPolygonPointParent, DynamicPolygonPointValidationResult } from './DynamicPolygonPointParent';
export type DragPointPositioningFunctionOrIndex = DragPointPositioningFunction | number;
export interface ArbitraryShapePointFactoryHandler<Point extends ArbitraryShapePoint> {
    (api: BimCoreApi, plane: Plane, isVirtual: boolean): Point;
}
/** Wrapper of {@link DynamicPolygon} to be able to create polygons that are any arbitrary shape such as circles, arrows etc. */
export declare class DynamicPolygonWithArbitraryPoints<Point extends ArbitraryShapePoint = ArbitraryShapePoint> implements DynamicPolygonPointParent<ArbitraryShapePoint> {
    private readonly _polygonPointsFactory;
    private readonly _polygonPointsValidator;
    readonly name: string;
    protected readonly _api: BimCoreApi;
    private _controlPointFactory;
    private _dragPointPositioningFunctionOrIndex?;
    private _controlPointsHead?;
    private _previousPositions;
    private _dynamicPolygon;
    readonly onPointTrackableScreen: Observable<TrackCoordinate2D<Point>>;
    dragPoint?: Point;
    controlPoints(predicate?: (p: DynamicPolygonPoint) => boolean): Generator<DynamicPolygonPoint, void, unknown>;
    /**
     * Applies changes which may have occured since the last time apply or build was called. When a control point is moved and then called, the shape
     * of the polygon will be recalculated using the factory method provided in the constructor.
     */
    apply(): void;
    private assignPointProperties;
    private createArbitraryShapePoint;
    private createDynamicPolygonPoint;
    constructor(_polygonPointsFactory: (controlPoints: Vertex3[]) => Vertex3[], _polygonPointsValidator: ((linePoints: Vertex3[]) => DynamicPolygonPointValidationResult) | undefined, name: string, _api: BimCoreApi, pointFactory: DynamicPolygonPointFactoryHandler<DynamicPolygonPoint>, _controlPointFactory: ArbitraryShapePointFactoryHandler<Point>, recalculate2DEachFrame?: boolean, parent?: TransformNode, _dragPointPositioningFunctionOrIndex?: DragPointPositioningFunctionOrIndex | undefined);
    _head?: ArbitraryShapePoint | undefined;
    /**
     * @hidden
     * @internal
     */
    _minPoints: number;
    /**
     * @hidden
     * @internal
     */
    _dynamicPolygonPointTracker: CoordinateTracker<ArbitraryShapePoint>;
    /**
     * @hidden
     * @internal
     */
    _virtualPointFactory(): ArbitraryShapePoint;
    isEnabled: boolean;
    /**
     * @hidden
     * @internal
     */
    _validatePoints(points: Vertex3[]): DynamicPolygonPointValidationResult;
    worldMatrix(): Matrix;
    /**
     * Sets the material of the underlying DynamicPolygon
     * @param material
     */
    setMaterial(material: Material): void;
    /**
     * @hidden
     * @internal
     */
    validateControlPoints(controlPoints: Vertex3[], transformPointsToLocal: boolean): DynamicPolygonPointValidationResult;
    private createPointsForPolygonFromControlPoints;
    /**
     * @returns the babylonjs mesh
     */
    get mesh(): Mesh;
    /**
     * Similar to build in {@link DynamicPolygon}, but instead of providing the points that define every edge of the polygon, this method takes in control points
     * which when used in together with the factory method can create arbitrary sets of points to define polygons
     * @param initialControlPoints The control points used by the factory method provided in the constructor, for example the centre and radius point of a circle
     * @param transformPointsToLocal Wheter to transform the points to the DynamicPolygon's parent local space before using them to build
     * @param includeVirtualPoints Wheter to create virtual points or not
     * @returns The DynamicPolygonPointValidationResult,
     */
    build(initialControlPoints: Vertex3[], transformPointsToLocal?: boolean, includeVirtualPoints?: boolean): DynamicPolygonPointValidationResult;
    /**
     * Disposes the {@link DynamicPolygonWithArbitraryPoints}. It is no longer useable after this call.
     */
    dispose(): void;
    /**
     * Clears the polygon of all current polygon points and control points.
     */
    clear(): void;
}
//# sourceMappingURL=DynamicPolygonWithArbitraryPoints.d.ts.map