import { Rectangle, Vector3D } from '@awayjs/core'; import { AttributesView } from '@awayjs/stage'; type TGenCallback = (source: PolygonView, result: PolygonView, back: boolean) => void; export declare class Vertice3DView { private _data; get length(): number; toVec(vect?: Vector3D, index?: number): Vector3D; fromVec(vect: Vector3D, index?: number): this; setData(data: Float32Array, index: number, clone?: boolean): this; getData(index: number): Float32Array; lerpTo(target: Vertice3DView, alpha: number): this; add(source: Vertice3DView, scale?: number): this; scale(s: number): this; copyFrom(from: Vertice3DView): this; clone(): Vertice3DView; } export declare class PolygonView { vertices: Array; userData: T; private _middle; get middle(): Vertice3DView; constructor(points?: Vertice3DView[], userData?: T); clone(): PolygonView; add(view: Vertice3DView, clone?: boolean): this; get length(): number; } export declare class MeshView { poly: PolygonView[]; rect: Rectangle; polySize: number; hasNGones: boolean; push(p: PolygonView): this; /** * Unroll all n-gone convex polys to 3-gone polygons */ normalise(): this; /** * Construct buffer from poly data * @param index Index of vertices attribute 0 - pos, 1 - uv etc */ toFloatArray(index?: number): Float32Array; static fromAttributes(attrs: AttributesView[], length: number, polySize?: number, userDataCtor?: { new (): T; }): MeshView; } export declare class GeneratorUtils { private static EPS; private static InFront; private static Behind; private static OnPlane; private static Intersect; private static SliceNaive; static SliceAllNaive(mesh: MeshView, n: Vector3D, d: number): MeshView; /** * It gen corrupted results, need improve, eXponenta * * Splits a polygon in half along a splitting plane using a clipping algorithm * call Sutherland-Hodgman clipping * Resource: Page 367 of Ericson (Real-Time Collision Detection) */ static SutherlandHodgman(poly: PolygonView, normal: Vector3D, d: number, out: MeshView, callback?: TGenCallback): MeshView; static SliceHodgman(mesh: MeshView, n: Vector3D, d: number, callback?: TGenCallback): MeshView; } export {}; //# sourceMappingURL=GeneratorUtils.d.ts.map