64 lines
		
	
	
		
			2.7 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
			
		
		
	
	
			64 lines
		
	
	
		
			2.7 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
| import McGiWorldDraw from '../McGiWorldDraw';
 | |
| import MxDbEntity from '../MxDbEntity';
 | |
| import { MxColorType, UnstableColor } from '../MxType';
 | |
| import drawMxDb2LineAngularDimension from './draw';
 | |
| declare class MxDb2LineAngularDimension extends MxDbEntity {
 | |
|     static cmd: string;
 | |
|     static draw: typeof drawMxDb2LineAngularDimension;
 | |
|     /**
 | |
|      * MxDb2LineAngularDimension
 | |
|      * 显示角度测量的图形
 | |
|      * @param  options.points [point1(起始点)、point2(角顶点)、point3(结束点)]
 | |
|      * @param  options.colors [起始线段颜色, 结束线段颜色, 标注角度圆弧颜色, 文字标注的角度颜色]
 | |
|      * @example
 | |
|      * ``` typescript
 | |
|      * const draw = Mx.MxFun.getCurrentDraw();
 | |
|      * const points = [ getPoint.value(),
 | |
|      *          getPoint.value().add(new THREE.Vector3(8880, 0, 0)),
 | |
|      *          getPoint.value().add(new THREE.Vector3(0, 6666, 0)),
 | |
|      *       ]
 | |
|      * const colors = ['#F00880','#00ff1a', void 0, 0XFF0000]
 | |
|      * const obj = new Mx.MxDb2LineAngularDimension().setPoints(points).setColor(colors).setLineWidth(6)
 | |
|      * draw.addMxEntity(obj)
 | |
|      * ```
 | |
|      **/
 | |
|     constructor(options?: {
 | |
|         /** 传入三个位置THREE向量 分别对应 属性: point1(起始点)、point2(角顶点)、point3(结束点) 计算角度 */
 | |
|         points?: THREE.Vector3[];
 | |
|         /**  colors 各标注的颜色设置:
 | |
|          * [起始线段颜色, 结束线段颜色, 标注角度圆弧颜色, 文字标注的角度颜色]
 | |
|          * 某一项为null或undefined采用绘制颜色 */
 | |
|         colors?: UnstableColor[];
 | |
|     });
 | |
|     point1: import("three").Vector3;
 | |
|     point2: import("three").Vector3;
 | |
|     point3: import("three").Vector3;
 | |
|     /**
 | |
|      * colors 各标注的颜色设置:
 | |
|      * [起始线段颜色, 结束线段颜色, 标注角度圆弧颜色, 文字标注的角度颜色]
 | |
|      * 某一项为null或undefined采用绘制颜色
 | |
|      * */
 | |
|     colors: UnstableColor[];
 | |
|     private calculateLineAngle;
 | |
|     /**
 | |
|      * 设置point1 、 point2、point3 向量位置
 | |
|      * @param { THREE.Vector3[] } points
 | |
|      */
 | |
|     setPoints(points: THREE.Vector3[]): this;
 | |
|     /**
 | |
|      * 设置颜色组合
 | |
|      * @param colors [起始线段颜色, 结束线段颜色, 标注角度圆弧颜色, 文字标注的角度颜色]
 | |
|      * 某一项为null或undefined采用绘制颜色 || 单颜色
 | |
|      * */
 | |
|     setColor(colors: UnstableColor[] | MxColorType): this;
 | |
|     worldDraw(pWorldDraw: McGiWorldDraw): void;
 | |
|     getGripPoints(): import("three").Vector3[];
 | |
|     moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
 | |
|     dwgIn(obj: any): boolean;
 | |
|     dwgOut(obj: any): any;
 | |
|     create(): MxDb2LineAngularDimension;
 | |
|     transformBy(mat: THREE.Matrix4): void;
 | |
|     getTypeName(): string;
 | |
| }
 | |
| export default MxDb2LineAngularDimension;
 |