use of com.revolsys.geometry.index.quadtree.QuadTree in project com.revolsys.open by revolsys.
the class IntArrayScaleTriangulatedIrregularNetwork method getTriangleSpatialIndex.
public QuadTree<Triangle> getTriangleSpatialIndex() {
if (this.triangleSpatialIndex == null) {
final QuadTree<Triangle> index = new QuadTree<>(this.geometryFactory);
forEachTriangle((x1, y1, z1, x2, y2, z2, x3, y3, z3) -> {
final Triangle triangle = new TriangleDoubleXYZ(x1, y1, z1, x2, y2, z2, x3, y3, z3);
final BoundingBox boundingBox = triangle.getBoundingBox();
index.insertItem(boundingBox, triangle);
});
this.triangleSpatialIndex = index;
}
return this.triangleSpatialIndex;
}
Aggregations