export class OBB { /** * Creates an oriented-bounding-box (OBB) from a 12-element numeric array. * * @param {number[]} values 12 numbers: * `[cx, cy, cz, e1x, e1y, e1z, e2x, e2y, e2z, e3x, e3y, e3z]` where * `center = (cx, cy, cz)` and `e1 e2 e3` are the local edge vectors. * @constructor * @memberof OBB * @see OBB implementation source :contentReference[oaicite:0]{index=0} */ constructor(values: number[]); isOBB: boolean; center: Vector3; e1: Vector3; e2: Vector3; e3: Vector3; halfSize: Vector3; rotationMatrix: Matrix3; /** * Copy all geometric properties from another {@link OBB}. * * @param {OBB} aObb Source OBB whose data will be copied. * @returns {void} * @memberof OBB * @see OBB implementation source :contentReference[oaicite:1]{index=1} */ copy(aObb: OBB): void; /** * Get the full **size** (width, height, depth) of this OBB. * * @param {THREE.Vector3} result Pre-allocated vector that receives the size. * @returns {THREE.Vector3} The same `result` instance for chaining. * @memberof OBB * @see OBB implementation source :contentReference[oaicite:2]{index=2} */ getSize(result: THREE.Vector3): THREE.Vector3; /** * Apply an arbitrary affine transformation to this OBB. * * Scales, rotations (including non-uniform scale & reflection) and translations * encoded in the 4×4 matrix are baked into `center`, `rotationMatrix` * and `halfSize`. * * @param {THREE.Matrix4} matrix World-space transform to apply. * @returns {OBB} This instance for chaining. * @memberof OBB * @see OBB implementation source :contentReference[oaicite:3]{index=3} */ applyMatrix4(matrix: THREE.Matrix4): OBB; /** * Compute the exact intersection point between a world-space ray and this OBB. * * @param {THREE.Ray} ray Ray expressed in world coordinates. * @param {THREE.Vector3} result Vector that receives the intersection point. * @returns {?THREE.Vector3} `result` with the hit point, or `null` if no hit. * @memberof OBB * @see OBB implementation source :contentReference[oaicite:4]{index=4} */ intersectRay(ray: THREE.Ray, result: THREE.Vector3): THREE.Vector3 | null; /** * Clamp a point to the surface or interior of the OBB (closest point query). * * @param {THREE.Vector3} point World-space point to be clamped. * @param {THREE.Vector3} target Vector that will receive the clamped point. * @returns {THREE.Vector3} The same `target` instance for chaining. * @memberof OBB * @see OBB implementation source :contentReference[oaicite:5]{index=5} */ clampPoint(point: THREE.Vector3, target: THREE.Vector3): THREE.Vector3; /** * Test whether a {@link THREE.Sphere} intersects or is contained by this OBB. * * @param {THREE.Sphere} sphere Sphere to test. * @returns {boolean} `true` if the sphere overlaps the OBB. * @memberof OBB * @see OBB implementation source :contentReference[oaicite:6]{index=6} */ intersectsSphere(sphere: THREE.Sphere): boolean; /** * Separating-Axis-Theorem (SAT) intersection test between two OBBs. * * @param {OBB} other The second OBB. * @param {number} [epsilon=Number.EPSILON] Numerical tolerance for stability. * @returns {boolean} `true` if the two OBBs overlap. * @memberof OBB * @see OBB implementation source :contentReference[oaicite:7]{index=7} */ intersectsOBB(other: OBB, epsilon?: number): boolean; /** * Fast boolean ray-OBB intersection convenience method. * * @param {THREE.Ray} ray Ray expressed in world coordinates. * @returns {boolean} `true` if the ray intersects the OBB. * @memberof OBB * @see OBB implementation source :contentReference[oaicite:8]{index=8} */ intersectsRay(ray: THREE.Ray): boolean; /** * Determine whether the OBB lies on the positive side of (or intersects) a plane. * * The plane is interpreted as **inside-facing** when its normal points toward * the allowed half-space. * * @param {THREE.Plane} plane Plane used for the half-space test. * @returns {boolean} `true` if any part of the OBB is inside or touching the plane. * @memberof OBB * @see OBB implementation source :contentReference[oaicite:9]{index=9} */ insidePlane(plane: THREE.Plane): boolean; /** * View-frustum culling test. * * @param {THREE.Frustum} frustum Frustum to test against. * @returns {boolean} `true` if this OBB is at least partially inside the frustum. * @memberof OBB * @see OBB implementation source :contentReference[oaicite:10]{index=10} */ inFrustum(frustum: THREE.Frustum): boolean; /** * Compute the shortest Euclidean distance from the OBB to a point. * * @param {THREE.Vector3} point Point in world coordinates. * @returns {number} Distance (≥ 0). Zero indicates the point is inside. * @memberof OBB * @see OBB implementation source :contentReference[oaicite:11]{index=11} */ distanceToPoint(point: THREE.Vector3): number; /** * Create a red wire-frame visual helper for debugging purposes. * * @returns {THREE.LineSegments} A disposable wireframe object that * renders the eight corners and twelve edges of the OBB. * @memberof OBB * @see OBB implementation source :contentReference[oaicite:12]{index=12} */ helper(): THREE.LineSegments; } import { Vector3 } from "three"; import { Matrix3 } from "three";