import { IColor3Like, IColor4Like, IMatrix4Like, IPoint3Like, IQuaternionLike, IRenderingFloatData, ISize, IVector2Like, IVector3Like, IVector4Like } from "./gs.types"; export declare class Point3 implements IPoint3Like { _data: number[]; get x(): number; set x(value: number); get y(): number; set y(value: number); get z(): number; set z(value: number); constructor(x?: number, y?: number, z?: number); get data(): number[]; multiply(vector: Vector3): Point3; divide(vector: Vector3): Point3; subtract(vector: Vector3): Point3; } export declare class Vector2 implements IVector2Like { _data: number[]; get x(): number; set x(value: number); get y(): number; set y(value: number); constructor(x?: number, y?: number); get data(): number[]; add(vector: IVector2Like): Vector2; subtract(vector: Vector2): Vector2; subtractFrom(vector: IVector2Like): this; /** * Gets the vector squared length * @returns the vector squared length (float) */ lengthSquared(): number; /** * Gets the length of the Vector2 * Example Playground https://playground.babylonjs.com/#R1F8YU#25 * @returns the length of the Vector2 */ length(): number; /** * Gets the dot product of the current vector and the vector "vector" * @param vector defines second vector * @returns the dot product (float) */ dot(vector: IVector2Like): number; scale(scale: number): Vector2; scaleFrom(scale: number): this; scaleAndAdd(scale: number): Vector2; normalize(): this; clone(): Vector2; set(x: number, y: number, z: number): void; setAll(v: number): this; equals(vector: Vector2): boolean; static Lerp(start: Vector2, end: Vector2, amount: number): Vector2; static Hermite(value1: Vector2, tangent1: Vector2, value2: Vector2, tangent2: Vector2, amount: number): Vector2; static FromArray(array: ArrayLike, offset?: number): Vector2; /** * Returns a new Vector2 set to (0.0, 0.0) * @returns a new empty Vector2 */ static Zero(): Vector2; /** * Returns a new Vector2 set to (1.0, 1.0) * @returns a new Vector2 */ static One(): Vector2; } export declare class Vector3 implements IVector3Like { _data: number[]; get x(): number; set x(value: number); get y(): number; set y(value: number); get z(): number; set z(value: number); constructor(x?: number, y?: number, z?: number); get data(): number[]; /** * Returns a new Vector4 as the result of the addition of the current Vector4 and the given one. * @param otherVector the vector to add * @returns the resulting vector */ add(vector: IVector3Like): Vector3; multiply(vector: Vector3): Vector3; multiplyTo(vector: Vector3, result: Vector3): Vector3; divide(vector: Vector3): Vector3; divideFrom(vector: Vector3): this; subtract(vector: Vector3): Vector3; subtractFrom(vector: IVector3Like): this; cross(vector: Vector3): Vector3; crossFrom(vector: Vector3): void; normalize(): this; /** * Gets the squared length of the Vector3 * Example Playground https://playground.babylonjs.com/#R1F8YU#26 * @returns squared length of the Vector3 */ lengthSquared(): number; /** * Gets the length of the Vector3 * Example Playground https://playground.babylonjs.com/#R1F8YU#25 * @returns the length of the Vector3 */ length(): number; /** * Gets the dot product of the current vector and the vector "vector" * @param vector defines second vector * @returns the dot product (float) */ dot(vector: IVector3Like): number; transform(transform: Matrix4): Vector3; transformCoordinates(transform: Matrix4): Vector3; scale(scale: number): Vector3; scaleFrom(scale: number): this; scaleAndAdd(scale: number): Vector3; scaleAndAddTo(scale: number, result: Vector3): Vector3; rotationFromAxis(xAxis: Vector3, yAxis: Vector3): Vector3; clone(): Vector3; set(x: number, y: number, z: number): void; setAll(v: number): this; equals(otherVector: Vector3): boolean; static Lerp(start: Vector3, end: Vector3, amount: number): Vector3; static LerpTo(start: Vector3, end: Vector3, amount: number, result: Vector3): Vector3; /** * Returns a new Vector3 located for "amount" (float) on the Hermite interpolation spline defined by the vectors "value1", "tangent1", "value2", "tangent2" * Example Playground https://playground.babylonjs.com/#R1F8YU#89 * @param value1 defines the first control point * @param tangent1 defines the first tangent vector * @param value2 defines the second control point * @param tangent2 defines the second tangent vector * @param amount defines the amount on the interpolation spline (between 0 and 1) * @returns the new Vector3 */ static Hermite(value1: Vector3, tangent1: Vector3, value2: Vector3, tangent2: Vector3, amount: number): Vector3; /** * Returns a new Vector3 located for "amount" on the CatmullRom interpolation spline defined by the vectors "value1", "value2", "value3", "value4" * Example Playground https://playground.babylonjs.com/#R1F8YU#69 * @param value1 defines the first control point * @param value2 defines the second control point * @param value3 defines the third control point * @param value4 defines the fourth control point * @param amount defines the amount on the spline to use * @returns the new Vector3 */ static CatmullRom(value1: Vector3, value2: Vector3, value3: Vector3, value4: Vector3, amount: number): Vector3; /** * Returns a new Vector3 set to (0.0, 0.0, 0.0) * @returns a new empty Vector3 */ static Zero(): Vector3; /** * Returns a new Vector3 set to (1.0, 1.0, 1.0) * @returns a new Vector3 */ static One(): Vector3; /** * Returns the distance between the vectors "value1" and "value2" * Example Playground https://playground.babylonjs.com/#R1F8YU#81 * @param value1 defines the first operand * @param value2 defines the second operand * @returns the distance */ static Distance(value1: Vector3, value2: Vector3): number; /** * Returns the squared distance between the vectors "value1" and "value2" * Example Playground https://playground.babylonjs.com/#R1F8YU#80 * @param value1 defines the first operand * @param value2 defines the second operand * @returns the squared distance */ static DistanceSquared(value1: Vector3, value2: Vector3): number; /** * Returns a new Vector3 set to (0.0, 1.0, 0.0) * Example Playground https://playground.babylonjs.com/#R1F8YU#71 * @returns a new up Vector3 */ static Up(): Vector3; /** * Returns a new Vector3 set to (0.0, -1.0, 0.0) * Example Playground https://playground.babylonjs.com/#R1F8YU#71 * @returns a new down Vector3 */ static Down(): Vector3; /** * Returns a new Vector3 set to (0.0, 0.0, 1.0) * Example Playground https://playground.babylonjs.com/#R1F8YU#71 * @param rightHandedSystem is the scene right-handed (negative z) * @returns a new forward Vector3 */ static Forward(rightHandedSystem?: boolean): Vector3; /** * Returns a new Vector3 set to (0.0, 0.0, -1.0) * Example Playground https://playground.babylonjs.com/#R1F8YU#71 * @param rightHandedSystem is the scene right-handed (negative-z) * @returns a new Backward Vector3 */ static Backward(rightHandedSystem?: boolean): Vector3; /** * Returns a new Vector3 set to (1.0, 0.0, 0.0) * Example Playground https://playground.babylonjs.com/#R1F8YU#71 * @returns a new right Vector3 */ static Right(): Vector3; /** * Returns a new Vector3 set to (-1.0, 0.0, 0.0) * Example Playground https://playground.babylonjs.com/#R1F8YU#71 * @returns a new left Vector3 */ static Left(): Vector3; static FromArray(array: ArrayLike, offset?: number): Vector3; } export declare class Vector4 implements IVector4Like { _data: number[]; get x(): number; set x(value: number); get y(): number; set y(value: number); get z(): number; set z(value: number); get w(): number; set w(value: number); get data(): number[]; constructor(x?: number, y?: number, z?: number, w?: number); /** * Returns a new Vector4 as the result of the addition of the current Vector4 and the given one. * @param otherVector the vector to add * @returns the resulting vector */ add(vector: IVector4Like): Vector4; /** * Gets the squared length of the Vector3 * Example Playground https://playground.babylonjs.com/#R1F8YU#26 * @returns squared length of the Vector3 */ lengthSquared(): number; /** * Gets the length of the Vector4 * Example Playground https://playground.babylonjs.com/#R1F8YU#25 * @returns the length of the Vector4 */ length(): number; /** * Gets the dot product of the current vector and the vector "vector" * @param vector defines second vector * @returns the dot product (float) */ dot(vector: IVector4Like): number; normalize(): this; multiply(vector: IVector4Like): Vector4; scaleAndAdd(scale: number): Vector4; clone(): Vector4; set(x: number, y: number, z: number, w: number): void; setAll(v: number): this; equals(otherVector: Vector4): boolean; static FromArray(array: ArrayLike, offset?: number): Vector4; /** * Returns a new Vector4 set to (0.0, 0.0, 0.0, 0.0) * @returns a new empty Vector4 */ static Zero(): Vector4; /** * Returns a new Vector4 set to (1.0, 1.0, 1.0, 1.0) * @returns a new Vector4 */ static One(): Vector4; } export declare class Quaternion implements IQuaternionLike { _data: number[]; get x(): number; set x(value: number); get y(): number; set y(value: number); get z(): number; set z(value: number); get w(): number; set w(value: number); get data(): number[]; constructor(x?: number, y?: number, z?: number, w?: number); addFrom(vector: Quaternion): this; dot(other: Quaternion): number; toEulerAngles(): Vector3; toRotationMatrix(): Matrix4; normalize(): this; conjugate(): this; multiply(q1: Quaternion): Quaternion; multiplyTo(q1: Quaternion, result: Quaternion): Quaternion; scale(value: number): Quaternion; scaleFrom(value: number): this; scaleAndAdd(scale: number): Quaternion; scaleAndAddTo(scale: number, result: Quaternion): Quaternion; set(x: number, y: number, z: number, w: number): void; setAll(v: number): this; copyFrom(vector: Quaternion): this; static FromArray(array: ArrayLike, offset?: number): Quaternion; equals(otherQuaternion: Quaternion): boolean; /** * Returns a new Quaternion set to (0.0, 0.0, 0.0, 0.0) * @returns a new empty Quaternion */ static Zero(): Quaternion; static FromRotationMatrix(matrix: Matrix4): Quaternion; static RotationQuaternionFromAxes(axis1: Vector3, axis2: Vector3, axis3: Vector3): Quaternion; static Slerp(left: Quaternion, right: Quaternion, amount: number): Quaternion; static SlerpTo(left: Quaternion, right: Quaternion, amount: number, result: Quaternion): Quaternion; /** * Interpolate between two quaternions using Hermite interpolation * Example Playground https://playground.babylonjs.com/#L49EJ7#47 * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/drawCurves#hermite-quaternion-spline * @param value1 defines first quaternion * @param tangent1 defines the incoming tangent * @param value2 defines second quaternion * @param tangent2 defines the outgoing tangent * @param amount defines the target quaternion * @returns the new interpolated quaternion */ static Hermite(value1: Quaternion, tangent1: Quaternion, value2: Quaternion, tangent2: Quaternion, amount: number): Quaternion; } export declare class Matrix4 implements IMatrix4Like, IRenderingFloatData { _data: number[]; private _isIdentity; private _isIdentityDirty; private _isIdentity3x2; private _isIdentity3x2Dirty; get data(): number[]; get renderingData(): Float32Array; /** * Check if the current matrix is identity * @returns true is the matrix is the identity matrix */ get isIdentity(): boolean; /** * Check if the current matrix is identity as a texture matrix (3x2 store in 4x4) * @returns true is the matrix is the identity matrix */ get isIdentityAs3x2(): boolean; constructor(data?: number[]); multiply(matrix: Matrix4): Matrix4; multiplyPoint3(point: Point3): Point3; multiplyVector3(vector: Vector3): Vector3; multiplyVector4(vector: Vector4): Vector4; multiplyVector3Coordinates(vector: Vector3): Vector3; /** * Gets the determinant of the matrix * Example Playground - https://playground.babylonjs.com/#AV9X17#34 * @returns the matrix determinant */ determinant(): number; inverse(): Matrix4; clone(): Matrix4; decompose(scale?: Vector3, rotation?: Quaternion, translation?: Vector3): boolean; equals(value: Matrix4): boolean; set(data: number[]): void; static Identity(): Matrix4; static Rotate(axis: Vector3, alpha: number): Matrix4; static RotationX(alpha: number): Matrix4; static RotationY(alpha: number): Matrix4; static RotationZ(alpha: number): Matrix4; static Translation(x: number, y: number, z: number): Matrix4; static FromXYZAxes(xAxis: Vector3, yAxis: Vector3, zAxis: Vector3): Matrix4; static FromQuaternion(quat: Quaternion): Matrix4; static Compose(scale: Vector3, rotation: Quaternion, translation: Vector3): Matrix4; static ComposeTo(scale: Vector3, rotation: Quaternion, translation: Vector3, result: Matrix4): Matrix4; static DecomposeLerp(startValue: Matrix4, endValue: Matrix4, gradient: number): Matrix4; static Lerp(startValue: Matrix4, endValue: Matrix4, gradient: number): Matrix4; static FromArray(array: ArrayLike, offset?: number): Matrix4; static Zero(): Matrix4; } /** * @internal */ export declare class TmpVectors { /** 3 temp Vector2 at once should be enough */ static Vector2: [Vector2, Vector2, Vector2]; /** 13 temp Vector3 at once should be enough */ static Vector3: [Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3]; /** 3 temp Vector4 at once should be enough */ static Vector4: [Vector4, Vector4, Vector4]; /** 2 temp Quaternion at once should be enough */ static Quaternion: [Quaternion, Quaternion]; /** 8 temp Matrices at once should be enough */ static Matrix: [Matrix4, Matrix4, Matrix4, Matrix4, Matrix4, Matrix4, Matrix4, Matrix4]; } export declare class Color3 implements IColor3Like, IRenderingFloatData { _data: number[]; get r(): number; set r(value: number); get g(): number; set g(value: number); get b(): number; set b(value: number); get data(): number[]; get renderingData(): Float32Array; static get white(): Color3; static get black(): Color3; constructor(r?: number, g?: number, b?: number); add(otherColor: Color3): Color3; scale(scale: number): Color3; equalsValues(r: number, g: number, b: number): boolean; static Lerp(start: Color3, end: Color3, amount: number): Color3; static Hermite(value1: Color3, tangent1: Color3, value2: Color3, tangent2: Color3, amount: number): Color3; static Black(): Color3; static White(): Color3; static FromArray(array: ArrayLike, offset?: number): Color3; } export declare class Color4 implements IColor4Like, IRenderingFloatData { _data: number[]; get r(): number; set r(value: number); get g(): number; set g(value: number); get b(): number; set b(value: number); get a(): number; set a(value: number); get data(): number[]; get renderingData(): Float32Array; static get white(): Color4; static get black(): Color4; constructor(r?: number, g?: number, b?: number, a?: number); add(otherColor: Color4): Color4; /** * Multiplies the rgb values by scale and stores the result into "result" * @param scale defines the scaling factor * @param result defines the Color3 object where to store the result * @returns the result Color3 */ scale(scale: number): Color4; equalsValues(r: number, g: number, b: number): boolean; set(r: number, g: number, b: number, a: number): void; copyFrom(color: Color4): this; static Lerp(start: Color4, end: Color4, amount: number): Color4; static Hermite(value1: Color4, tangent1: Color4, value2: Color4, tangent2: Color4, amount: number): Color4; static FromArray(array: ArrayLike, offset?: number): Color4; } /** Defines the 3 main axes */ export declare class Axis { /** X axis */ static X: Vector3; /** Y axis */ static Y: Vector3; /** Z axis */ static Z: Vector3; } export declare class WorkCoordinateSystem { private origin; private xAxis; private yAxis; private zAxis; local: Matrix4; model: Matrix4; constructor(origin: Point3, xAxis: Vector3, yAxis: Vector3); /** * 获取局部坐标位置 * @param point * @returns */ toLocalPoint(point: Point3): Point3; /** * 获取局部坐标法向 * @param vector * @returns */ toLocalVector(vector: Vector3): Vector3; /** * 获取世界坐标位置 * @param point * @returns */ toModelPoint(point: Point3): Point3; /** * 获取世界坐标法向 * @param vector * @returns */ toModelVector(vector: Vector3): Vector3; } /** * Size containing width and height */ export declare class Size implements ISize { /** * Width */ width: number; /** * Height */ height: number; /** * Creates a Size object from the given width and height (floats). * @param width width of the new size * @param height height of the new size */ constructor(width: number, height: number); /** * Returns a string with the Size width and height * @returns a string with the Size width and height */ toString(): string; /** * "Size" * @returns the string "Size" */ getClassName(): string; /** * Returns the Size hash code. * @returns a hash code for a unique width and height */ getHashCode(): number; /** * Updates the current size from the given one. * @param src the given size */ copyFrom(src: Size): void; /** * Updates in place the current Size from the given floats. * @param width width of the new size * @param height height of the new size * @returns the updated Size. */ copyFromFloats(width: number, height: number): Size; /** * Updates in place the current Size from the given floats. * @param width width to set * @param height height to set * @returns the updated Size. */ set(width: number, height: number): Size; /** * Multiplies the width and height by numbers * @param w factor to multiple the width by * @param h factor to multiple the height by * @returns a new Size set with the multiplication result of the current Size and the given floats. */ multiplyByFloats(w: number, h: number): Size; /** * Clones the size * @returns a new Size copied from the given one. */ clone(): Size; /** * True if the current Size and the given one width and height are strictly equal. * @param other the other size to compare against * @returns True if the current Size and the given one width and height are strictly equal. */ equals(other: Size): boolean; /** * The surface of the Size : width * height (float). */ get surface(): number; /** * Create a new size of zero * @returns a new Size set to (0.0, 0.0) */ static Zero(): Size; /** * Sums the width and height of two sizes * @param otherSize size to add to this size * @returns a new Size set as the addition result of the current Size and the given one. */ add(otherSize: Size): Size; /** * Subtracts the width and height of two * @param otherSize size to subtract to this size * @returns a new Size set as the subtraction result of the given one from the current Size. */ subtract(otherSize: Size): Size; /** * Scales the width and height * @param scale the scale to multiply the width and height by * @returns a new Size set with the multiplication result of the current Size and the given floats. */ scale(scale: number): Size; /** * Creates a new Size set at the linear interpolation "amount" between "start" and "end" * @param start starting size to lerp between * @param end end size to lerp between * @param amount amount to lerp between the start and end values * @returns a new Size set at the linear interpolation "amount" between "start" and "end" */ static Lerp(start: Size, end: Size, amount: number): Size; }