|
|
|
@ -22,22 +22,18 @@ export class SelectSetBase
|
|
|
|
|
{
|
|
|
|
|
//选择类型
|
|
|
|
|
m_SelectType: SelectType = SelectType.None;
|
|
|
|
|
|
|
|
|
|
//选择的视图
|
|
|
|
|
m_Viewer: Viewer;
|
|
|
|
|
m_ViewerHeight: number;
|
|
|
|
|
|
|
|
|
|
m_ViewerWindowWidth: number;
|
|
|
|
|
m_ViewerWindowHeight: number;
|
|
|
|
|
//视图矩阵..
|
|
|
|
|
m_ViewMatrix: THREE.Matrix4;
|
|
|
|
|
m_ProjScreenMatrix = new Matrix4();
|
|
|
|
|
m_ViewmatrixWorldInverse: THREE.Matrix4;
|
|
|
|
|
|
|
|
|
|
m_SelectList = new Array<THREE.Object3D>();
|
|
|
|
|
|
|
|
|
|
constructor(view: Viewer)
|
|
|
|
|
{
|
|
|
|
|
this.m_Viewer = view;
|
|
|
|
|
this.m_ViewerHeight = view.m_ViewHeight;
|
|
|
|
|
|
|
|
|
|
this.m_ViewerWindowWidth = view.m_HtmlElement.scrollWidth;
|
|
|
|
|
this.m_ViewerWindowHeight = view.m_HtmlElement.scrollHeight;
|
|
|
|
@ -45,9 +41,6 @@ export class SelectSetBase
|
|
|
|
|
let camera = view.m_Camera.m_CurCamera;
|
|
|
|
|
|
|
|
|
|
this.m_ProjScreenMatrix.multiplyMatrices(camera.projectionMatrix, camera.matrixWorldInverse);
|
|
|
|
|
|
|
|
|
|
this.m_ViewMatrix = camera.matrix.clone();
|
|
|
|
|
this.m_ViewmatrixWorldInverse = camera.matrixWorldInverse.clone();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
WorldToScreenPoint(pt: THREE.Vector3)
|
|
|
|
@ -79,29 +72,6 @@ export class SelectSetBase
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// /**
|
|
|
|
|
// * 获得投影的点表.
|
|
|
|
|
// *
|
|
|
|
|
// * @param {THREE.Vector3} planDir
|
|
|
|
|
// * @returns {Array<Vector3>}
|
|
|
|
|
// * @memberof SelectBox
|
|
|
|
|
// */
|
|
|
|
|
// getProjectionPts(planDir: THREE.Vector3): Array<Vector3>
|
|
|
|
|
// {
|
|
|
|
|
// if (GeUtils.isParallelTo(planDir, this.m_ViewNormal))
|
|
|
|
|
// return [];
|
|
|
|
|
// let dirStr = GeUtils.ptToString(planDir);
|
|
|
|
|
// if (this.m_SelPolyPtsBuff.has(dirStr))
|
|
|
|
|
// return this.m_SelPolyPtsBuff.get(dirStr)
|
|
|
|
|
// let plan = new PlaneExt(planDir);
|
|
|
|
|
// let pts = this.m_SelPolyPts.map(p =>
|
|
|
|
|
// {
|
|
|
|
|
// let l = new THREE.Line3(p, p.clone().add(this.m_ViewNormal));
|
|
|
|
|
// return plan.intersectLine(l, null, true);
|
|
|
|
|
// });
|
|
|
|
|
// this.m_SelPolyPtsBuff.set(dirStr, pts);
|
|
|
|
|
// return pts;
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|