/** Base class for Vector, Quaternion, and Color */ export declare abstract class MathType { /** Convert to array of number for use with Stardust's API */ abstract toArray(): number[]; /** Clone the object */ abstract clone(): MathType; } /** 2D vector */ export declare class Vector2 extends MathType { x: number; y: number; /** Create a Vector2 from a pair of numbers */ static FromArray([a, b]: number[]): Vector2; constructor(x?: number, y?: number); clone(): Vector2; add(rhs: Vector2): Vector2; sub(rhs: Vector2): Vector2; mul(rhs: Vector2): Vector2; div(rhs: Vector2): Vector2; scale(rhs: number): Vector2; dot(rhs: Vector2): number; /** Compute the length of the vector */ length(): number; /** Return the normalized vector. Does not affect this vector */ normalize(): Vector3; toArray(): number[]; } /** 3D vector */ export declare class Vector3 extends MathType { x: number; y: number; z: number; /** Create a Vector3 from a triplet of numbers */ static FromArray([a, b, c]: number[]): Vector3; constructor(x?: number, y?: number, z?: number); clone(): Vector3; add(rhs: Vector3): Vector3; sub(rhs: Vector3): Vector3; mul(rhs: Vector3): Vector3; div(rhs: Vector3): Vector3; scale(rhs: number): Vector3; dot(rhs: Vector3): number; cross(rhs: Vector3): Vector3; /** Compute the length of the vector */ length(): number; /** Return the normalized vector. Does not affect this vector */ normalize(): Vector3; toArray(): number[]; } /** Quaternion */ export declare class Quaternion extends MathType { x: number; y: number; z: number; w: number; /** Spherical linear interpolation */ static Slerp(q1: Quaternion, q2: Quaternion, t: number): Quaternion; /** Create a rotation quaternion from axis and rotation angle */ static Rotation(axis: Vector3, angle: number): Quaternion; /** Create a Vector2 from an array of four numbers */ static FromArray([a, b, c, d]: number[]): Quaternion; constructor(x?: number, y?: number, z?: number, w?: number); clone(): Quaternion; /** Return the conjugate of this quaternion */ conj(): Quaternion; /** Quaternion multiplication */ mul(rhs: Quaternion): Quaternion; /** Rotate the vector with this quaternion */ rotate(vector: Vector3): Vector3; /** Compute the length of the quaternion */ length(): number; /** Return the normalized quaternion. Does not affect this quaternion */ normalize(): Quaternion; /** Spherical linear interpolation */ slerp(rhs: Quaternion, t: number): Quaternion; toArray(): number[]; } /** 3D pose */ export declare class Pose { position: Vector3; rotation: Quaternion; constructor(position?: Vector3, rotation?: Quaternion); transform(point: Vector3): Vector3; transformDirection(direction: Vector3): Vector3; concat(pose2: Pose): Pose; invert(): Pose; }