/** @internal NOTE: Internal APIs. Subject to change. Use of these APIs in production applications is not supported. */
import { Vector3, Ray, Plane, DeepImmutable } from '../loader/babylonjs-import';
/**
 * Represents a 3D point/vector in space.
 */
export interface Vertex3 {
    x: number;
    y: number;
    z: number;
}
/**
 * Represents a 2D point/vector in space.
 */
export interface Vertex2 {
    x: number;
    y: number;
}
/**
 * Represents either a 2D or 3D point/vector in space.
 */
export type Vertex = Vertex2 | Vertex3;
/**
 * Represents a object that looks like an array and where it is possible
 * to change the individual elements.
 */
export type MutableArrayLike<T> = ArrayLike<number> & {
    [index: number]: T;
};
/**
 * Perform `ceil(base^v)` calcuation.
 * @param v Number to perform `base^v` on
 * @param base Power of base. Ie `base^v`. Defaults to `2`
 * @returns `ceil(base^v)`
 */
export declare function pow2ceil(v: number, base?: number): number;
/**
 * Calculate next power of two greater than or equal to `n`.
 * @param n number to calculate next power of two for.
 * @returns next power of two greater than or equal to `n`
 */
export declare function nextPow2(n: number): number;
/**
 * Assign `Number.MAX_VALUE` to `x, y ,z` properties of `dst`.
 * @param dst {@link Vertex3}.
 * @returns Referece to `m`.
 */
export declare function setMax<T extends Vertex3>(dst: T): T;
/**
 * Assign `-Number.MAX_VALUE` to `x, y ,z` properties of `dst`.
 * @param dst {@link Vertex3}.
 * @returns Referece to `m`.
 */
export declare function setMin<T extends Vertex3>(dst: T): T;
/**
 * Assign `n` to `dst.x, y, z`.
 * @param dst Instance to assign `n` to.
 * @param n Value to assign to `dst.x, y, z`.
 * @returns Reference to `dst`-
 */
export declare function setValue<T extends Vertex3>(dst: T, n: number): T;
/**
 * Copy x, y, z properties from one instance to another
 * @param src Object to copy from-
 * @param dst Object to copy to.
 * @returns Reference to `dst`
 */
export declare function copyVertex3ToRef<T extends Vertex3>(src: Vertex3, dst: T): T;
/**
 * Get sum of all numbers in `arr`.
 * @param arr Array of numbers.
 * @returns sum.
 */
export declare function sum(arr: number[]): number;
/**
 * Get man value of all numbers in `arr`.
 * @param arr Array of numbers.
 * @returns Mean value.
 */
export declare function mean(arr: number[]): number;
/**
 * Get standard deviation of numbers in `data`
 * @param data Array of numbers.
 * @returns Standard deviation.
 */
export declare function standardDeviation(data: number[]): number;
export declare function equalsWithEpsilonVertex3(vertex1: DeepImmutable<Vertex3>, vertex2: DeepImmutable<Vertex3>, epsilon?: number): boolean;
/**
 * @internal
 * @hidden
 */
export declare function findAnomalyIndices(data: number[]): number[];
/**
 * Get point of intersection (if any) between a ray and a plane.
 * @param ray Ray to use for intersection calculation.
 * @param plane Plane to performn intersection calculation against
 * @param dst Point of intersection is written to this object (if a intersection could be found)
 * @returns Distance to point of intersection on plane, < 0 if no interrsection.
 */
export declare function intersectsPlaneAtToRef(ray: Ray, plane: Plane, dst: Vector3): number;
/**
 * Checks if a ray intersets a specified axis aligned bounding box.
 * @param ray Ray to use for intersection calculation.
 * @param aabbMin Min value of axis aligned bounding box
 * @param aabbMax Max value of axis aligned bounding box
 * @returns Undefined of no intersection was found. Otherwise intersection distance
 */
export declare function rayDistanceToBoundingBox(ray: Ray, aabbMin: Vertex3, aabbMax: Vertex3): number | undefined;
/**
 * Checks if a ray intersets a specified axis aligned bounding box. If it intersects we get
 * the point of intersection.
 * @param ray Ray to use for intersection calculation.
 * @param aabbMin Min value of axis aligned bounding box
 * @param aabbMax Max value of axis aligned bounding box
 * @param dst Intersection point is written to this object if intersection exists.
 * @returns Undefined of no intersection was found. Otherwise intersection distance
 */
export declare function intersectRayWithAAABBToRef<T extends Vertex3>(ray: Ray, aabbMin: T, aabbMax: T, dst: T): number | undefined;
/**
 * Given two points/vectors, calculate a point/vector which lies on the middle of the line that spans
 * the points.
 * @param start Start of line
 * @param end End of line
 * @param dst Results is written to this object.
 * @returns Reference to `dst`.
 */
export declare function vertexBetweenToRef<T extends Vertex, K extends Vertex>(start: T, end: T, dst: K): K;
/**
 * Add a {@link Vertex} to another {@link Vertex}.
 * @param src {@link Vertex} to add to `dst`.
 * @param dst `src` is added to `dst`.
 * @returns Reference to `dst`.
 */
export declare function addVertexToRef<T extends Vertex, K extends Vertex>(src: T, dst: K): K;
/**
 * Subtract a {@link Vertex} from another {@link Vertex}.
 * @param vert1 `vert2` is subracted from `vert1`.
 * @param vert2 {@link Vertex} to subtract from `vert1`.
 * @param dst the result of the operation `vert1` - `vert2`.
 * @returns Reference to `dst`.
 */
export declare function subtractVertexToRef<T extends Vertex, K extends Vertex, V extends Vertex>(vert1: T, vert2: K, dst: V): V;
/**
 * Type guard to check if `v` is a {@link Vertex3} or not
 * @param v Possibly a {@link Vertex3}
 */
export declare function isVertex3(v: Vertex): v is Vertex3;
/**
 * Type guard to check if `v` is a {@link Vertex2} or not
 * @param v Possibly a {@link Vertex2}
 */
export declare function isVertex2(v: Vertex): v is Vertex2;
/**
 * Given a collection of points(vertices) , representing corners of outer edges of a polygon. Calculate
 * the centroid.
 * @param points Points
 * @param dst Where centroid value is written
 * @returns Reference to `dst`
 */
export declare function calculateCentroidVertex3ToRef<T extends Vertex3>(points: IterableIterator<Vertex3>, dst: T): T;
//# sourceMappingURL=index.d.ts.map