start implementing area trace
This commit is contained in:
parent
b9ee9308e9
commit
a02e4867c6
4 changed files with 96 additions and 20 deletions
|
|
@ -70,11 +70,15 @@ export class Polygon {
|
|||
return bounds;
|
||||
}
|
||||
|
||||
getBounds3D() {
|
||||
let bounds = new THREE.Box3();
|
||||
getBounds3D(bounds = new THREE.Box3()) {
|
||||
for (let point of this.points) {
|
||||
bounds.expandByPoint(point);
|
||||
}
|
||||
if (this.inner) {
|
||||
for (let i of this.inner) {
|
||||
i.getBounds3D(bounds);
|
||||
}
|
||||
}
|
||||
return bounds;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue