import { Plane } from "./Plane.ts"; import { Vector3 } from "./Vector3.ts"; /** Triangle defined by three 3D vertices. */ export declare class Triangle { #private; constructor(a?: Vector3, b?: Vector3, c?: Vector3); get a(): Vector3; set a(value: Vector3); get b(): Vector3; set b(value: Vector3); get c(): Vector3; set c(value: Vector3); set(a: Vector3, b: Vector3, c: Vector3): this; clone(): Triangle; copy(triangle: Triangle): this; getArea(): number; /** * Computes barycentric coordinates of point relative to triangle (a, b, c). * Returns undefined if point is not coplanar or triangle is degenerate. */ static getBarycoord(point: Vector3, a: Vector3, b: Vector3, c: Vector3, target?: Vector3): Vector3 | undefined; getBarycoord(point: Vector3, target?: Vector3): Vector3 | undefined; static containsPoint(point: Vector3, a: Vector3, b: Vector3, c: Vector3): boolean; containsPoint(point: Vector3): boolean; closestPointToPoint(point: Vector3, target?: Vector3): Vector3; equals(triangle: Triangle): boolean; /** Interpolates v1, v2, v3 at the barycentric coordinate of point in triangle (a,b,c). */ static getInterpolation(point: Vector3, a: Vector3, b: Vector3, c: Vector3, v1: Vector3, v2: Vector3, v3: Vector3, target?: Vector3): Vector3 | undefined; getInterpolation(point: Vector3, v1: Vector3, v2: Vector3, v3: Vector3, target?: Vector3): Vector3 | undefined; getMidpoint(target?: Vector3): Vector3; /** Computes the normal of triangle (a, b, c) into target. */ static getNormal(a: Vector3, b: Vector3, c: Vector3, target?: Vector3): Vector3; getNormal(target?: Vector3): Vector3; getPlane(target?: Plane): Plane; intersectsBox(box: { min: Vector3; max: Vector3; intersectsTriangle?: (tri: Triangle) => boolean; }): boolean; /** Returns true if triangle (a,b,c) is front-facing relative to direction. */ static isFrontFacing(a: Vector3, b: Vector3, c: Vector3, direction: Vector3): boolean; isFrontFacing(direction: Vector3): boolean; } //# sourceMappingURL=Triangle.d.ts.map