|
|
|
@ -634,7 +634,7 @@ export class DrawDoorTool
|
|
|
|
|
{
|
|
|
|
|
if (!IsHinge(ironware)) continue;
|
|
|
|
|
|
|
|
|
|
if (!this.IsIntersects(realityBox, otherEnt.Entitys)) continue;
|
|
|
|
|
if (!this.IsIntersects(realityBox, [otherEnt])) continue;
|
|
|
|
|
|
|
|
|
|
if (IsDoor(otherEnt))
|
|
|
|
|
{
|
|
|
|
@ -941,19 +941,26 @@ export class DrawDoorTool
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private IsIntersects(enBox: Box3, checkEnts: Entity[]): boolean
|
|
|
|
|
private IsIntersects(enBox: Box3, checkEnts: Entity[], parentOCS?: Matrix4): boolean
|
|
|
|
|
{
|
|
|
|
|
for (let checkEnt of checkEnts)
|
|
|
|
|
{
|
|
|
|
|
if (checkEnt instanceof HardwareCompositeEntity)
|
|
|
|
|
if (this.IsIntersects(enBox, checkEnt.Entitys))
|
|
|
|
|
return true;
|
|
|
|
|
else continue;
|
|
|
|
|
{
|
|
|
|
|
let ocs = checkEnt.OCSNoClone;
|
|
|
|
|
if (parentOCS) ocs = new Matrix4().multiplyMatrices(parentOCS, ocs);
|
|
|
|
|
|
|
|
|
|
if (this.IsIntersects(enBox, checkEnt.Entitys, ocs))
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
let box = checkEnt.BoundingBox as Box3Ext;
|
|
|
|
|
if (parentOCS) box.applyMatrix4(parentOCS);
|
|
|
|
|
if (box.intersectsBox(enBox, 10))
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|