///////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
// All rights reserved.
//
// This software and its documentation and related materials are owned by
// the Alliance. The software may only be incorporated into application
// programs owned by members of the Alliance, subject to a signed
// Membership Agreement and Supplemental Software License Agreement with the
// Alliance. The structure and organization of this software are the valuable
// trade secrets of the Alliance and its suppliers. The software is also
// protected by copyright law and international treaty provisions. Application
// programs incorporating this software must include the following statement
// with their copyright notices:
//
//   This application incorporates Open Design Alliance software pursuant to a
//   license agreement with Open Design Alliance.
//   Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
//   All rights reserved.
//
// By use of this software, its documentation or related materials, you
// acknowledge and accept the above terms.
///////////////////////////////////////////////////////////////////////////////
export interface Point2d {
  x: number;
  y: number;
}

export type Vector3 = [x: number, y: number, z: number];

export interface Point3d {
  add(point: Point3d);
  asVector(): Vector3d;
  distanceTo(point: Point3d);
  rotateBy(angle: number, vector: Vector3d);
  rotateByBasePoint(angle: number, vector: Vector3d, basePoint: Point3d);
  scaleBy(factor: number, basePoint: Point3d);
  set(x: number, y: number, z: number);
  setToProduct(matrix: any, point: Point3d);
  setToSum(point: Point3d, vector: Vector3d);
  sub(point: Point3d): Point3d;
  toArray(): number[];
  transformBy(matrix: any);
  translate(vector: Vector3d);
  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);
  angleTo(vector: Vector3d);
  angleToWithRef(vector: Vector3d, ref: Vector3d);
  asPoint(): Point3d;
  crossProduct(vector: Vector3d);
  dotProduct(vector: Vector3d);
  isEqualTo(vector: Vector3d): boolean;
  length(): number;
  lengthSqrd(): number;
  mirror();
  negate();
  normal();
  normalize();
  rotateBy(angle: number, vector: Vector3d);
  set(x: number, y: number, z: number);
  setLength(length: number);
  setToProduct(vector: Vector3d, scale: number);
  setToSum(vector1: Vector3d, vector2: Vector3d);
  sub(vector: Vector3d);
  toArray(): number[];
  transformBy(matrix: 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);
  getCsOrigin(): Point3d;
  getCsXAxis(): Vector3d;
  getCsYAxis(): Vector3d;
  getCsZAxis(): Vector3d;
  invert(): Matrix3d;
  isEqualTo();
  isPerspective();
  isScaledOrtho();
  isSingular();
  isUniScaledOrtho();
  norm(): number;
  postMultBy(rightSide: Matrix3d): Matrix3d;
  preMultBy(leftSide: Matrix3d): Matrix3d;
  scale();
  set(row: number, col: number, value: number);
  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
  );
  setToIdentity(): Matrix3d;
  setToProduct(matrix1: Matrix3d, matrix2): Matrix3d;
  setToProjection(projectionPlane: OdTvPlane, projectDir: Vector3d): Matrix3d;
  setToRotation(angle: number, axis: Vector3, center: Point3d): Matrix3d;
  setToScaling(arg0: any, arg1: any);
  setToWorldToPlane(geVector3d: number[]);
  setTranslation(vect: Vector3d);
  transpose(): Matrix3d;
  transposeIt(): Matrix3d;
  validateZero(): void;
}

export interface OdTvPlane {
  getOrigin();
  getUAxis();
  getVAxis();
  normal();
  set(point: number[], normal: OdTvVector);
  set3ptr(uPnt: OdTvVector, origin: OdTvVector, vPnt: OdTvVector);
  set4double(a: number, b: number, c: number, d: number);
  setUV(origin: OdTvPoint, uAxis: OdTvPoint, vAxis: OdTvPoint);
}

export interface OdTvPoint {
  setParam(controlPoints: any[]);
  getParam(): any[];
  getPointsCount(): number;
  editPointsViaRange(startPos: number, points: any[]);
  editPointsViaList(indPoints: any[], points: any[]);
  setPointSize(value: number);
  getPointSize(): number;
  setPointColorsViaList(indPoints: any[], colors: any[]);
  setPointColorsViaRange(indStart: number, nCount: number, colors: any[]);
  getPointColor(ind: number): any;
  setPointNormalsViaList(indPoints: any[], vectors: any[]);
  setPointNormalsViaRange(indStart: number, vectors: any[]);
  getPointNormal(ind: number);
}

// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export interface OdTvVector {}
