import { Vector3, Plane, Matrix, Ray } from '../loader/babylonjs-import';
import { BimCoreApi } from '../BimCoreApi';
import { Vertex2, Vertex3 } from '../math';
import { DynamicPolygonPointParent } from './DynamicPolygonPointParent';
import { BimPointBase } from './BimPointBase';
/**
 * Represents result of a {@link DynamicPolygonPoint} move operation.
 */
export declare enum DynamicPolygonPointMoveResult {
    /** Result is unknown */
    Unknown = 0,
    /** Points were moved successfully */
    Success = 1,
    /** Points were not moved because the polygon would have become complex */
    ComplexPolygon = 2,
    /** Could not move point because the ray (from mouse coordinate) did not intersect the polygon plane. */
    RayIntersectionFailed = 3
}
/**
 * Represents result of a {@link DynamicPolygonPoint} delete operation.
 */
export declare enum DynamicPolygonPointDeleteResult {
    /** Result is unknown */
    Unknown = 0,
    /** Points were moved successfully */
    Success = 1,
    /** Points were not moved because the polygon would have become complex */
    ComplexPolygon = 2,
    /** Result if the set of points is insufficient */
    NotEnoughPoints = 3,
    /** Result The point is virtual */
    Virtual = 4,
    /** Result if the point is protected from getting deleted. */
    Protected = 5
}
/**
 * Represents a point in a {@link DynamicPolygon}. Inherit from this class if additional functionality
 * is required.
 */
export declare abstract class DynamicPolygonPoint extends BimPointBase {
    protected readonly _api: BimCoreApi;
    readonly plane: Plane;
    protected static readonly _tmp: {
        identityMatrix: Matrix;
        rayA: Ray;
        vector3A: Vector3;
        vector3B: Vector3;
        counter: number;
    };
    protected _id: number;
    protected _isVirtual: boolean;
    /** @hidden */
    _previous: DynamicPolygonPoint;
    /** @hidden */
    _next: DynamicPolygonPoint;
    /** @hidden */
    _parent: DynamicPolygonPointParent<DynamicPolygonPoint>;
    protected recalculateOrGetWorldCoords(force?: boolean): Vertex3;
    protected recalculateOrGetLocalCoords(force?: boolean): Vertex3;
    /** When `true` then {@link DynamicPolygon.onPointTrackableScreen} will trigger for this instance. Otherwise it will not */
    isEnabled: boolean;
    /**
     *
     * @param _api {@link BimCoreApi} API.
     * @param plane [Plane](https://doc.babylonjs.com/typedoc/classes/babylon.plane) that this point lies on.
     * @param isVirtual whether point is virtual or not.
     */
    constructor(_api: BimCoreApi, plane: Plane, isVirtual: boolean);
    /**
     * Predicate to check if a point is virtual or not.
     * @param p Point to check
     * @returns `true` if point is not virtual, otherwise `false`.
     */
    static IsNotVirtual(p: DynamicPolygonPoint): boolean;
    /**
     * Same as calling {@link DynamicPolygon.apply}.
     */
    apply(): void;
    /**
     * Check if `this` point can be deleted or not.
     * @returns a {@link DynamicPolygonPointDeleteResult}.
     */
    get isDeletable(): DynamicPolygonPointDeleteResult;
    /**
     * This method has two purposes.
     *
     * 1. Check if `this` point is virtual or not (if `v` is undefined). This is very useful in a UI
     * where a different visualization for a 'virtual drag point' and a 'real drag point' may be required..
     *
     * 2. Convert `this` point to/from virtual by specifying `v`.
     * @param v Optional. If not specified function only returns current state. If specified then point is converted to either a virtual point (v = `true`) or
     * a non virtual point (`v = false`).
     * @returns If `v` was not specified then `true` if point is virtual, otherwise `false`. If `v` was specified
     * it returns `true` if point was successfully converted. Otherwise `false`. A point cannot be converted from
     * non virtual to virtual if there are 3 or less non virtual points in the polygon.
     */
    virtual(v?: boolean): boolean;
    /**
     * Attempt to move a point to a new location on [Plane](https://doc.babylonjs.com/typedoc/classes/babylon.plane).
     * To find the location, a ray is shot from camera through `canvasCoordinate`
     * and then an intersection test is performed. If the ray intersects Plane, the point is moved to the coordinates
     * of the intersection. Otherwise nothing happens.
     * It is also not possible to move a point if it results in a complex polygon.
     * The point is assigned the same x,y,z values
     * as the coordinate where the ray intersects the plane.
     * @returns a {@link DynamicPolygonPointMoveResult}.
     */
    move(canvasCoordinate: Vertex2): DynamicPolygonPointMoveResult;
    /**
     * Deletes `this` point from the parent {@link DynamicPolygon}.
     * It is possible to use {@link isDeletable} to check if point can be deleted beforehand.
     * @returns a {@link DynamicPolygonPointMoveResult}.
     */
    delete(): DynamicPolygonPointDeleteResult;
    /**
     * Enables iteration of all points in  the polygon.
     * @param predicate Optional predicate. If specified only points where the predicate returns `true` will be returned.
     * @param backwards If `true` then polygon point are visited in backwards direction. Default is `false`.
     * @returns generator.
     */
    points(predicate?: (p: DynamicPolygonPoint) => boolean, backwards?: boolean): Generator<DynamicPolygonPoint, void, unknown>;
    protected remove(p: DynamicPolygonPoint): void;
    protected insertVirtualPointAfter(p: DynamicPolygonPoint): DynamicPolygonPoint;
    protected moveToMiddleBetweenPointsToRef(start: DynamicPolygonPoint, end: DynamicPolygonPoint, dst: DynamicPolygonPoint): DynamicPolygonPoint;
}
//# sourceMappingURL=DynamicPolygonPoint.d.ts.map