/*!
 * Copyright (c) 2026 Vertex Software LLC. All rights reserved.
 */
import { Vector3 } from "@vertexvis/geometry";
import { Color } from "@vertexvis/utils";
import { Drawable } from "./drawable";
export class AxisLinePoints {
    constructor(valid, worldOrigin, worldEnd, origin, end) {
        this.valid = valid;
        this.worldOrigin = worldOrigin;
        this.worldEnd = worldEnd;
        this.origin = origin;
        this.end = end;
    }
    shortestDistanceFrom(vector) {
        return this.toWorldArray()
            .map((v) => Vector3.distance(v, vector))
            .sort((a, b) => a - b)[0];
    }
    toWorldArray() {
        return [this.worldOrigin, this.worldEnd];
    }
    toArray() {
        return [this.origin, this.end];
    }
}
export class AxisLine extends Drawable {
    constructor(createShape, identifier, points, outlineColor = '#000000', fillColor = '#000000', shapeProps = { thickness: 3 }) {
        super(createShape, identifier, points, typeof outlineColor === 'string'
            ? outlineColor
            : Color.toHexString(outlineColor), typeof fillColor === 'string' ? fillColor : Color.toHexString(fillColor), shapeProps);
    }
}
export class RotationLinePoints {
    constructor(valid, world, ndc) {
        this.valid = valid;
        this.world = world;
        this.ndc = ndc;
    }
    shortestDistanceFrom(vector) {
        return this.toWorldArray()
            .map((v) => Vector3.distance(v, vector))
            .sort((a, b) => a - b)[0];
    }
    toWorldArray() {
        return this.world;
    }
    toArray() {
        return this.ndc;
    }
}
export class RotationLine extends Drawable {
    constructor(createShape, identifier, points, outlineColor = '#000000', shapeProps = {
        join: 'round',
    }, disabled = false) {
        super(createShape, identifier, points, typeof outlineColor === 'string'
            ? outlineColor
            : Color.toHexString(outlineColor), undefined, shapeProps);
        this.disabled = disabled;
    }
    setDisabled(disabled) {
        this.disabled = disabled;
    }
}
//# sourceMappingURL=line.js.map
