同步代码

This commit is contained in:
ChenX
2023-10-13 09:52:24 +08:00
parent 9c91cdaec4
commit 5cc4e64b73
43 changed files with 3245 additions and 2554 deletions

View File

@@ -1,4 +1,4 @@
import { BufferGeometry, Geometry, Vector3 } from "three";
import { BufferGeometry, Geometry, Vector2, Vector3 } from "three";
import { LineGeometry } from "three/examples/jsm/lines/LineGeometry";
import { Curve } from "../DatabaseServices/Entity/Curve";
import { Polyline } from "../DatabaseServices/Entity/Polyline";
@@ -8,14 +8,30 @@ import { Polyline } from "../DatabaseServices/Entity/Polyline";
*/
export declare class SweepGeometry extends Geometry {
edgePts: number[];
polygonIndexes: any[];
ShapeMaterialSlotData: number[];
constructor(contour: Polyline, path: Curve[] | Curve, ShapeMaterialSlotData?: number[]);
get LineGeom(): LineGeometry;
get EdgeGeom(): BufferGeometry;
AddShape(contour: Polyline, path: Curve): void;
AddShape2(contour: Polyline, paths: Curve[]): void;
private BuildSideFaces;
private BuildLid;
/**
* 使用4点构建面
* @param a 左下
* @param b 右下
* @param c 左上
* @param d 右上
* @param uvs
* @param [materialIndex]
*/
protected BuildFace4(a: number, b: number, c: number, d: number, uvs: Vector2[], materialIndex?: number): void;
/**
* 构造边缘面开始标记
* @param dir 前进方向(单位向量)
*/
protected SideStartMark(dir: Vector3): void;
protected BuildSideFaces(shapePts2d: Vector2[], pathPts2d: Vector2[], pathPts: Vector3[], verts: Vector3[][]): void;
protected BuildLid(shapePts2d: Vector2[], verts: Vector3[][]): void;
}
/**
* 将轮廓变换到`路径上某个点`.
@@ -28,4 +44,20 @@ export declare class SweepGeometry extends Geometry {
* @returns 变换后的轮廓点表
*/
export declare function ProjectionToPlane(contourPts: Vector3[], normal: Vector3, curP: Vector3, preP?: Vector3, nextP?: Vector3): Vector3[];
type Polygon = number[];
export declare class SweepGeometrySimple extends SweepGeometry {
SidePolygons: (Polygon[])[];
private _curSidePolygons;
private _curDir;
TriFaces: (number[])[];
shapeVerts: Vector3[][];
shapePts2d: Vector2[];
computeVertexNormals(): void;
computeFaceNormals(): void;
BuildFace4(a: number, b: number, c: number, d: number, uvs: Vector2[], materialIndex?: number): void;
protected SideStartMark(dir: Vector3): void;
protected BuildSideFaces(shapePts2d: Vector2[], pathPts2d: Vector2[], pathPts: Vector3[], verts: Vector3[][]): void;
protected BuildLid(shapePts2d: Vector2[], verts: Vector3[][]): void;
}
export {};
//# sourceMappingURL=SweepGeometry.d.ts.map