/*!
 * Copyright (c) 2026 Vertex Software LLC. All rights reserved.
 */
import { Matrix4, Vector3 } from "@vertexvis/geometry";
/**
 * Represents an orientation using an `up` and `forward` vector.
 */
export class Orientation {
    constructor(
    /**
     * The up orientation vector.
     */
    y, 
    /**
     * The forward orientation vector.
     */
    z) {
        this.y = y;
        this.z = z;
    }
    /**
     * A rotation matrix for this orientation.
     */
    get matrix() {
        const z = this.z;
        const y = this.y;
        const x = Vector3.cross(y, z);
        return Matrix4.makeBasis(x, y, z);
    }
}
/**
 * A default orientation where the up vector points up is represented as `[0, 1, 0]` and
 * forward is represented as `[0, 0, -1]`.
 */
Orientation.DEFAULT = new Orientation(Vector3.up(), Vector3.back());
//# sourceMappingURL=orientation.js.map
