@inweb/viewer-visualize
Version:
JavaScript library for rendering CAD and BIM files in a browser using VisualizeJS
115 lines (114 loc) • 4.2 kB
TypeScript
export interface Point2d {
x: number;
y: number;
}
export type Vector3 = [x: number, y: number, z: number];
export interface Point3d {
add(point: Point3d): any;
asVector(): Vector3d;
distanceTo(point: Point3d): any;
rotateBy(angle: number, vector: Vector3d): any;
rotateByBasePoint(angle: number, vector: Vector3d, basePoint: Point3d): any;
scaleBy(factor: number, basePoint: Point3d): any;
set(x: number, y: number, z: number): any;
setToProduct(matrix: any, point: Point3d): any;
setToSum(point: Point3d, vector: Vector3d): any;
sub(point: Point3d): Point3d;
toArray(): number[];
transformBy(matrix: any): any;
translate(vector: Vector3d): any;
get x(): number;
set x(x: number);
get y(): number;
set y(y: number);
get z(): number;
set z(z: number);
}
export interface Vector3d {
add(vector: Vector3d): any;
angleTo(vector: Vector3d): any;
angleToWithRef(vector: Vector3d, ref: Vector3d): any;
asPoint(): Point3d;
crossProduct(vector: Vector3d): any;
dotProduct(vector: Vector3d): any;
isEqualTo(vector: Vector3d): boolean;
length(): number;
lengthSqrd(): number;
mirror(): any;
negate(): any;
normal(): any;
normalize(): any;
rotateBy(angle: number, vector: Vector3d): any;
set(x: number, y: number, z: number): any;
setLength(length: number): any;
setToProduct(vector: Vector3d, scale: number): any;
setToSum(vector1: Vector3d, vector2: Vector3d): any;
sub(vector: Vector3d): any;
toArray(): number[];
transformBy(matrix: any): any;
get x(): number;
set x(x: number);
get y(): number;
set y(y: number);
get z(): number;
set z(z: number);
}
export interface Matrix3d {
det(): number;
get(row: number, col: number): number;
getCoordSystem(origin: Point3d, xAxis: Vector3d, yAxis: Vector3d, zAxis: Vector3d): any;
getCsOrigin(): Point3d;
getCsXAxis(): Vector3d;
getCsYAxis(): Vector3d;
getCsZAxis(): Vector3d;
invert(): Matrix3d;
isEqualTo(): any;
isPerspective(): any;
isScaledOrtho(): any;
isSingular(): any;
isUniScaledOrtho(): any;
norm(): number;
postMultBy(rightSide: Matrix3d): Matrix3d;
preMultBy(leftSide: Matrix3d): Matrix3d;
scale(): any;
set(row: number, col: number, value: number): any;
setCoordSystem(origin: Point3d, xAxis: Vector3d, yAxis: Vector3d, zAxis: Vector3d): Matrix3d;
setToAlignCoordSys(fromOrigin: Point3d, fromXAxis: Vector3d, fromYAxis: Vector3d, fromZAxis: Vector3d, toOrigin: Point3d, toXAxis: Vector3d, toYAxis: Vector3d, toZAxis: Vector3d): any;
setToIdentity(): Matrix3d;
setToProduct(matrix1: Matrix3d, matrix2: any): Matrix3d;
setToProjection(projectionPlane: OdTvPlane, projectDir: Vector3d): Matrix3d;
setToRotation(angle: number, axis: Vector3, center: Point3d): Matrix3d;
setToScaling(arg0: any, arg1: any): any;
setToWorldToPlane(geVector3d: number[]): any;
setTranslation(vect: Vector3d): any;
transpose(): Matrix3d;
transposeIt(): Matrix3d;
validateZero(): void;
}
export interface OdTvPlane {
getOrigin(): any;
getUAxis(): any;
getVAxis(): any;
normal(): any;
set(point: number[], normal: OdTvVector): any;
set3ptr(uPnt: OdTvVector, origin: OdTvVector, vPnt: OdTvVector): any;
set4double(a: number, b: number, c: number, d: number): any;
setUV(origin: OdTvPoint, uAxis: OdTvPoint, vAxis: OdTvPoint): any;
}
export interface OdTvPoint {
setParam(controlPoints: any[]): any;
getParam(): any[];
getPointsCount(): number;
editPointsViaRange(startPos: number, points: any[]): any;
editPointsViaList(indPoints: any[], points: any[]): any;
setPointSize(value: number): any;
getPointSize(): number;
setPointColorsViaList(indPoints: any[], colors: any[]): any;
setPointColorsViaRange(indStart: number, nCount: number, colors: any[]): any;
getPointColor(ind: number): any;
setPointNormalsViaList(indPoints: any[], vectors: any[]): any;
setPointNormalsViaRange(indStart: number, vectors: any[]): any;
getPointNormal(ind: number): any;
}
export interface OdTvVector {
}