|
|
|
@ -60,12 +60,26 @@ export class EntityRef extends Entity
|
|
|
|
|
return new Vector3(1, 1, 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get BoundingBox()
|
|
|
|
|
{
|
|
|
|
|
return this.BoundingBoxInOCS.applyMatrix4(this.OCSNoClone);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get BoundingBoxInOCS()
|
|
|
|
|
{
|
|
|
|
|
let size = this.ScaleSize.x ? this.ScaleSize : this._Size;
|
|
|
|
|
return new Box3Ext(
|
|
|
|
|
size.clone().multiplyScalar(-0.5).add(this._Center),
|
|
|
|
|
size.clone().multiplyScalar(0.5).add(this._Center));
|
|
|
|
|
let box = new Box3Ext(
|
|
|
|
|
this._Size.clone().multiplyScalar(-0.5).add(this._Center),
|
|
|
|
|
this._Size.clone().multiplyScalar(0.5).add(this._Center));
|
|
|
|
|
|
|
|
|
|
if (this._ScaleSize.x)
|
|
|
|
|
{
|
|
|
|
|
box.applyMatrix4(new Matrix4().makeScale(
|
|
|
|
|
this._ScaleSize.x / this._Size.x,
|
|
|
|
|
this._ScaleSize.y / this._Size.y,
|
|
|
|
|
this._ScaleSize.z / this._Size.z,
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
return box;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CloneDrawObject(from: this)
|
|
|
|
|