|
|
@ -174,14 +174,20 @@ export class ExtrudeSolid extends Entity
|
|
|
|
|
|
|
|
|
|
|
|
ApplyMatrix(m: Matrix4)
|
|
|
|
ApplyMatrix(m: Matrix4)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
//暂时关闭更新,避免内部实体还没有更新位置时,先更新了实体的Geometry,导致后续没有进行更新
|
|
|
|
|
|
|
|
let updateBak = this.AutoUpdate;
|
|
|
|
|
|
|
|
this.AutoUpdate = false;
|
|
|
|
super.ApplyMatrix(m);
|
|
|
|
super.ApplyMatrix(m);
|
|
|
|
for (let g of this.grooves)
|
|
|
|
for (let g of this.grooves)
|
|
|
|
g.ApplyMatrix(m);
|
|
|
|
g.ApplyMatrix(m);
|
|
|
|
|
|
|
|
|
|
|
|
//由于修改矩阵会导致矩阵错误
|
|
|
|
//由于修改矩阵会导致矩阵错误
|
|
|
|
this.csg = undefined;
|
|
|
|
this.csg = undefined;
|
|
|
|
|
|
|
|
this.AutoUpdate = updateBak;
|
|
|
|
if (!equaln(m.getMaxScaleOnAxis(), 1))
|
|
|
|
if (!equaln(m.getMaxScaleOnAxis(), 1))
|
|
|
|
this.Update(UpdateDraw.Geometry);
|
|
|
|
this.Update(UpdateDraw.Geometry);
|
|
|
|
|
|
|
|
else if (this.AutoUpdate)
|
|
|
|
|
|
|
|
this.DeferUpdate();
|
|
|
|
return this;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
protected ApplyScaleMatrix(m: Matrix4): this
|
|
|
|
protected ApplyScaleMatrix(m: Matrix4): this
|
|
|
@ -1411,8 +1417,6 @@ export class ExtrudeSolid extends Entity
|
|
|
|
if (this._MeshGeometry)
|
|
|
|
if (this._MeshGeometry)
|
|
|
|
return this._MeshGeometry;
|
|
|
|
return this._MeshGeometry;
|
|
|
|
|
|
|
|
|
|
|
|
this.csg = undefined;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.thickness <= 0)
|
|
|
|
if (this.thickness <= 0)
|
|
|
|
return new BufferGeometry();
|
|
|
|
return new BufferGeometry();
|
|
|
|
|
|
|
|
|
|
|
@ -1511,16 +1515,6 @@ export class ExtrudeSolid extends Entity
|
|
|
|
this.NeedUpdateFlag |= UpdateDraw.Geometry;
|
|
|
|
this.NeedUpdateFlag |= UpdateDraw.Geometry;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (this.NeedUpdateFlag & UpdateDraw.Geometry)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (this._MeshGeometry && this._CacheDrawObject.size === 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
this._MeshGeometry.dispose();
|
|
|
|
|
|
|
|
this._MeshGeometry = undefined;
|
|
|
|
|
|
|
|
this.csg = undefined;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
super.DeferUpdate();
|
|
|
|
super.DeferUpdate();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|