/** @internal NOTE: Internal APIs. Subject to change. Use of these APIs in production applications is not supported. */ /** */
import { Vertex3 } from '.';
import { VertexData } from '../loader/babylonjs-import';
/**
 * Represents a UV coordinate
 */
export interface UV {
    /** U value */
    u: number;
    /** V value */
    v: number;
}
/**
 * Represents a specific point in a {@link VertexData} instance. This can be very useful when we need
 * to work with specific point data from a {@link VertexData} instance.
 */
export declare class VertexDataTrianglePoint {
    readonly vertexData: VertexData;
    /**
     * Offset for X value in {@link vertexData.positions} and {@link vertexData.normals} arrays.
     */
    readonly xOffset: number;
    /**
     * Offset for Y value in {@link vertexData.positions} and {@link vertexData.normals} arrays.
     */
    readonly yOffset: number;
    /**
     * Offset for Z value in {@link vertexData.positions} and {@link vertexData.normals} arrays.
     */
    readonly zOffset: number;
    /**
     * Offset for U value in {@link vertexData.uvs}'s arrays
     */
    readonly uOffset: number;
    /**
     * Offset for V value in {@link vertexData.uvs}'s arrays
     */
    readonly vOffset: number;
    /**
     *
     * @param vertexData {@link VertexData} instance.
     */
    constructor(vertexData: VertexData);
    /**
     * Rebuild `x|y|z|u|vOffsets` from specified offset in {@link vertexData.indices} buffer. This is useful
     * in high peformance loops where we might want to reuse {@link VertexDataTrianglePoint} for performance
     * reasons (in very compute heavy scenarios the time to "new" a new object actually matters, not to mention GC contraints).
     * @param indicesOffset Indice in {@link vertexData.indices} (represents a point in a triangle).
     * @return Reference to `this`.
     */
    rebuild(indicesOffset: number): VertexDataTrianglePoint;
    /**
     * Copy X,Y,Z coordianate from {@link vertexData}, this instance represents, into {@link dst}
     * @param p Property to get X,Y,Z data from in {@link vertexData}.
     * @param dst Where X,Y,Z coordinate shall be written.
     * @returns Reference to `dst`.
     */
    xyzToRef<T extends Vertex3>(p: 'positions' | 'normals' | 'tangents', dst: T): T;
    /**
     * Copy U,V coordianate from {@link vertexData}, this instance represents, into {@link dst}
     * @param p Property to get U,V data from in {@link vertexData}.
     * @param dst Where U,V coordinate shall be written.
     * @returns Reference to `dst`.
     */
    uvToRef<T extends UV>(p: 'uvs' | 'uvs2' | 'uvs3' | 'uvs4' | 'uvs5' | 'uvs6', dst: T): T;
}
/**
 * Callback for use with methods in {@link VertexDataUtil}.
 */
export interface VertexDataUtilsForEachTriangleHandler {
    /**
     * Function signature for use with methods in {@link VertexDataUtils}.
     * @param p1 First corner of the triangle.
     * @param p2 Seconds corner of the triangle
     * @param p3 Third corner of the triangle
     * @returns `false` indicates that caller code should stop any other invocations of the function.
     */
    (p1: VertexDataTrianglePoint, p2: VertexDataTrianglePoint, p3: VertexDataTrianglePoint): boolean | undefined;
}
/**
 * Utility methods for {@link VertexData}.
 */
export declare class VertexDataUtils {
    /**
     * Visit each triangle (and their corners) defined by `vertexData.indices` and `vertexData.positions`. Also makes it
     * possible to get normals and uvs from the triangle corners.
     * @param vertexData {@link VertexData}.
     * @param action Callback where parameters represents the three corners of the triangle. Do NOT store references to these parameters (or anything in them)
     * as they point to objects which are reused for every invocation of the callback.
     * @param indiceStartOffset Offset in `vertexData.indice` where iteration shall start. Defaults to 0. Will be forced to >= 0 and a multiple of 3.
     */
    static forEachTriangle(vertexData: VertexData, action: VertexDataUtilsForEachTriangleHandler, indiceStartOffset?: number): void;
}
//# sourceMappingURL=VertexDataUtil.d.ts.map