feat(engine): add section axis clipping methods
This commit is contained in:
@@ -154,6 +154,56 @@ export class EngineManager extends BaseManager {
|
||||
return this.engineInstance.getCurrentMeasureType();
|
||||
}
|
||||
|
||||
/** 清除所有测量标注 */
|
||||
public clearAllMeasures(): void {
|
||||
if (!this.engineInstance) {
|
||||
return;
|
||||
}
|
||||
this.engineInstance.clearAllMeasures();
|
||||
}
|
||||
|
||||
/**
|
||||
* 激活轴向剖切
|
||||
* @param axis 要激活的轴向 ('x' | 'y' | 'z')
|
||||
*/
|
||||
public activateSectionAxis(axis: 'x' | 'y' | 'z'): void {
|
||||
if (!this.engineInstance) {
|
||||
console.warn('[EngineManager] 3D Engine not initialized.');
|
||||
return;
|
||||
}
|
||||
this.engineInstance.activateSectionAxis(axis);
|
||||
}
|
||||
|
||||
/**
|
||||
* 停用轴向剖切
|
||||
*/
|
||||
public deactivateSectionAxis(): void {
|
||||
if (!this.engineInstance) {
|
||||
return;
|
||||
}
|
||||
this.engineInstance.deactivateSectionAxis();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前剖切轴向
|
||||
* @returns 当前激活的轴向
|
||||
*/
|
||||
public getCurrentSectionAxis(): 'x' | 'y' | 'z' | null {
|
||||
if (!this.engineInstance) {
|
||||
return null;
|
||||
}
|
||||
return this.engineInstance.getCurrentSectionAxis();
|
||||
}
|
||||
|
||||
/** 激活框选放大功能 */
|
||||
public activateZoomBox(): void {
|
||||
if (!this.engineInstance) {
|
||||
console.warn('[EngineManager] 3D Engine not initialized.');
|
||||
return;
|
||||
}
|
||||
this.engineInstance.activateZoomBox();
|
||||
}
|
||||
|
||||
/** 销毁引擎管理器 */
|
||||
public destroy(): void {
|
||||
if (this.engineInstance) {
|
||||
|
||||
Reference in New Issue
Block a user