import { Vector3 } from "./Vector3";
/** An alias for Line for limited lines */
var LineSegment = /** @class */ (function () {
    function LineSegment(point, border) {
        this.point = point;
        this.border = border;
    }
    //#region Convert
    /**
     * Get the line that is given by the line segment
     * @param segment
     * @returns {Line}
     */
    LineSegment.convertToLine = function (segment) {
        return {
            point: segment.point,
            direction: segment.border,
        };
    };
    return LineSegment;
}());
export { LineSegment };
/** A line, consisting of an origin and a direction */
var Line = /** @class */ (function () {
    function Line(_point, _direction) {
        this.point = _point;
        this.direction = _direction;
    }
    //#region Create / Init
    /** Convenience function for creating a Line, cloning the parameters */
    Line.create = function (point, direction) {
        return {
            point: Vector3.clone(point),
            direction: Vector3.clone(direction),
        };
    };
    //#endregion Create / Init
    //#region Clone / Copy
    /** Convenience function for cloning a Line */
    Line.clone = function (ray) {
        return Line.create(ray.point, ray.direction);
    };
    return Line;
}());
export { Line };
