Skip to content

Type Alias: RefGeom ​

RefGeom = { kind: "point"; normal?: Vec3Tuple; point: Vec3Tuple; } | { kind: "plane"; normal: Vec3Tuple; } | { axisDir: Vec3Tuple; axisPoint: Vec3Tuple; kind: "cylinder"; radius: number; } | { axisDir: Vec3Tuple; axisPoint: Vec3Tuple; kind: "cone"; } | { axisDir: Vec3Tuple; axisPoint: Vec3Tuple; kind: "torus"; majorRadius: number; } | { dir: Vec3Tuple; kind: "line"; point: Vec3Tuple; } | { center: Vec3Tuple; kind: "circle"; normal: Vec3Tuple; radius: number; } | { center: Vec3Tuple; kind: "sphere"; radius: number; } | { kind: "vertex"; point: Vec3Tuple; }

Defined in: packages/viewer-core/src/public/refframe/frame_math.ts:20

参考几何。三级兜底的共同产物:级 1 的 tess 拟合只解得出 plane / cylinder / line / circle, 级 2 的 B-Rep 另外还给 cone / torus / sphere / vertex——它们的推导规则同 cylinder (轴向 + 轴上垂足)或退化为纯位置。

Union Members ​

Type Literal ​

{ kind: "point"; normal?: Vec3Tuple; point: Vec3Tuple; }

级 0 兜底:拾取点 + 可选拾取法向。normal 缺省时朝向回落世界轴。


Type Literal ​

{ kind: "plane"; normal: Vec3Tuple; }


Type Literal ​

{ axisDir: Vec3Tuple; axisPoint: Vec3Tuple; kind: "cylinder"; radius: number; }


Type Literal ​

{ axisDir: Vec3Tuple; axisPoint: Vec3Tuple; kind: "cone"; }

圆锥只取轴,不取半角——参考系要的是「一个原点 + 一根轴」,锥角不进帧。


Type Literal ​

{ axisDir: Vec3Tuple; axisPoint: Vec3Tuple; kind: "torus"; majorRadius: number; }


Type Literal ​

{ dir: Vec3Tuple; kind: "line"; point: Vec3Tuple; }


Type Literal ​

{ center: Vec3Tuple; kind: "circle"; normal: Vec3Tuple; radius: number; }


Type Literal ​

{ center: Vec3Tuple; kind: "sphere"; radius: number; }

球:只有位置可用,朝向回落世界轴(球面处处法向不同,取拾取处的法向没有基准意义)。


Type Literal ​

{ kind: "vertex"; point: Vec3Tuple; }