|
|
|
@ -129,6 +129,29 @@ export class Region extends Entity
|
|
|
|
|
this._ShapeManager.ShapeList.forEach(s => s.ApplyMatrix(m));
|
|
|
|
|
return super.ApplyMatrix(m);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get Position()
|
|
|
|
|
{
|
|
|
|
|
return super.Position;
|
|
|
|
|
}
|
|
|
|
|
set Position(pt: Vector3)
|
|
|
|
|
{
|
|
|
|
|
this.WriteAllObjectRecord();
|
|
|
|
|
let moveX = pt.x - this._Matrix.elements[12];
|
|
|
|
|
let moveY = pt.y - this._Matrix.elements[13];
|
|
|
|
|
let moveZ = pt.z - this._Matrix.elements[14];
|
|
|
|
|
this._Matrix.setPosition(pt);
|
|
|
|
|
this._SpaceOCS.elements[12] += moveX;
|
|
|
|
|
this._SpaceOCS.elements[13] += moveY;
|
|
|
|
|
this._SpaceOCS.elements[14] += moveZ;
|
|
|
|
|
|
|
|
|
|
let m = new Matrix4().setPosition(moveX, moveY, moveZ);
|
|
|
|
|
for (let s of this.ShapeManager.ShapeList)
|
|
|
|
|
s.ApplyMatrix(m);
|
|
|
|
|
|
|
|
|
|
this.Update(UpdateDraw.Matrix);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected ApplyScaleMatrix(m: Matrix4): this
|
|
|
|
|
{
|
|
|
|
|
this.WriteAllObjectRecord();
|
|
|
|
@ -201,7 +224,7 @@ export class Region extends Entity
|
|
|
|
|
|
|
|
|
|
//多形状面域,需把geo移动到相对
|
|
|
|
|
let geometry = new ShapeGeometry(shape.Shape, 60);//60 可以优化.
|
|
|
|
|
let diffMat = this.OCSInv.clone().multiply(shape.Outline.Curve.OCS);
|
|
|
|
|
let diffMat = this.OCSInv.clone().multiply(shape.Outline.Curve.OCSNoClone);
|
|
|
|
|
geometry.applyMatrix4(diffMat);
|
|
|
|
|
ScaleUV(geometry);
|
|
|
|
|
if (type === RenderType.Wireframe)
|
|
|
|
|