xl-public-utils 1.0.15 → 1.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +26 -5
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import vtkRenderer from "@kitware/vtk.js/Rendering/Core/Renderer";
|
|
|
3
3
|
import { mat3, mat4, vec3 } from "gl-matrix";
|
|
4
4
|
import vtkInteractorStyleManipulator from "@kitware/vtk.js/Interaction/Style/InteractorStyleManipulator.js"
|
|
5
5
|
import vtkRenderWindowInteractor from "@kitware/vtk.js/Rendering/Core/RenderWindowInteractor.js";
|
|
6
|
+
import { TypedArray } from "@kitware/vtk.js/types";
|
|
6
7
|
|
|
7
8
|
declare module "xl-public-utils" {
|
|
8
9
|
|
|
@@ -415,6 +416,13 @@ declare module "xl-public-utils" {
|
|
|
415
416
|
* @returns {vec3[]} 平滑之后的点
|
|
416
417
|
*/
|
|
417
418
|
export function smoothCurve(points: vec3[], smoothSize?: number): vec3[];
|
|
419
|
+
/**
|
|
420
|
+
* 计算曲线长度
|
|
421
|
+
* @param {vec3[]} points 曲线
|
|
422
|
+
* @returns {number} 曲线长度
|
|
423
|
+
*/
|
|
424
|
+
|
|
425
|
+
export function getCurveLength(points: vec3[]): number;
|
|
418
426
|
/**
|
|
419
427
|
* 表示一个包含三个轴向的对象
|
|
420
428
|
* @typedef {Object} AxisObject
|
|
@@ -538,6 +546,19 @@ declare module "xl-public-utils" {
|
|
|
538
546
|
*/
|
|
539
547
|
normal: vec3;
|
|
540
548
|
};
|
|
549
|
+
/**
|
|
550
|
+
* 复制一个polydata,只复制点和面的数据
|
|
551
|
+
* @param {vtkPolyData} originalPolyData 原始的polydata
|
|
552
|
+
* @returns {vtkPolyData} 新的polydata
|
|
553
|
+
*/
|
|
554
|
+
export function clonePolyData(originalPolyData: vtkPolyData): vtkPolyData;
|
|
555
|
+
/**
|
|
556
|
+
* 根据点和面创建一个vtkPolydata
|
|
557
|
+
* @param {number[] | TypedArray} verts
|
|
558
|
+
* @param {number[] | TypedArray} faces
|
|
559
|
+
* @returns { vtkPolyData } 生成出来的vtkPolydata
|
|
560
|
+
*/
|
|
561
|
+
export function createPolyData(verts: number[] | TypedArray, faces: number[] | TypedArray): vtkPolyData
|
|
541
562
|
}
|
|
542
563
|
export namespace drcUtils {
|
|
543
564
|
export type AttrOption = {
|
|
@@ -702,10 +723,10 @@ declare module "xl-public-utils" {
|
|
|
702
723
|
radius: number,
|
|
703
724
|
wall: number,
|
|
704
725
|
height: number,
|
|
705
|
-
center: vec3
|
|
706
|
-
axisX: vec3
|
|
707
|
-
axisY: vec3
|
|
708
|
-
axisZ: vec3
|
|
726
|
+
center: vec3,
|
|
727
|
+
axisX: vec3,
|
|
728
|
+
axisY: vec3,
|
|
729
|
+
axisZ: vec3
|
|
709
730
|
): vtkPolyData
|
|
710
731
|
}
|
|
711
732
|
|
|
@@ -1014,7 +1035,7 @@ declare module "xl-public-utils" {
|
|
|
1014
1035
|
bevelSize: number;
|
|
1015
1036
|
bevelEnabled: boolean;
|
|
1016
1037
|
}
|
|
1017
|
-
export interface IndexData { zeroIndexs: number[], oneIndexs: number[] }
|
|
1038
|
+
export interface IndexData { zeroIndexs: number[], oneIndexs: number[] }
|
|
1018
1039
|
export class FontManager {
|
|
1019
1040
|
private constructor(); // 使用单例模式
|
|
1020
1041
|
static Mgr(): FontManager;
|