use of com.revolsys.geometry.model.Triangle in project com.revolsys.open by revolsys.
the class TriangulatedIrregularNetworkLayerRenderer method render.
@Override
public void render(final Viewport2D viewport, final Cancellable cancellable, final TriangulatedIrregularNetworkLayer layer) {
final double scaleForVisible = viewport.getScaleForVisible();
if (layer.isVisible(scaleForVisible)) {
if (!layer.isEditable()) {
final TriangulatedIrregularNetwork tin = layer.getTin();
if (tin != null) {
try (BaseCloseable transformCloseable = viewport.setUseModelCoordinates(true)) {
for (final Triangle triangle : cancellable.cancellable(tin.getTriangles(viewport.getBoundingBox()))) {
final Geometry convertedTriangle = tin.convertGeometry(triangle);
viewport.drawGeometry(convertedTriangle, this.style);
}
}
}
}
}
}
Aggregations