import { Object3D, Ray, Raycaster, Vector3 } from 'three'; /** * Interface representing a URDF Joint. */ interface URDFJoint extends Object3D { isURDFJoint: boolean; jointType: 'fixed' | 'revolute' | 'continuous' | 'prismatic'; axis: Vector3; setJointValue(angle: number): void; angle: number; } export declare class URDFDragControls { enabled: boolean; scene: Object3D; raycaster: Raycaster; initialGrabPoint: Vector3; hitDistance: number; hovered: URDFJoint | null; manipulating: URDFJoint | null; constructor(scene: Object3D); /** * Updates the hover state based on raycasting intersections. */ update(): void; /** * Updates the joint's angle. * @param joint - The joint to update. * @param angle - The new angle value. */ updateJoint(joint: URDFJoint, angle: number): void; /** * Called when dragging starts. * @param joint - The joint being dragged. */ onDragStart(joint: URDFJoint): void; /** * Called when dragging ends. * @param joint - The joint that was being dragged. */ onDragEnd(joint: URDFJoint): void; /** * Called when a joint is hovered. * @param joint - The joint being hovered. */ onHover(joint: URDFJoint): void; /** * Called when a joint is no longer hovered. * @param joint - The joint that was unhovered. */ onUnhover(joint: URDFJoint): void; /** * Calculates the delta for revolute joints based on drag points. * @param joint - The revolute joint. * @param startPoint - The starting point of the drag. * @param endPoint - The ending point of the drag. * @returns The calculated delta angle. */ getRevoluteDelta(joint: URDFJoint, startPoint: Vector3, endPoint: Vector3): number; /** * Calculates the delta for prismatic joints based on drag points. * @param joint - The prismatic joint. * @param startPoint - The starting point of the drag. * @param endPoint - The ending point of the drag. * @returns The calculated delta distance. */ getPrismaticDelta(joint: URDFJoint, startPoint: Vector3, endPoint: Vector3): number; /** * Moves the ray and updates the control state. * @param toRay - The new ray to set. */ moveRay(toRay: Ray): void; /** * Sets the grabbed state of the controls. * @param grabbed - Whether the object is grabbed. */ setGrabbed(grabbed: boolean): void; } export declare class PointerURDFDragControls extends URDFDragControls { camera: any; domElement: HTMLElement; private _mouseDown; private _mouseMove; private _mouseUp; constructor(scene: Object3D, camera: any, domElement: HTMLElement); /** * Calculates the delta for revolute joints with camera considerations. * @param joint - The revolute joint. * @param startPoint - The starting point of the drag. * @param endPoint - The ending point of the drag. * @returns The calculated delta angle. */ getRevoluteDelta(joint: URDFJoint, startPoint: Vector3, endPoint: Vector3): number; /** * Removes event listeners and cleans up resources. */ dispose(): void; } export {};