|
|
|
@ -1,12 +1,10 @@
|
|
|
|
|
import hotkeys from 'hotkeys-js-ext';
|
|
|
|
|
import { Curve, MathUtils, Matrix4, Vector3 } from 'three';
|
|
|
|
|
import { MathUtils, Vector3 } from 'three';
|
|
|
|
|
import { end } from 'xaop';
|
|
|
|
|
import { app } from '../ApplicationServices/Application';
|
|
|
|
|
import { InputState } from '../Common/InputState';
|
|
|
|
|
import { KeyBoard, MouseKey } from '../Common/KeyEnum';
|
|
|
|
|
import { GetEntity } from '../Common/Utils';
|
|
|
|
|
import { Entity } from '../DatabaseServices/Entity/Entity';
|
|
|
|
|
import { GetBox, IsBetweenA2B } from '../Geometry/GeUtils';
|
|
|
|
|
import { IsBetweenA2B } from '../Geometry/GeUtils';
|
|
|
|
|
import { CursorMode } from '../GraphicsSystem/Cursor';
|
|
|
|
|
import { IViewer } from '../GraphicsSystem/IView';
|
|
|
|
|
import { Viewer } from '../GraphicsSystem/Viewer';
|
|
|
|
@ -98,24 +96,8 @@ export class SelectControls implements EditorService
|
|
|
|
|
|
|
|
|
|
if (this._Viewer.OutlinePass.selectedObjects.length > 0)
|
|
|
|
|
{
|
|
|
|
|
let obj = this._Viewer.OutlinePass.selectedObjects[0];
|
|
|
|
|
|
|
|
|
|
let ocs: Matrix4;
|
|
|
|
|
let ent = GetEntity(obj);
|
|
|
|
|
if (ent instanceof Curve)
|
|
|
|
|
{
|
|
|
|
|
ocs = ent.OCS;
|
|
|
|
|
let box = GetBox(obj);
|
|
|
|
|
if (!box.isEmpty())
|
|
|
|
|
ocs.setPosition(box.getCenter(new Vector3()));
|
|
|
|
|
}
|
|
|
|
|
else if (ent instanceof Entity)
|
|
|
|
|
ocs = ent.OCS;
|
|
|
|
|
else
|
|
|
|
|
ocs = obj.matrixWorld.clone();
|
|
|
|
|
|
|
|
|
|
this._Editor.TransCtrl._Ents = this.SelectSet.SelectEntityList;
|
|
|
|
|
this._Editor.TransCtrl.Matrix = ocs;
|
|
|
|
|
this._Editor.TransCtrl.UpdateMtxFromEntity();
|
|
|
|
|
this._Editor.TransCtrl.Enable = true;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|