///
declare module "copyright" {
export class FoundationRuntimeMathCopyright {
static toString(): string;
}
}
declare module "foundation/runtime/math/Value2" {
export interface Value2 {
x: number;
y: number;
}
}
declare module "foundation/runtime/math/Curve2" {
import { IFreeable } from 'cross/runtime/lang/IFreeable';
import { Value2 } from "foundation/runtime/math/Value2";
import { Vector2 } from "foundation/runtime/math/Vector2";
export class Curve2 implements IFreeable {
from: Vector2;
to: Vector2;
constructor(from?: Value2, to?: Value2);
set(from: Value2, to: Value2): Curve2;
assign(line: Curve2): Curve2;
addValue(x: number, y: number): Curve2;
free(): void;
dispose(): void;
}
}
declare module "foundation/runtime/math/Line2" {
import { Curve2 } from "foundation/runtime/math/Curve2";
import { Value2 } from "foundation/runtime/math/Value2";
import { Vector2 } from "foundation/runtime/math/Vector2";
export class Line2 extends Curve2 {
distanceSq(): number;
distance(): number;
center(target?: Vector2): Vector2;
direction(target?: Vector2): Vector2;
equals(line: Line2): boolean;
nearlyEquals(value: Line2, tolerance?: number): boolean;
isPointInLine(point: Vector2, tolerance?: number): boolean;
isPointInLineSegment(point: Value2, tolerance?: number): boolean;
isCollinearPointInSegment(point: Vector2): boolean;
closestDistance(point: Vector2): number;
getSegmentLengthSquared(): number;
getSegmentLength(): number;
getInterpolatedPoint(rate: number, target?: Vector2): Vector2;
reverse(target?: Line2): Line2;
getClosestLinearInterpolation(point: Value2): number;
getClosestSegmentPoint(point: Value2, target?: Vector2): Vector2;
getClosestPoint(point: Value2, target?: Vector2): Vector2;
getPointByDistanceToFrom(distance: number): Vector2;
extendFrom(len: number): void;
extendTo(len: number): void;
clone(): Line2;
static from(value1?: any, value2?: any, value3?: any, value4?: any): Line2;
static fromPoint(from: Value2, to: Value2): Line2;
static fromValue(x1: number, y1: number, x2: number, y2: number): Line2;
static fromPointLengthRotation(from: Value2, length: number, angle: number): Line2;
}
}
declare module "foundation/runtime/math/Rect" {
import { IFreeable } from 'cross/runtime/lang/IFreeable';
export class Rect implements IFreeable {
left: number;
top: number;
width: number;
height: number;
right: number;
bottom: number;
constructor(left?: number, top?: number, width?: number, height?: number);
assign(value: Rect): void;
set(left: number, top: number, width: number, height: number): Rect;
clone(): void;
free(): void;
dispose(): void;
static intersection(a: any, b: any): Rect;
static intersects(a: Rect, b: Rect): boolean;
}
}
declare module "foundation/runtime/math/MathUtil" {
import { Rect } from "foundation/runtime/math/Rect";
import { Value2 } from "foundation/runtime/math/Value2";
export class MathUtil {
static EPSILON: number;
static PRECISION: number;
static TOLERANCE: number;
static LERP_TOLERANCE: number;
static RAD_PRECISION: number;
static RAD_TOLERANCE: number;
static AREA_PRECISION: number;
static AREA_TOLERANCE: number;
static ANGLE_TOLERANCE: number;
static PI: number;
static PI2: number;
static PI_2: number;
static PI_2P: number;
static PI_4: number;
static PI_8: number;
static PI_P360: number;
static PI_P270: number;
static PI_P180: number;
static PI_P90: number;
static PI_0: number;
static PI_N90: number;
static PI_N180: number;
static PI_N270: number;
static PI_N360: number;
static DEG2RAD: number;
static RAD2DEG: number;
static RADIAN_RATE: number;
static DEGREE_RATE: number;
static VALUE_1: Array;
static VALUE_2: Array;
static VALUE_3: Array;
static VALUE_4: Array;
static VALUE_9: Array;
static VALUE_12: Array;
static VALUE_16: Array;
static isEpsilon(value: number): boolean;
static isZero(value: number, tolerance?: number): boolean;
static isNotZero(value: number, tolerance?: number): boolean;
static isPowerOfTwo(value: number): boolean;
static nearlyEquals(value1: number, value2: number, tolerance?: number): boolean;
static nearlyLess(value1: number, value2: number, tolerance?: number): boolean;
static nearlyLessEquals(value1: number, value2: number, tolerance?: number): boolean;
static nearlyGreater(value1: number, value2: number, tolerance?: number): boolean;
static nearlyGreaterEquals(value1: number, value2: number, tolerance?: number): boolean;
static nearlyEqualAngles(value1: number, value2: number, tolerance?: number): boolean;
static nearlyEqualRadians(value1: number, value2: number, tolerance?: number): boolean;
static absSubAngels(value1: number, value2: number): number;
static toFixed(target: number, fractionDigits: number): number;
static getPerpendicularIntersect(point: Value2, start: Value2, end: Value2): Value2;
static nearestPowerOfTwo(value: number): number;
static nextPowerOfTwo(value: number): number;
static min(p1?: any, p2?: any, p3?: any, p4?: any, p5?: any, p6?: any): number;
static max(p1?: any, p2?: any, p3?: any, p4?: any, p5?: any, p6?: any): number;
static sign(value: number): number;
static degToRad(angle: number): number;
static radToDeg(rad: number): number;
static lerp(a: number, b: number, rate: number): number;
static rate(a: number, b: number, number: number): number;
static clamp(value: number, min: number, max: number): number;
static isOverlap(min: number, max: number, start: number, end: number): boolean;
static makeGuid(): string;
static makeUuid(): string;
static getAngle360(value: number): number;
static toRadInPI(value: number): number;
static euclideanModulo(n: number, m: number): number;
static mapLinear(x: number, a1: number, a2: number, b1: number, b2: number): number;
static smoothstep(x: number, min: number, max: number): number;
static smootherstep(x: number, min: number, max: number): number;
static random16(): number;
static randInt(low: number, high: number): number;
static randFloat(low: number, high: number): number;
static randFloatSpread(range: number): number;
static roundDecimal(num: number, digit?: number): number;
static isAllInRect(rect: Rect, points: Array): boolean;
static isAllOutRect(rect: Rect, points: Array): boolean;
static triangleThirdEdge(b: number, c: number, A: number): number;
static triangleThirdEdge2(a: number, b: number, A: number): number;
static numsAverage(nums: Array): number;
static numsVariance(nums: Array): number;
static isAngleOrthogonal(angle: number, tolerance?: number): boolean;
static numberSorter(a: number, b: number): number;
static factorial(n: number): number;
static isTwoRangeOverLap(rangeStart1: number, rangeEnd1: number, rangeStart2: number, rangeEnd2: number, tolerance?: number): boolean;
static numberInRange(rangeStart: number, rangeEnd: number, x: number, tolerance?: number): boolean;
static certainLess(value1: number, value2: number, tolerance?: number): boolean;
static certainGreater(value1: number, value2: number, tolerance?: number): boolean;
static sortf(a: number, b: number): number;
}
}
declare module "foundation/runtime/math/Value3" {
import { Value2 } from "foundation/runtime/math/Value2";
export interface Value3 extends Value2 {
z: number;
}
}
declare module "foundation/runtime/math/MatrixMN" {
import { IFreeable } from 'cross/runtime/lang/IFreeable';
import { FloatArrayType } from 'cross/runtime/lang/NumberUtil';
import { VectorN } from "foundation/runtime/math/VectorN";
export class MatrixMN implements IFreeable {
elements: Array>;
constructor(m?: number, n?: number);
get m(): number;
get n(): number;
get isSquare(): boolean;
getRow(i: number): VectorN;
getRows(): Array;
getCol(j: number): VectorN;
getCols(): Array;
setRow(i: number, v: VectorN): void;
setCol(j: number, v: VectorN): void;
swapRow(i: number, j: number): void;
swapCol(i: number, j: number): void;
set(n1?: any, n2?: any, ...nn: any[]): MatrixMN;
free(): void;
dispose(): void;
isZero(): boolean;
zero(): MatrixMN;
equalsData(data: Array>): boolean;
equals(matrix: MatrixMN): boolean;
assignData(data: FloatArrayType): MatrixMN;
assign(matrix: MatrixMN): MatrixMN;
leftMultiplyMatrixMN(right: MatrixMN): MatrixMN;
rightMultiplyMatrixMN(left: MatrixMN): MatrixMN;
transpose(): MatrixMN;
getTranspose(): MatrixMN;
clone(): MatrixMN;
push(value: Array): MatrixMN;
static multiplyMatrix(left: MatrixMN, right: MatrixMN): MatrixMN;
}
}
declare module "foundation/runtime/math/Permutations" {
import { IFreeable } from 'cross/runtime/lang/IFreeable';
export class Permutations implements IFreeable {
private _sequence;
private _direction;
private _n;
private _kt;
private _z;
private _index;
constructor(z?: number);
init(): void;
get n(): number;
private get z();
get kt(): number;
next(): boolean;
private fandCanMoveMax;
private invertDirection;
private isCanMove;
get sequence(): Array;
free(): void;
dispose(): void;
inversion(): number;
static test(): void;
}
}
declare module "foundation/runtime/math/MatrixN" {
import { MatrixMN } from "foundation/runtime/math/MatrixMN";
export class MatrixN extends MatrixMN {
constructor(n?: number, isIdentity?: boolean);
dispose(): void;
isIdentity(): boolean;
identity(): MatrixN;
determinant(): number;
algebraicCofactor(i: number, j: number): number;
adjonint(): MatrixN;
invert(): boolean;
getInvert(): MatrixN;
clone(): MatrixN;
static test(): void;
}
}
declare module "foundation/runtime/math/Value4" {
import { Value3 } from "foundation/runtime/math/Value3";
export interface Value4 extends Value3 {
w: number;
}
}
declare module "foundation/runtime/math/Vector4" {
import { DataStream } from 'cross/runtime/lang/stream/DataStream';
import { DataTypeEnum } from 'cross/runtime/lang/DataTypeEnum';
import { IFreeable } from 'cross/runtime/lang/IFreeable';
import { Value4 } from "foundation/runtime/math/Value4";
import { VectorN } from "foundation/runtime/math/VectorN";
export class Vector4 implements Value4, IFreeable {
x: number;
y: number;
z: number;
w: number;
constructor(x?: number, y?: number, z?: number, w?: number);
isValid(): boolean;
isEmpty(): boolean;
equals(value: Value4): boolean;
equalsValue(x: number, y: number, z: number, w: number): boolean;
nearlyEquals(value: Vector4, tolerance?: number): boolean;
nearlyEqualsDistance(value: Value4, tolerance?: number): boolean;
nearlyEqualsValue(x: number, y: number, z: number, w: number, tolerance?: number): boolean;
setX(x: number): Vector4;
setY(y: number): Vector4;
setZ(z: number): Vector4;
setW(w: number): Vector4;
set(x: number, y: number, z: number, w: number): Vector4;
setScalar(value: number): Vector4;
getComponent(index: number): number;
setComponent(index: number, value: number): void;
assign(value: Value4): Vector4;
copy(value: Value4): Value4;
addScalar(scalar: number): Vector4;
add(value: Value4): Vector4;
addValue(x: number, y: number, z: number, w: number): Vector4;
addScaledVector(value: Value4, scale: number): Vector4;
addVectors(value1: Value4, value2: Value4): Vector4;
subScalar(value: number): Vector4;
sub(value: Value4): Vector4;
subValue(x: number, y: number, z: number, w: number): Vector4;
subVectors(value1: Value4, value2: Value4): Vector4;
multiplyScalar(value: number): Vector4;
multiply(value: Vector4): Vector4;
multiplyValue(x: number, y: number, z: number, w: number): Vector4;
multiplyVectors(value1: Vector4, value2: Vector4): Vector4;
divideScalar(value: number): Vector4;
divide(value: Vector4): Vector4;
divideValue(x: number, y: number, z: number, w: number): Vector4;
length(): number;
lengthSq(): number;
lengthSquared(): number;
lengthManhattan(): number;
setLength(length: number): Vector4;
normalize(): Vector4;
negate(): Vector4;
floor(): Vector4;
ceil(): Vector4;
round(): Vector4;
roundToZero(): Vector4;
min(value: Value4): Vector4;
max(value: Value4): Vector4;
clamp(min: Value4, max: Value4): Vector4;
clampScalar(min: number, max: number): Vector4;
dot(value: Value4): number;
lerp(value: Value4, rate: number): Vector4;
lerpVectors(value1: Value4, value2: Value4, rate: number): Vector4;
fromArray(array: Array, offset?: number): Vector4;
toArray(array?: Array, offset?: number): Array;
serialize(output: DataStream, dataCd?: DataTypeEnum): Vector4;
unserialize(input: DataStream, dataCd?: DataTypeEnum): Vector4;
parse(value: string): Vector4;
format(precision?: number): string;
toString(): string;
free(): void;
clone(): any;
dispose(): void;
static from(value1?: any, value2?: any, value3?: any, value4?: any): Vector4;
static addVectors(value1: Vector4, value2: Vector4): Vector4;
static subVectors(value1: Vector4, value2: Vector4): Vector4;
static direction(point1: Vector4, point2: Vector4): Vector4;
static distance(point1: Value4, point2: Value4): number;
applyMatrix4(m: any): Vector4;
setAxisAngleFromQuaternion(q: any): Vector4;
setAxisAngleFromRotationMatrix(m: any): Vector4;
toVectorN(): VectorN;
}
}
declare module "foundation/runtime/math/VectorN" {
import { IFreeable } from 'cross/runtime/lang/IFreeable';
import { MatrixN } from "foundation/runtime/math/MatrixN";
import { Vector2 } from "foundation/runtime/math/Vector2";
import { Vector3 } from "foundation/runtime/math/Vector3";
import { Vector4 } from "foundation/runtime/math/Vector4";
export class VectorN implements IFreeable {
elements: Array;
constructor(n?: number);
get n(): number;
isValid(): boolean;
isEmpty(): boolean;
isZero(tolerance?: number): boolean;
isNearNormal(tolerance?: number): boolean;
equals(value: VectorN): boolean;
nearlyEquals(value: VectorN, tolerance?: number): boolean;
nearlyEqualsDistance(value: VectorN, tolerance?: number): boolean;
equalsNegative(value: VectorN): boolean;
nearlyEqualsNegative(value: VectorN, tolerance?: number): boolean;
push(value: number): VectorN;
set(n1?: any, n2?: any, ...nn: any[]): VectorN;
setV(v: number, index: number): VectorN;
getComponent(index: number): number;
setComponent(index: number, value: number): void;
assign(value: Vector2 | Vector3 | Vector4 | VectorN): VectorN;
addScalar(scalar: number): VectorN;
add(value: VectorN): VectorN;
addValue(n1?: any, n2?: any, ...nn: any[]): VectorN;
addTo(value: VectorN, ref?: VectorN): VectorN;
addScaledVector(value: VectorN, scale: number): VectorN;
addVectors(value1: VectorN, value2: VectorN): VectorN;
subScalar(value: number): VectorN;
sub(value: VectorN): VectorN;
subTo(value: VectorN, ref?: VectorN): VectorN;
subVectors(value1: VectorN, value2: VectorN): VectorN;
multiplyScalar(value: number): VectorN;
multiply(value: VectorN): VectorN;
multiplyVectors(value1: VectorN, value2: VectorN): VectorN;
divideScalar(value: number): VectorN;
divide(value: VectorN): VectorN;
length(): number;
lengthSq(): number;
lengthManhattan(): number;
setLength(length: number): VectorN;
normalize(): VectorN;
negate(): VectorN;
floor(): VectorN;
ceil(): VectorN;
round(precision?: number): VectorN;
trunc(precision?: number): VectorN;
roundToZero(): VectorN;
distanceTo(value: VectorN): number;
static distance(value1: VectorN, value2: VectorN): number;
distanceToSquared(value: VectorN): number;
static distanceSquared(value1: VectorN, value2: VectorN): number;
setMin(): void;
min(value: VectorN): VectorN;
setMax(): void;
max(value: VectorN): VectorN;
clamp(min: VectorN, max: VectorN): VectorN;
clampScalar(min: number, max: number): VectorN;
clampLength(min: number, max: number): VectorN;
dot(value: VectorN): number;
lerp(value: VectorN, rate: number): VectorN;
lerpVectors(value1: VectorN, value2: VectorN, rate: number): VectorN;
projectOnVector(value: VectorN, target?: VectorN): VectorN;
applyMatrixN(matrix: MatrixN): VectorN;
rightMultiplyMatrixN(matrix: MatrixN): VectorN;
leftMultiplyMatrixN(matrix: MatrixN): VectorN;
fromArray(array: Array, offset?: number): VectorN;
toArray(array?: Array, offset?: number): Array;
free(): VectorN;
clone(): VectorN;
reset(): VectorN;
dispose(): void;
toVector2(): Vector2;
toVector3(): Vector3;
toVector4(): Vector4;
static rep(num: number, value: number): Array;
static zeros1d(rows: number): Array;
static zeros2d(rows: number, cols: number): Array>;
static zeros3d(rows: number, cols: number, depth: number): Array>>;
}
}
declare module "foundation/runtime/math/Vector3" {
import { IInputStream } from 'cross/runtime/lang/stream/IInputStream';
import { IOutputStream } from 'cross/runtime/lang/stream/IOutputStream';
import { DataTypeEnum } from 'cross/runtime/lang/DataTypeEnum';
import { IFreeable } from 'cross/runtime/lang/IFreeable';
import { Euler } from "foundation/runtime/math/Euler";
import { Matrix3 } from "foundation/runtime/math/Matrix3";
import { Matrix4 } from "foundation/runtime/math/Matrix4";
import { Quaternion } from "foundation/runtime/math/Quaternion";
import { Value2 } from "foundation/runtime/math/Value2";
import { Value3 } from "foundation/runtime/math/Value3";
import { Vector2 } from "foundation/runtime/math/Vector2";
import { VectorN } from "foundation/runtime/math/VectorN";
export class Vector3 implements Value3, IFreeable {
x: number;
y: number;
z: number;
constructor(x?: number, y?: number, z?: number);
get X(): number;
get Y(): number;
get Z(): number;
isValid(): boolean;
isEmpty(): boolean;
isZero(tolerance?: number): boolean;
isNearNormal(tolerance?: number): boolean;
equals(value: Value3): boolean;
nearlyEquals(value: Value3, tolerance?: number): boolean;
nearlyEqualsDistance(value: Value3, tolerance?: number): boolean;
equalsNegative(value: Value3): boolean;
nearlyEqualsNegative(value: Value3, tolerance?: number): boolean;
nearlyEqualsDirection(value: Value3, tolerance?: number): boolean;
equalsValue(x: number, y: number, z: number): boolean;
nearlyEqualsValue(x: number, y: number, z: number, tolerance?: number): boolean;
setX(x: number): Vector3;
setY(y: number): Vector3;
setZ(z: number): Vector3;
set(x?: number, y?: number, z?: number): Vector3;
setO(x: number, y: number, z: number): Vector3;
setValue2(value: Value2): Vector3;
setScalar(value: number): Vector3;
getComponent(index: number): number;
setComponent(index: number, value: number): void;
assign(value: Value2 | Value3): Vector3;
to2d(): Vector3;
toVector2(): Vector2;
copy(value: Value3): Vector3;
copyTo(value: Value3): Vector3;
addScalar(scalar: number): Vector3;
add(value: Value3): Vector3;
addValue(x: number, y: number, z: number): Vector3;
addTo(value: Value3, ref?: Vector3): Vector3;
addValueTo(x: number, y: number, z: number, ref?: Vector3): Vector3;
addScaledVector(value: Value3, scale: number): Vector3;
addVectors(value1: Value3, value2: Value3): Vector3;
subScalar(value: number): Vector3;
sub(value: Value3): Vector3;
subValue(x: number, y: number, z: number): Vector3;
subTo(value: Value3, ref?: Vector3): Vector3;
subValueTo(x: number, y: number, z: number, ref?: Vector3): Vector3;
subVectors(value1: Value3, value2: Value3): Vector3;
multiplyScalar(value: number): Vector3;
multiply(value: Value3): Vector3;
multiplyValue(x: number, y: number, z: number): Vector3;
multiplyVectors(value1: Value3, value2: Value3): Vector3;
divideScalar(value: number): Vector3;
divide(value: Value3): Vector3;
divideValue(x: number, y: number, z: number): Vector3;
length(): number;
lengthSq(): number;
lengthSquared(): number;
lengthManhattan(): number;
setLength(length: number): Vector3;
normalize(): Vector3;
normalize2(): Vector3;
normalizeFromLength(length: number): Vector3;
negate(): Vector3;
floor(): Vector3;
ceil(): Vector3;
round(precision?: number): Vector3;
trunc(precision?: number): Vector3;
roundToZero(): Vector3;
angleTo(point: Vector3): number;
distanceTo(point: Value3): number;
distanceToSquared(point: Value3): number;
setMin(): void;
min(value: Value3): Vector3;
minValue(x: number, y: number, z: number): Vector3;
setMax(): void;
max(value: Value3): Vector3;
maxValue(x: number, y: number, z: number): Vector3;
clamp(min: Value3, max: Value3): Vector3;
clampScalar(min: number, max: number): Vector3;
clampLength(min: any, max: any): Vector3;
dot(value: Value3): number;
cross(value: Value3): Vector3;
crossVectors(left: Value3, right: Value3): Vector3;
crossVector(value: Vector3): Vector3;
angleNormal(value: Vector3, normal?: Vector3): number;
angle(value: Vector3): number;
angleDeg(value: Vector3, refVec: Vector3): number;
lerp(value: Value3, rate: number): Vector3;
lerpVectors(value1: Value3, value2: Value3, rate: number): Vector3;
projectOnVector(value: Vector3, target?: Vector3): Vector3;
applyQuaternion(quaternion: Quaternion): Vector3;
applyEuler(euler: Euler): Vector3;
applyAxisAngle(axis: Value3, angle: any): Vector3;
applyMatrix3(matrix: Matrix3): Vector3;
applyMatrix4(matrix: Matrix4): Vector3;
applyMatrix4NoTranslate(matrix: Matrix4): Vector3;
applyProjection(matrix: Matrix4): Vector3;
flipX(): Vector3;
flipY(): Vector3;
flipZ(): Vector3;
fromArray(array: Array, offset?: number): Vector3;
toArray(array?: Array, offset?: number): Array;
serialize(output: IOutputStream, dataCd?: DataTypeEnum): Vector3;
unserialize(input: IInputStream, dataCd?: DataTypeEnum): Vector3;
parse(value: string): Vector3;
format(precision?: number): string;
toString(): string;
free(): Vector3;
clone(type?: Function): Vector3;
reset(): Vector3;
dispose(): void;
static Zero: Vector3;
static Origin: Vector3;
static AxisX: Vector3;
static AxisNX: Vector3;
static AxisY: Vector3;
static AxisNY: Vector3;
static AxisZ: Vector3;
static AxisNZ: Vector3;
static Unit: Vector3;
static from(value1?: any, value2?: any, value3?: any): Vector3;
static fromValue2(value: Value2, z?: number): Vector3;
static fromUvw(u: string, x: number, v: string, y: number, w: string, z: number): Vector3;
static equals(value1: Value3, value2: Value3): boolean;
static equalsValue(value: Value3, x: number, y: number, z: number): boolean;
static nearlyEquals(value1: Value3, value2: Value3, tolerance?: number): boolean;
static equalsNegative(value1: Value3, value2: Value3): boolean;
static nearlyEqualsNegative(value1: Value3, value2: Value3, tolerance?: number): boolean;
static add(value1: Value3, value2: Value3, target?: Vector3): Vector3;
static addVectors(value1: Value3, value2: Value3): Vector3;
static sub(value1: Value3, value2: Value3, target?: Vector3): Vector3;
static subVectors(value1: Value3, value2: Value3, value3?: Value3): Vector3;
static distance(point1: Value3, point2: Value3): number;
static distanceValue(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): number;
static direction(start: Vector3, end: Vector3): Vector3;
static middle(point1: Value3, point2: Value3): Vector3;
static dotVectors(left: Value3, right: Value3): number;
static crossVectors(left: Vector3, right: Vector3, target?: Vector3): Vector3;
static contains(points: Array, point: Vector3): boolean;
static nearlyContains(points: Array, point: Vector3, tolerance?: number): boolean;
static indexOf(points: Array, point: Vector3): number;
static nearlyIndexOf(points: Array, point: Vector3, tolerance?: number): number;
static unique(points: Array, tolerance?: number): Array;
static parse(value: string): Vector3;
project(camera: any): Vector3;
unproject(camera: any): Vector3;
transformDirection(m: any): Vector3;
projectOnPlane(planeNormal: any): Vector3;
reflect(normal: any): Vector3;
setFromSpherical(s: any): Vector3;
setFromMatrixPosition(m: any): Vector3;
setFromMatrixScale(m: any): Vector3;
setFromMatrixColumn(m: any, index: any): Vector3;
static intersectFace4(line: Array, face: Array, target?: Vector3): Vector3;
toVectorN(): VectorN;
}
}
declare module "foundation/runtime/math/MatrixUtil" {
import { Matrix4 } from "foundation/runtime/math/Matrix4";
import { Vector3 } from "foundation/runtime/math/Vector3";
export class MatrixUtil {
static Matrix4x3_BYTE_SIZE: number;
static Matrix4x3_FLOAT_SIZE: number;
static Matrix4_BYTE_SIZE: number;
static Matrix4_FLOAT_SIZE: number;
static Identity3: number[];
static Identity4: number[];
static Value16: Array;
protected static _cache: any;
static identity3(elements: Array): void;
static identity4(elements: Array): void;
static perspectiveLH(matrix: Matrix4, width: number, height: number, znear: number, zfar: number): void;
static perspectiveRH(matrix: Matrix4, width: number, height: number, znear: number, zfar: number): void;
static perspectiveFieldOfViewLH(matrix: Matrix4, fov: number, aspect: number, znear: number, zfar: number, isVerticalFovFixed?: boolean): void;
static perspectiveFieldOfViewRH(matrix: Matrix4, fieldOfView: number, aspectRatio: number, znear: number, zfar: number): void;
static orthoLH(matrix: Matrix4, left: number, top: number, width: number, height: number, znear: number, zfar: number): void;
static orthoRH(matrix: Matrix4, left: number, top: number, width: number, height: number, znear: number, zfar: number): void;
static lookAtLH(matrix: Matrix4, eye: Vector3, target: Vector3, up: Vector3): void;
protected static getCache(code: string): Matrix4;
static rotationX(rad: number): Matrix4;
static rotationY(rad: number): Matrix4;
static rotationZ(rad: number): Matrix4;
static transform(matrix: Matrix4, point: Vector3, matrixT: Matrix4): Vector3;
}
}
declare module "foundation/runtime/math/Matrix3" {
import { DataStream } from 'cross/runtime/lang/stream/DataStream';
import { ArrayClass } from 'cross/runtime/lang/ArrayUtil';
import { DataTypeEnum } from 'cross/runtime/lang/DataTypeEnum';
import { IFreeable } from 'cross/runtime/lang/IFreeable';
import { Matrix4 } from "foundation/runtime/math/Matrix4";
export class Matrix3 implements IFreeable {
static BYTE_SIZE: number;
static FLOAT_SIZE: number;
elements: Array;
constructor(isIdentity?: boolean);
isIdentity(): boolean;
identity(): Matrix3;
equalsData(data: Array): boolean;
equals(matrix: Matrix3): boolean;
assignData(data: ArrayClass): Matrix3;
assign(matrix: Matrix3): Matrix3;
append(matrix: Matrix3): Matrix3;
set(n11: number, n12: number, n13: number, n21: number, n22: number, n23: number, n31: number, n32: number, n33: number): Matrix3;
setMatrix4(matrix: Matrix4): Matrix3;
addRotationX(rad: number, tolerance?: number): Matrix3;
addRotationAngleX(angle: number, tolerance?: number): Matrix3;
addRotationY(rad: number, tolerance?: number): Matrix3;
addRotationAngleY(angle: number, tolerance?: number): Matrix3;
addRotationZ(rad: number, tolerance?: number): Matrix3;
addRotationAngleZ(angle: number, tolerance?: number): Matrix3;
multiplyScalar(scalar: number): Matrix3;
transpose(): Matrix3;
invert(): boolean;
fromArray(array: Array, offset?: number): Matrix3;
toArray(array?: Array, offset?: number): Array;
clone(): Matrix3;
toString(): string;
free(): void;
dispose(): void;
static appendData(left: ArrayClass, right: ArrayClass, result: ArrayClass): void;
static buildRotationXData(rad: number, data: Array): void;
static buildRotationX(rad: number, target?: Matrix3): Matrix3;
static buildRotationYData(rad: number, data: Array): void;
static buildRotationY(rad: number, target?: Matrix3): Matrix3;
static buildRotationZData(rad: number, data: Array): void;
static buildRotationZ(rad: number, target?: Matrix3): Matrix3;
static transposeData(source: ArrayClass, target: ArrayClass): void;
static invertData(source: ArrayClass, target: ArrayClass): boolean;
static invert(source: Matrix3, target: Matrix3): boolean;
serialize(output: DataStream, dataCd?: DataTypeEnum): Matrix3;
unserialize(input: DataStream, dataCd?: DataTypeEnum): Matrix3;
}
}
declare module "foundation/runtime/math/Quaternion" {
import { IInputStream } from 'cross/runtime/lang/stream/IInputStream';
import { IOutputStream } from 'cross/runtime/lang/stream/IOutputStream';
import { DataTypeEnum } from 'cross/runtime/lang/DataTypeEnum';
import { Euler } from "foundation/runtime/math/Euler";
import { Matrix3 } from "foundation/runtime/math/Matrix3";
import { Matrix4 } from "foundation/runtime/math/Matrix4";
import { Value3 } from "foundation/runtime/math/Value3";
import { Value4 } from "foundation/runtime/math/Value4";
import { Vector3 } from "foundation/runtime/math/Vector3";
export class Quaternion implements Value4 {
x: number;
y: number;
z: number;
w: number;
constructor(x?: number, y?: number, z?: number, w?: number);
isIdentity(): boolean;
identity(): Quaternion;
equals(quaternion: Value4): boolean;
lengthSq(): number;
length(): number;
assign(value: Value4): Quaternion;
set(x: number, y: number, z: number, w: number): Quaternion;
setFromAxisAngle(axis: Value3, angle: number): Quaternion;
setFromEuler(euler: Euler): Quaternion;
setMatrixValue(m11: number, m12: number, m13: number, m21: number, m22: number, m23: number, m31: number, m32: number, m33: number): Quaternion;
setMatrix3(matrix: Matrix3): Quaternion;
setMatrix4(matrix: Matrix4): Quaternion;
premultiply(quaternion: Quaternion): Quaternion;
multiply(quaternion: Quaternion): Quaternion;
multiplyValue4(value: Value4): Quaternion;
normalize(): Quaternion;
conjugate(): Quaternion;
inverse(): Quaternion;
dot(value: Value4): number;
copyTo(value: Value4): Quaternion;
copy(value: Value4): Quaternion;
fromArray(array: Array, offset?: number): Quaternion;
toArray(array?: Array, offset?: number): Array;
serialize(output: IOutputStream, dataCd?: DataTypeEnum): void;
unserialize(input: IInputStream, dataCd?: DataTypeEnum): void;
clone(): Quaternion;
toString(): string;
free(): void;
static dot(left: Value4, right: Value4): number;
static multiply(left: Value4, right: Value4, target?: Quaternion): Quaternion;
static buildRotationYawPitchRoll(yaw: number, pitch: number, roll: number, target?: Quaternion): Quaternion;
setFromUnitVectors(from: Vector3, to: Vector3): Quaternion;
toEuler(): Vector3;
}
}
declare module "foundation/runtime/math/Euler" {
import { Matrix4 } from "foundation/runtime/math/Matrix4";
import { Quaternion } from "foundation/runtime/math/Quaternion";
import { Value3 } from "foundation/runtime/math/Value3";
import { Vector3 } from "foundation/runtime/math/Vector3";
export class Euler {
static RotationOrders: string[];
static DefaultOrder: string;
x: number;
y: number;
z: number;
order: string;
constructor(x?: number, y?: number, z?: number, order?: string);
equals(euler: Euler): boolean;
assign(value: Euler): Euler;
set(x: number, y: number, z: number, order?: string): Euler;
setQuaternion(quaternion: Quaternion, order?: string): Euler;
setMatrix4(matrix: Matrix4, order: string): Euler;
copyTo(value: Value3): Euler;
copy(value: Value3): Euler;
fromArray(array: Array, offset?: number): Euler;
toArray(array?: Array, offset?: number): Array;
clone(): Euler;
toString(): string;
toAngleString(): string;
toAngle(): Vector3;
free(): void;
}
}
declare module "foundation/runtime/math/Polynomial" {
export class Term {
coefficient: any;
powers: Array;
constructor(coefficient?: number, n?: number, powers?: Array);
isZero(): boolean;
get n(): number;
get coefficientNumber(): number;
set n(value: number);
insert(n: number): void;
get degree(): number;
clone(): Term;
negate(): Term;
isCongeners(value: Term): boolean;
add(value: Term): Term | Polynomial;
sub(value: Term): Term | Polynomial;
mul(value: Term): Term;
div(value: Term): Term;
derivate(n: number, r: number): Term;
mixedDerivate(): Term;
}
export class Polynomial {
private _terms;
private _n;
constructor(n?: number);
get degree(): number;
isZero(): boolean;
get n(): number;
set n(value: number);
get terms(): Array;
assign(value: Polynomial): Polynomial;
sort: (a: Term, b: Term) => number;
simplify(): Polynomial;
clearZero(): Polynomial;
addTerm(value: Term): Polynomial;
clone(): Polynomial;
negate(): Polynomial;
add(value: Polynomial): Polynomial;
sub(value: Polynomial): Polynomial;
mul(value: Polynomial): Polynomial;
div(value: Polynomial, remainder?: Polynomial): Polynomial;
addNumber(value: number): Polynomial;
subNumber(value: number): Polynomial;
mulNumber(value: number): Polynomial;
divNumber(value: number): Polynomial;
mulTrem(value: Term): Polynomial;
derivate(n: number, r: number): Polynomial;
mixedDerivate(): Polynomial;
variableInto(n: number, value: number): Polynomial;
getCoefficientPolynomial(n: number): Array<{
cp: Polynomial;
power: number;
}>;
}
}
declare module "foundation/runtime/math/Matrix4" {
import { DataStream } from 'cross/runtime/lang/stream/DataStream';
import { DataTypeEnum } from 'cross/runtime/lang/DataTypeEnum';
import { IFreeable } from 'cross/runtime/lang/IFreeable';
import { FloatArrayType, NumberArrayType } from 'cross/runtime/lang/NumberUtil';
import { Matrix3 } from "foundation/runtime/math/Matrix3";
import { Polynomial } from "foundation/runtime/math/Polynomial";
import { Quaternion } from "foundation/runtime/math/Quaternion";
import { Value3 } from "foundation/runtime/math/Value3";
import { Value4 } from "foundation/runtime/math/Value4";
import { Vector3 } from "foundation/runtime/math/Vector3";
import { Vector4 } from "foundation/runtime/math/Vector4";
export class Matrix4 implements IFreeable {
static BYTE_SIZE: number;
static FLOAT_SIZE: number;
elements: Array;
constructor(isIdentity?: boolean);
isZero(): boolean;
makeAxixConvertMatrix(xAxis: Value3, yAxis: Value3, zAxis: Value3, translate: Value3): Matrix4;
zero(): Matrix4;
isIdentity(): boolean;
identity(): Matrix4;
equalsData(data: Array): boolean;
equals(matrix: Matrix4): boolean;
nearlyEquals(matrix: Matrix4, tolerance?: number): boolean;
getMaxScaleOnAxis(): number;
set(n11: number, n12: number, n13: number, n14: number, n21: number, n22: number, n23: number, n24: number, n31: number, n32: number, n33: number, n34: number, n41: number, n42: number, n43: number, n44: number): Matrix4;
assignData(data: FloatArrayType): Matrix4;
assign(matrix: Matrix4): Matrix4;
copy(matrix: Matrix4): Matrix4;
append(matrix: Matrix4): Matrix4;
addTranslate(x: number, y: number, z: number): Matrix4;
addRotationX(rad: number, tolerance?: number): Matrix4;
addRotationAngleX(angle: number, tolerance?: number): Matrix4;
addRotationY(rad: number, tolerance?: number): Matrix4;
addRotationAngleY(angle: number, tolerance?: number): Matrix4;
addRotationZ(rad: number, tolerance?: number): Matrix4;
addRotationAngleZ(angle: number, tolerance?: number): Matrix4;
addRotation(x: number, y: number, z: number, tolerance?: number): Matrix4;
addRotationQuaternion(quaternion: Quaternion): Matrix4;
addRotationAngle(angleX: number, angleY: number, angleZ: number, tolerance?: number): Matrix4;
addRotationAxis(axis: Vector3, rad: number, tolerance?: number): Matrix4;
addScale(x: number, y: number, z: number): Matrix4;
addScaleAll(scale: number): Matrix4;
multiplyScalar(scalar: number): Matrix4;
getTranslation(target?: Vector3): Vector3;
setTranslation(x: number, y: number, z: number): Matrix4;
setRotationX(rad: number): Matrix4;
setRotationY(rad: number): Matrix4;
setRotationZ(rad: number): Matrix4;
setQuaternion(quaternion: Quaternion): Matrix4;
setScale(x: number, y: number, z: number): Matrix4;
setMatrix3(matrix: Matrix3, tx: number, ty: number, tz: number): void;
makeBasis(xAxis: Value3, yAxis: Value3, zAxis: Value3): Matrix4;
makeTranslation(x: number, y: number, z: number): Matrix4;
makeScale(x: number, y: number, z: number): Matrix4;
transform(value: Value3, target?: Vector3): Vector3;
transformCoordinate(value: Value3, target?: Vector3): Vector3;
transform4(value: Value4, target?: Vector4): Vector4;
transformRotation(value: Value3, target?: Vector3): Vector3;
transformData(outputData: Array, outputIndex: number, inputData: Array, inputIndex: number, count: number): void;
applyToVector3Array(array: Array, offset?: number, length?: number, isNormalize?: boolean): Array;
applyRotationToVector3Array(array: Array, offset?: number, length?: number, isNormalize?: boolean): Array;
normalize(): boolean;
transpose(): Matrix4;
determinant(): number;
decompose(translation: Value3, rotation: Quaternion, scale: Value3): boolean;
decompose2(tMat: Matrix4, rMat: Matrix4, sMat: Matrix4): boolean;
invert(): boolean;
getInvert(target?: Matrix4): Matrix4;
getPolynomial(): Polynomial;
fromArray(array: Array, offset?: number): Matrix4;
toArray(array?: Array, offset?: number): Array;
clone(): Matrix4;
toString(): string;
free(): void;
dispose(): void;
static transposeData(source: FloatArrayType, target?: FloatArrayType): void;
static appendData(left: FloatArrayType, right: FloatArrayType, result: FloatArrayType): void;
static invertData(source: FloatArrayType, target: FloatArrayType): boolean;
static invert(source: Matrix4, target: Matrix4): boolean;
static buildTranslation(x: number, y: number, z: number, target?: Matrix4): Matrix4;
static buildRotationXData(rad: number, data: Array): void;
static buildRotationX(rad: number, target?: Matrix4): Matrix4;
static buildRotationYData(rad: number, data: Array): void;
static buildRotationY(rad: number, target?: Matrix4): Matrix4;
static buildRotationZData(rad: number, data: Array): void;
static buildRotationZ(rad: number, target?: Matrix4): Matrix4;
static buildRotationData(x: number, y: number, z: number, data: Array): void;
static buildScale(x: number, y: number, z: number, target?: Matrix4): Matrix4;
static buildQuaternion(quaternion: Quaternion, target?: Matrix4): Matrix4;
static alignCoordSys(fromOrigin: Vector3, fromXAxis: Vector3, fromYAxis: Vector3, fromZAxis: Vector3, toOrigin: Vector3, toXAxis: Vector3, toYAxis: Vector3, toZAxis: Vector3): Matrix4;
multiply(matrix: Matrix4): Matrix4;
multiplyMatrices(left: Matrix4, right: Matrix4): Matrix4;
writeData3(data: NumberArrayType, index?: number): Matrix4;
writeData4x3(data: NumberArrayType, index?: number): Matrix4;
writeData4x4(data: NumberArrayType, index?: number): Matrix4;
writeData(data: NumberArrayType, index: number): Matrix4;
serialize(output: DataStream, dataCd?: DataTypeEnum): Matrix4;
unserialize(input: DataStream, dataCd?: DataTypeEnum): Matrix4;
static getMatrixFromLineToLine(begin1: Value3, end1: Value3, begin2: Value3, end2: Value3, ref?: Matrix4): Matrix4;
static rotationFromAxis(v1: Vector3, v2: Vector3, v3: Vector3): Vector3;
static rotationFromAxisXYZ(v1: Vector3, v2: Vector3, v3: Vector3): Vector3;
static orthoOffCenterLHToRef(left: number, right: number, bottom: number, top: number, znear: number, zfar: number): Matrix4;
static transformRotation(fromXAxis: Vector3, fromYAxis: Vector3, fromZAxis: Vector3, toXAxis?: Vector3, toYAxis?: Vector3, toZAxis?: Vector3): Vector3;
lookAt(eye: Vector3, target: Vector3, up: Vector3): Matrix4;
}
}
declare module "foundation/runtime/math/Vector2" {
import { DataStream } from 'cross/runtime/lang/stream/DataStream';
import { DataTypeEnum } from 'cross/runtime/lang/DataTypeEnum';
import { IFreeable } from 'cross/runtime/lang/IFreeable';
import { Matrix4 } from "foundation/runtime/math/Matrix4";
import { Value2 } from "foundation/runtime/math/Value2";
import { Vector3 } from "foundation/runtime/math/Vector3";
import { VectorN } from "foundation/runtime/math/VectorN";
export class Vector2 implements Value2, IFreeable {
x: number;
y: number;
constructor(x?: number, y?: number);
get X(): number;
get Y(): number;
get width(): number;
set width(value: number);
get height(): number;
set height(value: number);
isValid(): boolean;
isEmpty(): boolean;
isZero(tolerance?: number): boolean;
equals(value: Value2): boolean;
static equalsNegative(value1: Value2, value2: Value2): boolean;
nearlyEquals(value: Value2, tolerance?: number): boolean;
nearlyEqualsDistance(value: Value2, tolerance?: number): boolean;
static nearlyEqualsNegative(value1: Value2, value2: Value2, tolerance?: number): boolean;
equalsValue(x: number, y: number): boolean;
nearlyEqualsValue(x: number, y: number, tolerance?: number): boolean;
setX(x: number): Vector2;
setY(y: number): Vector2;
set(x: number, y: number): Vector2;
setScalar(value: number): Vector2;
getComponent(index: number): number;
setComponent(index: number, value: number): void;
assign(value: Value2): Vector2;
copy(value: Value2): Vector2;
addScalar(value: number): Vector2;
add(value: Value2): Vector2;
addTo(value: Value2): Vector2;
addValue(x: number, y: number): Vector2;
addScaledVector(value: Value2, scale: number): Vector2;
addVectors(value1: Value2, value2: Value2): Vector2;
static addVector(value1: Value2, value2: Value2, ref?: Vector2): Vector2;
subScalar(value: number): Vector2;
sub(value: Value2): Vector2;
subValue(x: number, y: number): Vector2;
subTo(value: Value2): Vector2;
subVectors(value1: Value2, value2: Value2): Vector2;
static subVector(value1: Value2, value2: Value2, ref?: Vector2): Vector2;
multiplyScalar(value: number): Vector2;
static multiplyScalarVector(value2: Value2, value: number, ref?: Vector2): Vector2;
multiply(value: Value2): Vector2;
multiplyValue(x: number, y: number): Vector2;
multiplyVectors(value1: Value2, value2: Value2): Vector2;
divideScalar(value: number): Vector2;
divide(value: Value2): Vector2;
divideValue(x: number, y: number): Vector2;
angle(): number;
length(): number;
lengthSq(): number;
lengthSquared(): number;
lengthManhattan(): number;
abs(): Vector2;
setLength(length: number): Vector2;
distanceTo(value: Vector2): number;
distanceToSquared(value: Value2): number;
normalize(): Vector2;
negate(): Vector2;
floor(): Vector2;
ceil(): Vector2;
round(): Vector2;
roundToZero(): Vector2;
setMin(): Vector2;
min(value: Value2): void;
minValue(x: number, y: number): void;
setMax(): void;
max(value: Value2): void;
maxValue(x: number, y: number): void;
clamp(min: Value2, max: Value2): Vector2;
clampScalar(min: number, max: number): Vector2;
clampLength(min: number, max: number): Vector2;
dot(value: Value2): number;
lerp(value: Value2, rate: number): Vector2;
lerpVectors(value1: Vector2, value2: Vector2, rate: number): Vector2;
rotate(rad: number): Vector2;
rotateAngle(angle: number): Vector2;
rotateAround(center: Value2, rad: number): Vector2;
rotateAroundAngle(center: Value2, angle: number): Vector2;
to3d(): Vector3;
from(value1?: any, value2?: any): Vector2;
fromArray(array: Array, offset?: number): Vector2;
toArray(array?: Array, offset?: number): Array;
serialize(output: DataStream, dataCd?: DataTypeEnum): void;
unserialize(input: DataStream, dataCd?: DataTypeEnum): void;
parse(source: string): Vector2;
format(precision?: number): string;
toString(): string;
reset(): Vector2;
free(): void;
clone(type?: Function): Vector2;
dispose(): void;
static Origin: Vector2;
static AxisX: Vector2;
static AxisY: Vector2;
static AxisNX: Vector2;
static AxisNY: Vector2;
static from(value1?: any, value2?: any): Vector2;
static fromUv(u: string, x: number, v: string, y: number): Vector2;
static isZero(value: Value2, tolerance?: number): boolean;
static equals(value1: Value2, value2: Value2): boolean;
static nearlyEquals(value1: Value2, value2: Value2, tolerance?: number): boolean;
static constains(points: Array, point: Value2): boolean;
static nearlyConstains(points: Array, point: Value2, tolerance?: number): boolean;
static nearlyFind(points: Array, point: Value2, tolerance?: number): Value2;
static nearlyFilter(points: Array, point: Value2, tolerance?: number, targets?: Array): Array;
static nearlyFilterArray(values: Array, sources: Array, tolerance?: number, targets?: Array): Array;
static addVectors(value1: Value2, value2: Value2, target?: Vector2): Vector2;
static addArrayVector(array: Array, value: Value2): void;
static addArrayValue(array: Array, x: number, y: number): void;
static subVectors(value1: Value2, value2: Value2, target?: Vector2): Vector2;
static multiplyScalar(vectors: Value2 | Array, scale: number): void;
static multiply(vectors: Value2 | Array, value: Value2): void;
static dot(value1: Value2, value2: Value2): number;
static dotValue(x1: number, y1: number, x2: number, y2: number): number;
static distance(point1: Value2, point2: Value2): number;
static distanceValue(x1: number, y1: number, x2: number, y2: number): number;
static direction(point1: Value2, point2: Value2, target?: Vector2): Vector2;
static rotation(from: Value2, to: Value2): number;
static radianBetween(v1: Vector2, v2: Vector2): number;
static lengthSquared(x: number, y: number): number;
static lerp(value1: Value2, value2: Value2, rate: number): Vector2;
static rotate(point: Vector2, rad: number, target?: Vector2): Vector2;
static rotateAngle(point: Vector2, angle: number, target?: Vector2): Vector2;
static rotateAroundPoint(center: Value2, point: Value2, rad: number, target?: Vector2): Vector2;
static rotateAroundPointAngle(center: Value2, point: Value2, angle: number, target?: Vector2): Vector2;
static middle(point1: Value2, point2: Value2, target?: Vector2): Vector2;
projectOnVector(value: Vector2, target?: Vector2): Vector2;
static flipXConverter(point: Vector2, target?: Vector2): Vector2;
static flipYConverter(point: Vector2, target?: Vector2): Vector2;
static format(value: Value2, precision?: number): string;
static formatValue(x: number, y: number, precision?: number): string;
static clone(value: Value2): Vector2;
static cloneArray(array: Array, scaleX?: number, scaleY?: number): Array;
toVectorN(): VectorN;
applyMatrix4(matrix: Matrix4): Vector2;
}
}
declare module "foundation/runtime/math/Circle2" {
import { Vector2 } from "foundation/runtime/math/Vector2";
export class Circle2 {
center: Vector2;
radius: number;
constructor(center: Vector2, radius: number);
getArea(): number;
getPointByAngle(angle: number): Vector2;
static createCircle2WithRadiusAndDoublePoints(r: number, point1: Vector2, point2: Vector2): any;
static createCircle2WithRadiusPointsAndClockwise(r: number, point1: Vector2, point2: Vector2, clockwise: boolean): Circle2;
}
}
declare module "foundation/runtime/math/Arc2" {
import { Curve2 } from "foundation/runtime/math/Curve2";
import { Vector2 } from "foundation/runtime/math/Vector2";
export class Arc2 extends Curve2 {
radius: number;
clockwise: boolean;
private circle;
protected _center: Vector2;
protected _startAngle: number;
protected _endAngle: number;
protected _includedAngle: number;
protected _dirty: boolean;
constructor(from?: Vector2, to?: Vector2, radius?: number, clockwise?: boolean);
get startAngle(): number;
get endAngle(): number;
angle(): number;
center(): Vector2;
setUp(from: Vector2, to: Vector2, radius: number, clockwise?: boolean): void;
getIncludedAngle(vector: Vector2, withVec?: Vector2): number;
computeStartAngle(): number;
isInThisArc(pt: Vector2): boolean;
getPointsWithDivisions(divisions?: number): Array;
getPointsWithRad(rad?: number): Array;
}
}
declare module "foundation/runtime/math/ArrayVector2Converter" {
import { FieldConverter } from 'cross/runtime/module/persistent/converter/FieldConverter';
import { PersistentAnnotation } from 'cross/runtime/module/persistent/PersistentAnnotation';
import { PersistentContext } from 'cross/runtime/module/persistent/PersistentContext';
import { PersistentFactory } from 'cross/runtime/module/persistent/PersistentFactory';
export class ArrayVector2Converter extends FieldConverter {
load(factory: PersistentFactory, context: PersistentContext, item: any, config: any, annotation?: PersistentAnnotation): void;
save(factory: PersistentFactory, context: PersistentContext, item: any, config: any, annotation?: PersistentAnnotation): void;
}
}
declare module "foundation/runtime/math/Curve3" {
import { Value3 } from "foundation/runtime/math/Value3";
import { Vector3 } from "foundation/runtime/math/Vector3";
export class Curve3 {
from: Vector3;
to: Vector3;
constructor(from?: Value3, to?: Value3);
set(from: Value3, to: Value3): Curve3;
dispose(): void;
}
}
declare module "foundation/runtime/math/Bezier" {
import { Curve3 } from "foundation/runtime/math/Curve3";
import { Vector3 } from "foundation/runtime/math/Vector3";
export class Bezier extends Curve3 {
controls: Array;
constructor(from?: Vector3, to?: Vector3, controls?: Array);
get n(): number;
private compute;
computePoints(division: number, result?: Array): Array;
}
}
declare module "foundation/runtime/math/Bezier2" {
import { Curve2 } from "foundation/runtime/math/Curve2";
import { Vector2 } from "foundation/runtime/math/Vector2";
export class Bezier2 extends Curve2 {
start: Vector2;
cPoint1: Vector2;
cPoint2: Vector2;
end: Vector2;
constructor(from?: Vector2, to?: Vector2, point1?: Vector2, point2?: Vector2);
computePoints(divisions?: number, result?: Array): Array;
}
}
declare module "foundation/runtime/math/border/BorderUtil" {
export class BorderUtil {
}
}
declare module "foundation/runtime/math/border/EnclosingUtil" {
import { Circle2 } from "foundation/runtime/math/Circle2";
import { Vector2 } from "foundation/runtime/math/Vector2";
export class MiniCircle {
static makeCircle(points: Array): Circle2 | null;
static makeCircleOnePoint(points: Array, p: Vector2): Circle2;
static makeCircleTwoPoints(points: Array, p: Vector2, q: Vector2): Circle2;
static makeDiameter(a: Vector2, b: Vector2): Circle2;
static makeCircumcircle(a: Vector2, b: Vector2, c: Vector2): Circle2 | null;
static MULTIPLICATIVE_EPSILON: number;
static isInCircle(c: Circle2 | null, p: Vector2): boolean;
static crossProduct(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number): number;
static distance(x0: number, y0: number, x1: number, y1: number): number;
}
}
declare module "foundation/runtime/math/Bound2" {
import { Vector2 } from "foundation/runtime/math/Vector2";
export class Bound2 {
x: number;
y: number;
width: number;
height: number;
rotation: number;
constructor(x?: number, y?: number, width?: number, height?: number, rotation?: number);
get left(): number;
get top(): number;
get right(): number;
get bottom(): number;
isEmpty(): boolean;
expandByPoint(x: number, y: number): void;
expandByPoints(points: Array): void;
expandByBound(bound: Bound2): void;
offset(x: number, y: number): void;
toPoints(ref?: Vector2[]): Vector2[];
dispose(): void;
}
}
declare module "foundation/runtime/math/Line3" {
import { Curve3 } from "foundation/runtime/math/Curve3";
import { Matrix4 } from "foundation/runtime/math/Matrix4";
import { Value3 } from "foundation/runtime/math/Value3";
import { Vector3 } from "foundation/runtime/math/Vector3";
export class Line3 extends Curve3 {
dir: Vector3;
constructor(from?: Value3, to?: Value3);
isValidate(): boolean;
set(from: Value3, to: Value3): Curve3;
distanceSq(): number;
distance(): number;
center(target?: Vector3): Vector3;
direction(target?: Vector3): Vector3;
equals(line: Line3): boolean;
nearlyEquals(value: Line3, tolerance?: number): boolean;
assign(line: Line3): Line3;
delta(target?: Vector3): Vector3;
at(rate: number, target?: Vector3): Vector3;
closestPointToPointParameter(point: any, clampToLine: any): any;
closestPointToPoint(point: any, clampToLine: any, optionalTarget: any): any;
applyMatrix4(matrix: Matrix4): Line3;
copy(line: Line3): Line3;
clone(): Line3;
getClosestPoint(des: Value3): Value3;
getClosestPoints(line: Line3): any;
isPointOnSegment(point: Vector3): boolean;
}
}
declare module "foundation/runtime/math/Matrix2" {
import { Vector2 } from "foundation/runtime/math/Vector2";
export class Matrix2 {
elements: Array;
constructor();
set(data: Array): Matrix2;
setByNormalVector(v1: Vector2, v2: Vector2): Matrix2;
invert(): Matrix2;
appendLeft(matrix2: Matrix2): Matrix2;
appendRight(matrix2: Matrix2): Matrix2;
multiply(v2: Vector2): Vector2;
}
}
declare module "foundation/runtime/math/Math2dUtil" {
import { Line2 } from "foundation/runtime/math/Line2";
import { Rect } from "foundation/runtime/math/Rect";
import { Value2 } from "foundation/runtime/math/Value2";
import { Vector2 } from "foundation/runtime/math/Vector2";
export class Math2dUtil {
static nearlyEquals(v1: Value2, v2: Value2, tolerance?: number): boolean;
static isForward(points: Array, tolerance?: number): boolean;
static uniqPoints(points: Array, tolerance?: number): Array;
static adjustmentPolygon(points: Array, tolerance?: number): Array;
static isSameLineSegment(begin1: Value2, begin2: Value2, end1: Value2, end2: Value2, tolerance?: number): boolean;
static isSameDirection(source: Value2, target: Value2, tolerance?: number): boolean;
static caculateAreaTolByAngle(angle?: number): number;
static isParallel(begin1: Value2, end1: Value2, begin2: Value2, end2: Value2, tolerance?: number): boolean;
static isParallel2(begin1: Value2, begin2: Value2, end1: Value2, end2: Value2, tolerance?: number): boolean;
static isVectorParallel(v1: Value2, v2: Value2, tolerance?: number): boolean;
static isParallelbyAngle(line1StartPt: Value2, line1EndPt: Value2, line2StartPt: Value2, line2EndPt: Value2, angleTol?: number): boolean;
static getArea(points: Array, tolerance?: number): number;
static getAbstractArea(points: Array, tolerance?: number): number;
static getAreaCenter(points: Array, target?: Vector2, tolerance?: number): Vector2;
static lineLineIntersection(begin1: Value2, begin2: Value2, end1: Value2, end2: Value2, tolerance?: number, areaTolerance?: number): Vector2;
static segmentSegmentIntersection(begin1: Value2, begin2: Value2, end1: Value2, end2: Value2, toleranceRate?: number): Vector2;
static segmentSegmentIntersectionByLengthTolerence(begin1: Value2, begin2: Value2, end1: Value2, end2: Value2, tolerance?: number): Vector2;
private static onSegment;
private static orientation;
static isSegmentSegmenetIntersect(p1: Value2, q1: Value2, p2: Value2, q2: Value2, tolerance?: number): boolean;
static lineSegmentIntersection(begin1: Value2, end1: Value2, begin2: Value2, end2: Value2, toleranceRate?: number): Vector2;
static makeForwardLoop(points: Array, forward: boolean, tolerance?: number): void;
static makeForwardLoops(pointss: Array>, forward: boolean, tolerance?: number): void;
static isRadianInRangeWrapped(r: number, rStart: number, rEnd: number): boolean;
static isRadianNearlyInRangeWrapped(r: number, rStart: number, rEnd: number, tolerance?: number): boolean;
static isRadianNearlyEqualsWrapped(r: number, rReference: number, tolerance?: number): boolean;
static isSameLine(point1: Value2, point2: Value2, point3: Value2, point4: Value2, tolerance?: number): boolean;
static isSameLines(point1: Value2, point2: Value2, point3: Value2, point4: Value2, tolerance?: number): boolean;
static isPerpendicular(point1: Value2, point2: Value2, point3: Value2, point4: Value2, tolerance?: number): boolean;
static isPointsOnSameSide(point1: Value2, point2: Value2, lineBegin: Value2, lineEnd: Value2): boolean;
static isPointInLine(point: Value2, linePoint1: Value2, linePoint2: Value2, tolerance?: number): boolean;
static isPointInLineSegment(point: Value2, point1: Value2, point2: Value2, tolerance?: number): boolean;
static isPointInLineSegments(point: Value2, points: Array, tolerance?: number): boolean;
static isPointBetweenLineSegment(point: Vector2, from: Vector2, to: Vector2): boolean;
static isPointInPolygon(point: Value2, points: Array, border?: boolean, tolerance?: number): boolean;
static isPointOnPolygon(point: Value2, points: Array, tolerance?: number): boolean;
static isSegmentsOverlapped(point1: Value2, point2: Value2, point3: Value2, point4: Value2, tolerance?: number): boolean;
static getSegmentsOverlapped(point1: Value2, point2: Value2, point3: Value2, point4: Value2, tolerance?: number): boolean;
static getOverlapped(point1: Value2, point2: Value2, point3: Value2, point4: Value2, tolerance?: number): boolean;
static isProjectEqual(point1: Value2, point2: Value2, point3: Value2, point4: Value2, tolerance?: number): boolean;
static isSegmentIntersectedWithPolygon(point1: Value2, point2: Value2, polygon: Array, tolerance?: number): boolean;
static isSegmentCutPolygon(point1: Value2, point2: Value2, polygon: Array, tolerance?: number): boolean;
static isSegmentCutPolygonWithPolygon(cuts: Array, polygon: Array, tolerance?: number): boolean;
static isPolygonInPolygon(polygon1: Array, polygon2: Array, border?: boolean, tolerance?: number): boolean;
static testInRange(center: Value2, point: Value2, distance: number): boolean;
static getSegmentLength(point1: Value2, point2: Value2): number;
static getSegmentsMinLength(points: Array): number;
private static _getPerpendicularIntersect_line;
static getPerpendicularIntersect(point: Value2, begin: Value2, end: Value2, target?: Vector2): Vector2;
private static _getClosestSegmentPoint_line;
static getClosestSegmentPoint(point: Value2, begin: Value2, end: Value2, target?: Vector2): Vector2;
private static _getLerpNumber_point;
static getLerpNumber(begin: Value2, end: Value2, point: Value2, tolerance?: number): number;
static lerp(begin: Value2, end: Value2, lerp: number): Value2;
static distanceValue(x1: number, y1: number, x2: number, y2: number): number;
static distance(v1: Value2, v2: Value2): number;
static distanceBetweenParallelLines(line1From: Vector2, line1To: Vector2, line2From: Vector2, line2To: Vector2, tolerance: number): number;
static getPointProjectionToLine(point: Vector2, from: Vector2, to: Vector2, tolerance: number): Vector2;
static distanceSquared(v1: Value2, v2: Value2): number;
static closestDistance(point: Value2, begin: Value2, end: Value2): number;
static closestDistanceToSegment(point: Value2, point1: Value2, point2: Value2): number;
static closestDistanceToPolygon(point: Value2, points: Array): number;
static closestPointToPolygon(point: Vector2, points: Array): Vector2;
static directionDirectionRad(dir1: Vector2, dir2: Vector2): number;
static directionDirectionAngle(dir1: Vector2, dir2: Vector2): number;
static lineLineRad(start1: Value2, end1: Value2, start2: Value2, end2: Value2): number;
static lineLineAngle(start1: Value2, end1: Value2, start2: Value2, end2: Value2): number;
static lineLineAngle180(start1: Value2, end1: Value2, start2: Value2, end2: Value2): number;
static lineLineMinAngle(start1: Value2, end1: Value2, start2: Value2, end2: Value2): number;
static getLineRad(begin: Value2, end: Value2): number;
static getLineAngle(begin: Value2, end: Value2): number;
static getHorizontaleRad(begin: Value2, end: Value2): number;
static getHorizontaleAngle(begin: Value2, end: Value2): number;
static lineLineAngleCCW(start1: Value2, end1: Value2, start2: Value2, end2: Value2): number;
static lineLineAngleCW(begin: Vector2, end: Vector2): number;
static getNearestParallelAngle(angle1: number, angle2: number): number;
static getSegmentProjectionOnSegment(p1: Vector2, p2: Vector2, from: Vector2, to: Vector2): {
x1: number;
x2: number;
};
static raySegmentIntersection(rayEndPoint: Vector2, rayCtrlPoint: Vector2, segPoint1: Vector2, segPoint2: Vector2, tolerance?: number): Vector2;
static getMassProperties(points: Array, tolerance?: number): Array;
static vector2Multiply(from: Vector2, to: Vector2): number;
static offsetVector(start: Vector2, end: Vector2, offset: number): Vector2;
static offsetVector2(start: Vector2, end: Vector2, offset: number): Vector2;
static getLineEndPoint(start: Vector2, length: number, angle: number): Vector2;
static offsetLines(positions: Vector2[], offset: number, reverse?: boolean): Array;
static scalePoint(start: Value2, end: Value2, distance: number): Vector2;
static getCentralLineOfLineSegment(startPoint: Value2, endPoint: Value2): any;
static snapAngle(angle: number): number;
static snapPoint(offset: any): any;
static isAligned(opt_offset: any, input: any, tolerance: number): number;
static snapDimension(point1: any, point2: any): any;
static boundsToPolygon(points: Array): Array;
static offsetPolygon(origin: Vector2, points: Array): Array;
static transformPolygon(origin: Vector2, originX: Vector2, originY: Vector2, points: Array, target: Vector2, targetX: Vector2, targetY: Vector2): Array;
static getBounds(points: Array): any;
static toPersistentPrecision(num: number): number;
static randomInRange(boundaryDown: any, boundaryUp: any): number;
static getPointsOfRect(rect: Rect): Array;
static sortPointsCW(points: Vector2[], CCW?: boolean): Vector2[];
static isLineInside(line1: Line2, line2: Line2): boolean;
static isRightSide(line: Line2, point: Vector2): boolean;
static sideValue(line: Line2, point: Vector2): number;
static pointsDistance(points: Value2[], closed?: boolean): number;
static getFootPoint(pt: Value2, from: Value2, to: Value2): Value2;
}
}
declare module "foundation/runtime/math/Matrix3d" {
import { Euler } from "foundation/runtime/math/Euler";
import { Matrix4 } from "foundation/runtime/math/Matrix4";
import { Quaternion } from "foundation/runtime/math/Quaternion";
import { Vector3 } from "foundation/runtime/math/Vector3";
export class Matrix3d extends Matrix4 {
protected _position: Vector3;
protected _quaternion: Quaternion;
protected _euler: Euler;
protected _zoom: Vector3;
constructor();
get position(): Vector3;
get quaternion(): Quaternion;
get euler(): Euler;
get zoom(): Vector3;
identity(): Matrix3d;
innerDecompose(): Matrix3d;
clone(): Matrix3d;
free(): void;
}
}
declare module "foundation/runtime/math/Math3dUtil" {
import { Euler } from "foundation/runtime/math/Euler";
import { Matrix3 } from "foundation/runtime/math/Matrix3";
import { Matrix4 } from "foundation/runtime/math/Matrix4";
import { Value3 } from "foundation/runtime/math/Value3";
import { Vector3 } from "foundation/runtime/math/Vector3";
export class Math3dUtil {
static getPlaneMatrixByPolygon3d(polygon3d: Value3[]): Matrix4;
static uniqPoints(points: Array, tolerance?: number): Array;
static isSamePoint(source: Value3, target: Value3, tolerance?: number): boolean;
static isSamePointByXY(source: Value3, target: Value3, tolerance?: number): boolean;
static isSameLineSegment(point1: Value3, point2: Value3, point3: Value3, point4: Value3, tolerance?: number): boolean;
static getConnectLinePoint(end: Value3, lineStart: Value3, lineEnd: Value3, tolerance?: number): Value3;
static transformAxisMatrix(vx: Vector3, vy: Vector3, vz: Vector3): Matrix3;
static isParallel(v1: Vector3, v2: Vector3, tolerance?: number): boolean;
static normalPoint(prior: Value3, origin: Value3, next: Value3, target?: Vector3): Vector3;
static normalTriangle(origin: Value3, prior: Value3, next: Value3, target?: Vector3): Vector3;
static getClosestPoint(point1: Value3, point2: Value3, des: Value3): Value3;
static isPointInLine(point: Vector3, linePoint1: Vector3, linePoint2: Vector3, tolerance?: number): boolean;
static isPointOnLine(point: Vector3, linePoint1: Vector3, linePoint2: Vector3, tolerance?: number): boolean;
static isSameLine(point1: Vector3, point2: Vector3, point3: Vector3, point4: Vector3, tolerance?: number): boolean;
static sortLinePoints(points: Array): void;
static getClosestPoints(point1: Value3, point2: Value3, point3: Value3, point4: Value3): any;
static threePointsInLine(p1: Vector3, p2: Vector3, p3: Vector3, tolerance?: number): boolean;
static pointsInLine(points: Array, tolerance?: number): boolean;
makeXZAxixConvertRotation(xAxis: Vector3, zAxis: Vector3): Euler;
static getVectorsByCode(vs: Array, x: string, ref?: Array): Array;
static getPerpendedVector(normal: Vector3): Vector3;
}
}
declare module "foundation/runtime/math/Plane" {
import { Types } from 'cross/runtime/lang/collection/Types';
import { Line3 } from "foundation/runtime/math/Line3";
import { Value3 } from "foundation/runtime/math/Value3";
import { Vector3 } from "foundation/runtime/math/Vector3";
export class Plane {
normal: Vector3;
constant: number;
constructor(normal?: Value3, constant?: number);
equals(plane: any): boolean;
makeWith3Points(pt0: Vector3, pt1: Vector3, pt2: Vector3): Plane;
setPoints(pts: Types): void;
makeWithNormalAndPoint(normalref: Vector3, point: Vector3): Plane;
contains(line: Line3): boolean;
nearlyEquals(plane: Plane): boolean;
isCoplane(plane: Plane, tolerance?: number): boolean;
set(normal: Value3, constant: number): Plane;
assign(plane: Plane): Plane;
copy(plane: Plane): Plane;
setComponents(x: number, y: number, z: number, w: number): Plane;
setFromNormalAndCoplanarPoint(normal: Value3, point: Vector3): Plane;
setFromCoplanarPoints(a: Vector3, b: Vector3, c: Vector3): Plane;
normalize(): Plane;
negate(): Plane;
distanceToPoint(point: any): number;
distanceToSphere(sphere: any): number;
projectPoint(point: any, optionalTarget: any): any;
orthoPoint(point: any, optionalTarget: any): any;
intersectLine(line: any, target?: Vector3): Vector3;
intersectsLine(line: any): boolean;
intersectsBox(box: any): boolean;
intersectsSphere(sphere: any): boolean;
intersectPlane(other: Plane): Line3;
intersectWithLine(from: Vector3, to: Vector3, target?: Vector3): Vector3;
coplanarPoint(target?: Vector3): Vector3;
translate(offset: any): Plane;
clone(): Plane;
}
}
declare module "foundation/runtime/math/Sphere" {
import { Box3 } from "foundation/runtime/math/Box3";
import { Matrix4 } from "foundation/runtime/math/Matrix4";
import { Plane } from "foundation/runtime/math/Plane";
import { Value3 } from "foundation/runtime/math/Value3";
import { Vector3 } from "foundation/runtime/math/Vector3";
export class Sphere {
center: Vector3;
radius: number;
constructor(center?: Vector3, radius?: number);
empty(): boolean;
isEmpty(): boolean;
equals(value: Sphere): boolean;
containsPoint(point: Value3): boolean;
assign(value: Sphere): Sphere;
copy(value: Sphere): Sphere;
set(center: Vector3, radius: number): Sphere;
setFromArray(data: Array, optionalCenter?: Vector3): Sphere;
setFromPoints(points: Array, optionalCenter?: Vector3): Sphere;
translate(offset: Value3): Sphere;
intersectsSphere(sphere: Sphere): boolean;
nearlyIntersectsSphere(sphere: Sphere, tolerance?: number): boolean;
distanceToPoint(point: Value3): number;
getBoundingBox(target?: Box3): Box3;
clampPoint(point: Vector3, target?: Vector3): Vector3;
intersectsBox(box: Box3): boolean;
intersectsPlane(plane: Plane): boolean;
applyMatrix4(matrix: Matrix4): Sphere;
reset(): Sphere;
clone(): any;
}
}
declare module "foundation/runtime/math/Box3" {
import { IFreeable } from 'cross/runtime/lang/IFreeable';
import { Matrix4 } from "foundation/runtime/math/Matrix4";
import { Plane } from "foundation/runtime/math/Plane";
import { Sphere } from "foundation/runtime/math/Sphere";
import { Value3 } from "foundation/runtime/math/Value3";
import { Vector3 } from "foundation/runtime/math/Vector3";
export class Box3 implements IFreeable {
min: Vector3;
max: Vector3;
rotationX: number;
rotationY: number;
rotationZ: number;
constructor(min?: Vector3, max?: Vector3);
get centerX(): number;
get centerY(): number;
get centerZ(): number;
get sizeX(): number;
get sizeY(): number;
get sizeZ(): number;
get sizeAbsX(): number;
get sizeAbsY(): number;
get sizeAbsZ(): number;
get sizeHalfX(): number;
get sizeHalfY(): number;
get sizeHalfZ(): number;
isEmpty(): boolean;
isZero(tolerance?: number): boolean;
isGreaterSize(size: Value3): boolean;
isSizeValid(limitX?: number, limitY?: number, limitZ?: number, limitVolume?: number): boolean;
equals(box: Box3): boolean;
nearlyEquals(box: Box3, tolerance?: number): boolean;
hasSamePart(box: Box3): boolean;
nearlyHasSamePart(box: Box3): boolean;
assign(value: Box3): Box3;
copy(value: Box3): Box3;
copySizeTo(value: Value3): Box3;
set(min: Vector3, max: Vector3): Box3;
setValue(minX: number, minY: number, minZ: number, maxX: number, maxY: number, maxZ: number): Box3;
setSize(sizeX: number, sizeY: number, sizeZ: number): Box3;
setFromPoints(points: Array, matrix?: Matrix4): Box3;
setFromCenterAndSize(center: Vector3, size: Vector3): Box3;
setFromArray(array: Array): Box3;
containsPoint(point: Value3): boolean;
containsInnerPoint(point: Value3): boolean;
containsNearlyInnerPoint(point: Value3, tolerance?: number): boolean;
containsPoints(points: Array): boolean;
containsPointsExcludedCorner(points: Array): boolean;
containsPointsExcludedBoundary(points: Array): boolean;
nearlyContainsPoint(point: Vector3, tolerance?: number): boolean;
nearlySurfacesContainsPoint(point: Value3, tolerance?: number): boolean;
containsBox(box: Box3): boolean;
isCorner(point: Value3): boolean;
isLine(point: Value3): boolean;
nearlyContainsBox(box: Box3, tolerance?: number): boolean;
trunc(precision?: number): Box3;
center(target?: Vector3): Vector3;
size(target?: Vector3): Vector3;
maxSizeOf3d(): number;
volumn(): number;
getPoints(targets?: Array): Array;
getPlanes(targets?: Array): Array;
intersectsBox(box: Box3): boolean;
intersectsBoxExactly(box: Box3): boolean;
nearlyIntersectsBox(box: Box3, tolerance?: number): boolean;
intersectsPlane(plane: Plane): boolean;
intersectsSphere(sphere: Sphere): boolean;
intersect(box: Box3): Box3;
union(box: Box3): Box3;
translate(offset: Value3): Box3;
translateCenter(position: Value3): Box3;
multiplyScalar(value: number): Box3;
expandByPoint(point: Value3): Box3;
expandByBox(box: Box3): Box3;
expandByPointValue(x: number, y: number, z: number): Box3;
expandByVector(vector: Value3): Box3;
expandByScalar(scalar: number): Box3;
distanceToPoint(point: Vector3): number;
clampPoint(point: Vector3, target?: Vector3): Vector3;
getParameter(point: Value3, target?: Vector3): Vector3;
getBoundingSphere(target?: Sphere): Sphere;
makeEmpty(): Box3;
applyMatrix4(matrix: Matrix4): Box3;
flipX(): Box3;
flipY(): Box3;
flipZ(): Box3;
reset(minValue?: number, maxValue?: number): Box3;
arrange(isSelf?: boolean): Box3;
format(precision?: number): string;
parse(value: string): Box3;
toString(): string;
clone(): Box3;
free(): Box3;
dispose(): void;
static equals(box1: Box3, box2: Box3): boolean;
static nearlyEquals(value1: Box3, value2: Box3, tolerance?: number): boolean;
static contains(boxs: Array, box: Box3): boolean;
static nearlyContains(boxs: Array, box: Box3, tolerance?: number): boolean;
static intersect(box1: Box3, box2: Box3, target?: Box3): Box3;
}
}
declare module "foundation/runtime/math/Box2" {
import { Box3 } from "foundation/runtime/math/Box3";
import { Matrix4 } from "foundation/runtime/math/Matrix4";
import { Value2 } from "foundation/runtime/math/Value2";
import { Vector2 } from "foundation/runtime/math/Vector2";
import { Vector3 } from "foundation/runtime/math/Vector3";
export class Box2 {
min: Vector2;
max: Vector2;
constructor(min?: Value2, max?: Value2);
get width(): number;
get height(): number;
isEmpty(): boolean;
equals(box: Box2): boolean;
nearlyEquals(box: Box2, tolerance?: number): boolean;
assign(value: Box2): Box2;
copy(box: Box2): Box2;
getParameter(point: Value2, target?: Vector2): Vector2;
set(min: Value2, max: Value2): Box2;
setValue(minX: number, minY: number, maxX: number, maxY: number): Box2;
setFromValue2(point1X: number, point1Y: number, point2X: number, point2Y: number): Box2;
setFromPoint2(point1: Value2, point2: Value2): Box2;
setFromPoints(points: Array): Box2;
setFromCenterAndSize(center: Value2, size: Value2): Box2;
containsValue(x: number, y: number, border?: boolean): boolean;
nearlyContainsConer(x: number, y: number, tolerance?: number): boolean;
containsPoint(point: Value2, border?: boolean): boolean;
containsInnerPoint(point: Value2, tolerance?: number): boolean;
containsBox(box: Box2): boolean;
center(target?: Vector2): Vector2;
size(target?: Vector2): Vector2;
intersectsBox(box: Box2): boolean;
intersectsBoxExactly(box: Box2): boolean;
hasSamePart(box: Box2): boolean;
nearlyHasSamePart(box: Box2): boolean;
isNearlyZeroArea(): boolean;
intersect(box: Box2): Box2;
union(box: Box2): Box2;
translate(offset: Value2): Box2;
expandByValue(x: number, y: number): void;
expandByPoint(point: Value2): Box2;
expandByBox(box: Box2): Box2;
expandByVector(vector: Value2): Box2;
expandByScalar(scalar: number): Box2;
distanceToPoint(point: Vector2): number;
clampPoint(point: Vector2, target?: Vector2): Vector2;
toPoints(reverse?: boolean, ref?: Vector2[]): Vector2[];
makeEmpty(): Box2;
reset(): Box2;
free(): void;
clone(): any;
static fromBox3PlaneXZ(box3: Box3): Box2;
applyMatrix4(matrix: Matrix4): Box2;
nearlyIntersectsBox(box: Box2, tolerance?: number): boolean;
maxSizeOf2d(): number;
getPoints(targets?: Array): Array;
}
}
declare module "foundation/runtime/math/Box2d" {
import { Box2 } from "foundation/runtime/math/Box2";
import { Vector2 } from "foundation/runtime/math/Vector2";
export class Box2d {
point1: Vector2;
point2: Vector2;
point3: Vector2;
point4: Vector2;
constructor();
set(x: number, y: number, width: number, height: number): void;
rotate(rad: number): void;
range(): Box2;
}
}
declare module "foundation/runtime/math/Circle3" {
export class Circle3 {
}
}
declare module "foundation/runtime/math/CircleArc2" {
import { Vector2 } from "foundation/runtime/math/Vector2";
export class CircleArc2 {
radius: number;
clockwise: boolean;
centerCW: Vector2;
centerNCW: Vector2;
from: Vector2;
to: Vector2;
protected _dirty: boolean;
center: Vector2;
radian: number;
constructor(from: Vector2, to: Vector2, radius?: number, clockwise?: boolean);
reset(): boolean;
setCenter(): void;
}
}
declare module "foundation/runtime/math/ColorUtil" {
export class ColorUtil {
static Factor: number;
static format(value: number): string;
static parse(value: string): number;
static parseRGB(value: string): number[];
static convertHexColor2Rgb(hexColor: string): number[];
static convertRgb2Hex(rgb: string): string;
static convertRgb2Hsv(rgb: number[]): number[];
static distanceOfHsv(color1: number[], color2: number[]): number;
getGrayLevel(rgb: number[]): number;
}
}
declare module "foundation/runtime/math/ColorPower" {
export class ColorPower {
red: number;
green: number;
blue: number;
power: number;
constructor(red?: number, green?: number, blue?: number, power?: number);
assign(value: ColorPower): ColorPower;
set(red: number, green: number, blue: number, power?: number): ColorPower;
getInt(): number;
setInt(value: number): ColorPower;
setHex(value: string): ColorPower;
getHex(prefix?: string): string;
toRgbaString(): string;
convertRgb(value: any): void;
static convertRgb(value: string, target: any): void;
static convertRgbInvoker(value: string, owner: any, invoker: any): void;
convertRedGreenBlue(value: any): void;
parse(source: string): boolean;
toString(rightLength?: number): string;
serialize(output: any): void;
unserialize(input: any): void;
dispose(): void;
}
}
declare module "foundation/runtime/math/Color" {
import { ColorPower } from "foundation/runtime/math/ColorPower";
export class Color {
r: number;
g: number;
b: number;
constructor(r?: number, g?: number, b?: number);
set(value: any): Color;
setScalar(scalar: number): void;
setHex(hex: number): Color;
setRGB(r: number, g: number, b: number): Color;
setPower(color: ColorPower): void;
setHSL(h?: any, s?: any, l?: any): Color;
protected static hue2rgb(p: number, q: number, t: number): number;
protected static handleAlpha(style: any, string: string): void;
setStyle(style: any): any;
clone(): any;
copy(color: Color): Color;
copyTo(value: any): Color;
copyGammaToLinear(color: any, gammaFactor?: number): Color;
copyLinearToGamma(color: any, gammaFactor?: number): Color;
convertGammaToLinear(): Color;
convertLinearToGamma(): Color;
getHex(): number;
getHex4(): number;
getWebHex(): number;
getHexString(): string;
getWebHexString(): String;
getHSL(target?: any): any;
getStyle(): string;
offsetHSL(h: any, s: any, l: any): Color;
add(color: any): Color;
addColors(color1: any, color2: any): Color;
addScalar(s: any): Color;
multiply(color: any): Color;
multiplyScalar(s: any): Color;
lerp(color: any, alpha: any): Color;
equals(c: any): boolean;
fromArray(array: Array, offset?: number): Color;
toArray(array: Array, offset?: number): Array;
writeFloat4(stream: any): void;
load(data: any): void;
static getRandomHexString(preFix?: string): string;
static getRandomHexColor(): number;
static ColorKeywords: {
aliceblue: number;
antiquewhite: number;
aqua: number;
aquamarine: number;
azure: number;
beige: number;
bisque: number;
black: number;
blanchedalmond: number;
blue: number;
blueviolet: number;
brown: number;
burlywood: number;
cadetblue: number;
chartreuse: number;
chocolate: number;
coral: number;
cornflowerblue: number;
cornsilk: number;
crimson: number;
cyan: number;
darkblue: number;
darkcyan: number;
darkgoldenrod: number;
darkgray: number;
darkgreen: number;
darkgrey: number;
darkkhaki: number;
darkmagenta: number;
darkolivegreen: number;
darkorange: number;
darkorchid: number;
darkred: number;
darksalmon: number;
darkseagreen: number;
darkslateblue: number;
darkslategray: number;
darkslategrey: number;
darkturquoise: number;
darkviolet: number;
deeppink: number;
deepskyblue: number;
dimgray: number;
dimgrey: number;
dodgerblue: number;
firebrick: number;
floralwhite: number;
forestgreen: number;
fuchsia: number;
gainsboro: number;
ghostwhite: number;
gold: number;
goldenrod: number;
gray: number;
green: number;
greenyellow: number;
grey: number;
honeydew: number;
hotpink: number;
indianred: number;
indigo: number;
ivory: number;
khaki: number;
lavender: number;
lavenderblush: number;
lawngreen: number;
lemonchiffon: number;
lightblue: number;
lightcoral: number;
lightcyan: number;
lightgoldenrodyellow: number;
lightgray: number;
lightgreen: number;
lightgrey: number;
lightpink: number;
lightsalmon: number;
lightseagreen: number;
lightskyblue: number;
lightslategray: number;
lightslategrey: number;
lightsteelblue: number;
lightyellow: number;
lime: number;
limegreen: number;
linen: number;
magenta: number;
maroon: number;
mediumaquamarine: number;
mediumblue: number;
mediumorchid: number;
mediumpurple: number;
mediumseagreen: number;
mediumslateblue: number;
mediumspringgreen: number;
mediumturquoise: number;
mediumvioletred: number;
midnightblue: number;
mintcream: number;
mistyrose: number;
moccasin: number;
navajowhite: number;
navy: number;
oldlace: number;
olive: number;
olivedrab: number;
orange: number;
orangered: number;
orchid: number;
palegoldenrod: number;
palegreen: number;
paleturquoise: number;
palevioletred: number;
papayawhip: number;
peachpuff: number;
peru: number;
pink: number;
plum: number;
powderblue: number;
purple: number;
red: number;
rosybrown: number;
royalblue: number;
saddlebrown: number;
salmon: number;
sandybrown: number;
seagreen: number;
seashell: number;
sienna: number;
silver: number;
skyblue: number;
slateblue: number;
slategray: number;
slategrey: number;
snow: number;
springgreen: number;
steelblue: number;
tan: number;
teal: number;
thistle: number;
tomato: number;
turquoise: number;
violet: number;
wheat: number;
white: number;
whitesmoke: number;
yellow: number;
yellowgreen: number;
};
}
}
declare module "foundation/runtime/math/Color3" {
export class Color3 {
red: number;
green: number;
blue: number;
constructor(red?: number, green?: number, blue?: number);
equalsValue(red: number, green: number, blue: number): boolean;
assign(value: Color3): Color3;
assignPower(value: Color3): Color3;
set(red: number, green: number, blue: number): Color3;
setInteger(value: number): Color3;
setHex(value: string): Color3;
multiplyScalar(value: number): Color3;
copyTo(value: any): Color3;
toHex(): number;
toHex4(): number;
toRgbaString(): string;
toString(): string;
convertRgb(value: any): void;
serialize(output: any): void;
unserialize(input: any): void;
unserialize3(p: any): void;
dispose(): void;
}
}
declare module "foundation/runtime/math/Color4" {
export class Color4 {
red: number;
green: number;
blue: number;
alpha: number;
constructor(red?: number, green?: number, blue?: number, alpha?: number);
assign(value: Color4): Color4;
assignPower(value: Color4): Color4;
set(red: number, green: number, blue: number, alpha?: number): Color4;
setInt(value: number): Color4;
setIntAlpha(value: number, alpha: number): Color4;
setHex(value: string): Color4;
fromArray(array: Array, offset?: number): Color4;
copyTo(value: any): Color4;
load(data: any): void;
toHex(): number;
toHex4(): number;
toRgbaString(): string;
toString(): string;
serialize(output: any): void;
unserialize(input: any): void;
unserialize3(p: any): void;
dispose(): void;
static Zero: Color4;
static Empty: Color4;
}
}
declare module "foundation/runtime/math/ColorPowerConverter" {
import { FieldConverter } from 'cross/runtime/module/persistent/converter/FieldConverter';
import { PersistentAnnotation } from 'cross/runtime/module/persistent/PersistentAnnotation';
export class ColorPowerConverter extends FieldConverter {
load(factory: any, context: any, item: any, config: any, annotation: PersistentAnnotation): void;
save(factory: any, context: any, item: any, config: any, annotation: PersistentAnnotation): void;
}
}
declare module "foundation/runtime/math/coord/CoordAxisUtil" {
import { Matrix4 } from "foundation/runtime/math/Matrix4";
import { Vector2 } from "foundation/runtime/math/Vector2";
import { Vector3 } from "foundation/runtime/math/Vector3";
import { CoordAxis } from "foundation/runtime/math/coord/CoordAxis";
export class CoordAxisUtil {
static getTransformMatrix(coord: CoordAxis): Matrix4;
static transformByCoord(coord: CoordAxis, point: Vector3): Vector3;
static transformByMatrix(matrix: Matrix4, point: Vector3): Vector3;
static transformPointsByMatrix(matrix: Matrix4, points: Array): Array;
static transformPointToNewCoord(coord: CoordAxis, point: Vector3, coordT: CoordAxis): Vector3;
static objectCoordToUserCoord2d(objectMatrix: Matrix4, userMatrix: Matrix4, point: Vector3 | Vector2): Vector2;
static objectCoordToUserCoord3d(objectMatrix: Matrix4, userMatrix: Matrix4, point: Vector3 | Vector2): Vector3;
}
}
declare module "foundation/runtime/math/coord/CoorTypeEnum" {
export class CoordTypeEnum {
static User: string;
static World: string;
}
}
declare module "foundation/runtime/math/coord/CoordAxis" {
import { InstanceObject } from 'cross/runtime/lang/InstanceObject';
import { Matrix4 } from "foundation/runtime/math/Matrix4";
import { Vector3 } from "foundation/runtime/math/Vector3";
import { CoordTypeEnum } from "foundation/runtime/math/coord/CoorTypeEnum";
export class CoordAxis extends InstanceObject {
type: CoordTypeEnum;
origin: Vector3;
xAxis: Vector3;
yAxis: Vector3;
zAxis: Vector3;
matrix: Matrix4;
name: string;
constructor(origin?: Vector3, xAxis?: Vector3, yAxis?: Vector3);
setOrigin(origin?: Vector3): CoordAxis;
setXAxis(xAxis?: Vector3): CoordAxis;
setYAxis(yAxis?: Vector3): CoordAxis;
assign(coord: CoordAxis): CoordAxis;
}
}
declare module "foundation/runtime/math/coord/CoordDomain" {
import { Matrix4 } from "foundation/runtime/math/Matrix4";
export class CoordDomain {
x: number;
y: number;
lengthX: number;
lengthY: number;
wordMatirx: Matrix4;
constructor(x?: number, y?: number, lengthX?: number, lengthY?: number, wordMatrix?: Matrix4);
getTransferDomainMatrix(domain: CoordDomain, modeScale?: string): Matrix4;
getTransferDomainScale(domain: CoordDomain): number;
}
}
declare module "foundation/runtime/math/coord/CoordService" {
import { Service } from 'cross/runtime/module/Service';
import { Matrix4 } from "foundation/runtime/math/Matrix4";
import { Vector3 } from "foundation/runtime/math/Vector3";
import { CoordAxis } from "foundation/runtime/math/coord/CoordAxis";
export class CoordEventTypeEnum {
static Changed: string;
}
export class CoordService extends Service {
static FlatwallUserCoordFront: string;
static FlatwallUserCoordBack: string;
static FlatwallUserCoordTop: string;
private coord;
private worldCoord;
private coords;
private coordList;
constructor();
switchCoordByName(name: string): void;
setCoordByName(name: string, coord: CoordAxis): void;
setCoord(coord: CoordAxis): void;
getUserPoint(matrix: Matrix4, point: Vector3): Vector3;
getPoint(matrix: Matrix4, point: Vector3): Vector3;
pop(): void;
reset(): void;
getCoord(): CoordAxis;
}
}
declare module "foundation/runtime/math/Coordinate3" {
import { Vector3 } from "foundation/runtime/math/Vector3";
export class Coordinate3 {
coordinateX: Vector3;
coordinateY: Vector3;
coordinateZ: Vector3;
constructor(coordinateX?: Vector3, coordinateY?: Vector3, coordinateZ?: Vector3);
}
}
declare module "foundation/runtime/math/CoordinateEnum" {
export class CoordinateEnum {
static C2dXRightYUp: string;
static C2dXRightYDown: string;
static C3dXRightYInZUp: string;
static C3dXRightYOutZUp: string;
static C3dXRightYUpZIn: string;
static C3dXRightYUpZOut: string;
static C3dXRightZUpYOut: string;
static C3dData: string;
static CADCoordinate: string;
}
}
declare module "foundation/runtime/math/Corners" {
export class Corners {
}
}
declare module "foundation/runtime/math/csg/misc/arrayTools" {
export class ArrayTools {
static BuildArray(size: number, itemBuilder: () => T): Array;
}
}
declare module "foundation/runtime/math/csg/types" {
export type Nullable = T | null;
export type float = number;
export type double = number;
export type int = number;
export type FloatArray = number[] | Float32Array;
export type IndicesArray = number[] | Int32Array | Uint32Array | Uint16Array;
export type DataArray = number[] | ArrayBuffer | ArrayBufferView;
type Primitive = undefined | null | boolean | string | number | Function;
export type Immutable = T extends Primitive ? T : T extends Array ? ReadonlyArray : DeepImmutable;
export type DeepImmutable = T extends Primitive ? T : T extends Array ? DeepImmutableArray : DeepImmutableObject;
interface DeepImmutableArray extends ReadonlyArray> {
}
type DeepImmutableObject = {
readonly [K in keyof T]: DeepImmutable;
};
}
declare module "foundation/runtime/math/csg/maths/mathScalar" {
export class Scalar {
static TwoPi: number;
static WithinEpsilon(a: number, b: number, epsilon?: number): boolean;
static ToHex(i: number): string;
static Sign(value: number): number;
static Clamp(value: number, min?: number, max?: number): number;
static Log2(value: number): number;
static Repeat(value: number, length: number): number;
static Normalize(value: number, min: number, max: number): number;
static Denormalize(normalized: number, min: number, max: number): number;
static DeltaAngle(current: number, target: number): number;
static PingPong(tx: number, length: number): number;
static SmoothStep(from: number, to: number, tx: number): number;
static MoveTowards(current: number, target: number, maxDelta: number): number;
static MoveTowardsAngle(current: number, target: number, maxDelta: number): number;
static Lerp(start: number, end: number, amount: number): number;
static LerpAngle(start: number, end: number, amount: number): number;
static InverseLerp(a: number, b: number, value: number): number;
static Hermite(value1: number, tangent1: number, value2: number, tangent2: number, amount: number): number;
static RandomRange(min: number, max: number): number;
static RangeToPercent(number: number, min: number, max: number): number;
static PercentToRange(percent: number, min: number, max: number): number;
static NormalizeRadians(angle: number): number;
}
}
declare module "foundation/runtime/math/csg/maths/math" {
import { DeepImmutable, Nullable, FloatArray } from "foundation/runtime/math/csg/types";
export const ToGammaSpace: number;
export const ToLinearSpace = 2.2;
export const Epsilon = 0.001;
export class Color3 {
r: number;
g: number;
b: number;
constructor(r?: number, g?: number, b?: number);
toString(): string;
getClassName(): string;
getHashCode(): number;
toArray(array: FloatArray, index?: number): Color3;
toColor4(alpha?: number): Color4;
asArray(): number[];
toLuminance(): number;
multiply(otherColor: DeepImmutable): Color3;
multiplyToRef(otherColor: DeepImmutable, result: Color3): Color3;
equals(otherColor: DeepImmutable): boolean;
equalsFloats(r: number, g: number, b: number): boolean;
scale(scale: number): Color3;
scaleToRef(scale: number, result: Color3): Color3;
scaleAndAddToRef(scale: number, result: Color3): Color3;
clampToRef(min: number, max: number, result: Color3): Color3;
add(otherColor: DeepImmutable): Color3;
addToRef(otherColor: DeepImmutable, result: Color3): Color3;
subtract(otherColor: DeepImmutable): Color3;
subtractToRef(otherColor: DeepImmutable, result: Color3): Color3;
clone(): Color3;
copyFrom(source: DeepImmutable): Color3;
copyFromFloats(r: number, g: number, b: number): Color3;
set(r: number, g: number, b: number): Color3;
toHexString(): string;
toLinearSpace(): Color3;
toLinearSpaceToRef(convertedColor: Color3): Color3;
toGammaSpace(): Color3;
toGammaSpaceToRef(convertedColor: Color3): Color3;
private static _BlackReadOnly;
static FromHexString(hex: string): Color3;
static FromArray(array: DeepImmutable>, offset?: number): Color3;
static FromInts(r: number, g: number, b: number): Color3;
static Lerp(start: DeepImmutable, end: DeepImmutable, amount: number): Color3;
static LerpToRef(left: DeepImmutable, right: DeepImmutable, amount: number, result: Color3): void;
static Red(): Color3;
static Green(): Color3;
static Blue(): Color3;
static Black(): Color3;
static get BlackReadOnly(): DeepImmutable;
static White(): Color3;
static Purple(): Color3;
static Magenta(): Color3;
static Yellow(): Color3;
static Gray(): Color3;
static Teal(): Color3;
static Random(): Color3;
}
export class Color4 {
r: number;
g: number;
b: number;
a: number;
constructor(r?: number, g?: number, b?: number, a?: number);
addInPlace(right: DeepImmutable): Color4;
asArray(): number[];
toArray(array: number[], index?: number): Color4;
equals(otherColor: DeepImmutable): boolean;
add(right: DeepImmutable): Color4;
subtract(right: DeepImmutable): Color4;
subtractToRef(right: DeepImmutable, result: Color4): Color4;
scale(scale: number): Color4;
scaleToRef(scale: number, result: Color4): Color4;
scaleAndAddToRef(scale: number, result: Color4): Color4;
clampToRef(min: number, max: number, result: Color4): Color4;
multiply(color: Color4): Color4;
multiplyToRef(color: Color4, result: Color4): Color4;
toString(): string;
getClassName(): string;
getHashCode(): number;
clone(): Color4;
copyFrom(source: Color4): Color4;
copyFromFloats(r: number, g: number, b: number, a: number): Color4;
set(r: number, g: number, b: number, a: number): Color4;
toHexString(): string;
toLinearSpace(): Color4;
toLinearSpaceToRef(convertedColor: Color4): Color4;
toGammaSpace(): Color4;
toGammaSpaceToRef(convertedColor: Color4): Color4;
static FromHexString(hex: string): Color4;
static Lerp(left: DeepImmutable, right: DeepImmutable, amount: number): Color4;
static LerpToRef(left: DeepImmutable, right: DeepImmutable, amount: number, result: Color4): void;
static FromColor3(color3: DeepImmutable, alpha?: number): Color4;
static FromArray(array: DeepImmutable>, offset?: number): Color4;
static FromInts(r: number, g: number, b: number, a: number): Color4;
static CheckColors4(colors: number[], count: number): number[];
}
export class Vector2 {
x: number;
y: number;
constructor(x?: number, y?: number);
toString(): string;
getClassName(): string;
getHashCode(): number;
toArray(array: FloatArray, index?: number): Vector2;
asArray(): number[];
copyFrom(source: DeepImmutable): Vector2;
copyFromFloats(x: number, y: number): Vector2;
set(x: number, y: number): Vector2;
add(otherVector: DeepImmutable): Vector2;
addToRef(otherVector: DeepImmutable, result: Vector2): Vector2;
addInPlace(otherVector: DeepImmutable): Vector2;
addVector3(otherVector: Vector3): Vector2;
subtract(otherVector: Vector2): Vector2;
subtractToRef(otherVector: DeepImmutable, result: Vector2): Vector2;
subtractInPlace(otherVector: DeepImmutable): Vector2;
multiplyInPlace(otherVector: DeepImmutable): Vector2;
multiply(otherVector: DeepImmutable): Vector2;
multiplyToRef(otherVector: DeepImmutable, result: Vector2): Vector2;
multiplyByFloats(x: number, y: number): Vector2;
divide(otherVector: Vector2): Vector2;
divideToRef(otherVector: DeepImmutable, result: Vector2): Vector2;
divideInPlace(otherVector: DeepImmutable): Vector2;
negate(): Vector2;
scaleInPlace(scale: number): Vector2;
scale(scale: number): Vector2;
scaleToRef(scale: number, result: Vector2): Vector2;
scaleAndAddToRef(scale: number, result: Vector2): Vector2;
equals(otherVector: DeepImmutable): boolean;
equalsWithEpsilon(otherVector: DeepImmutable, epsilon?: number): boolean;
floor(): Vector2;
fract(): Vector2;
length(): number;
lengthSquared(): number;
normalize(): Vector2;
clone(): Vector2;
static Zero(): Vector2;
static One(): Vector2;
static FromArray(array: DeepImmutable>, offset?: number): Vector2;
static FromArrayToRef(array: DeepImmutable>, offset: number, result: Vector2): void;
static CatmullRom(value1: DeepImmutable, value2: DeepImmutable, value3: DeepImmutable, value4: DeepImmutable, amount: number): Vector2;
static Clamp(value: DeepImmutable, min: DeepImmutable, max: DeepImmutable): Vector2;
static Hermite(value1: DeepImmutable, tangent1: DeepImmutable, value2: DeepImmutable, tangent2: DeepImmutable, amount: number): Vector2;
static Lerp(start: DeepImmutable, end: DeepImmutable, amount: number): Vector2;
static Dot(left: DeepImmutable, right: DeepImmutable): number;
static Normalize(vector: DeepImmutable): Vector2;
static Minimize(left: DeepImmutable, right: DeepImmutable): Vector2;
static Maximize(left: DeepImmutable, right: DeepImmutable): Vector2;
static Transform(vector: DeepImmutable, transformation: DeepImmutable): Vector2;
static TransformToRef(vector: DeepImmutable, transformation: DeepImmutable, result: Vector2): void;
static PointInTriangle(p: DeepImmutable, p0: DeepImmutable, p1: DeepImmutable, p2: DeepImmutable): boolean;
static Distance(value1: DeepImmutable, value2: DeepImmutable