UNPKG

@achirita/blox

Version:

A CAD library for building 3D models in the browser.

58 lines (57 loc) 1.54 kB
import { Vector } from './vector'; export class Axis { /** * The X-axis, with origin at `Vector.ZERO` and direction `Vector.X`. * @type {Axis} * @static */ static OX: Axis; /** * The Y-axis, with origin at `Vector.ZERO` and direction `Vector.Y`. * @type {Axis} * @static */ static OY: Axis; /** * The Z-axis, with origin at `Vector.ZERO` and direction `Vector.Z`. * @type {Axis} * @static */ static OZ: Axis; /** * Creates a new `Axis` instance. * @param {Object} parameters - The parameters for the axis. * @param {Vector} parameters.origin - The origin of the axis. * @param {Vector} parameters.direction - The direction of the axis. */ constructor({ origin, direction }: { origin: Vector; direction: Vector; }); /** * Returns the wrapped OpenCascade object. * @private */ private get wrapped(); /** * Sets the origin of the axis. * @param {Vector} value - The new origin of the axis. */ set origin(value: Vector); /** * Retrieves the origin of the axis. * @returns {Vector} The origin of the axis. */ get origin(): Vector; /** * Sets the direction of the axis. * @param {Vector} value - The new direction of the axis. */ set direction(value: Vector); /** * Retrieves the direction of the axis. * @returns {Vector} The direction of the axis. */ get direction(): Vector; #private; }