Skip to content

Commit

Permalink
Merge pull request #2 from pierotofy/multi
Browse files Browse the repository at this point in the history
Multi-thread support
  • Loading branch information
pierotofy committed Aug 31, 2020
2 parents 965d8b5 + 63fccf6 commit 755b960
Show file tree
Hide file tree
Showing 4 changed files with 193 additions and 244 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ cmake_minimum_required(VERSION 2.8)

set (CMAKE_CXX_STANDARD 11)
find_package(GDAL REQUIRED)
find_package(OpenMP REQUIRED)
if(OPENMP_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
include_directories(${GDAL_INCLUDE_DIR})

# Add compiler options.
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Fast generation of 2.5D meshes from elevation models.

## Dependencies

GDAL is the only dependency. To install it run:
GDAL and OpenMP are the only dependencies. To install it run:

```
sudo apt-get install -y libgdal-dev
sudo apt-get install -y libgdal-dev libomp-dev
```

## Building
Expand Down Expand Up @@ -40,6 +40,7 @@ make
| -maxTileLength | Max length of a tile. Smaller values take longer to process but reduce memory usage by splitting the meshing process into tiles. Defaults to `1000`. | |
| -aggressiveness | Value between `1` and `10` that specifies how "aggressive" the mesh simplification process should be at each iteration. Higher values simplify the mesh more aggressively but can decrease the fidelity of the mesh. Defaults to `5`. | |
| -bandNum | Raster band # to use. Defaults to `1`. | |
| -maxConcurrency | Maximum number of threads to use. Defaults to all CPUs available. | |
| -rtc | Use Relative To Center (RTC) X/Y coordinates in the output PLY mesh. This can be useful since most 3D visualization software use floating coordinate precision to represent vertices and using absolute coordinates might lead to jittering artifacts. | |
| -verbose | Print verbose output. | |

Expand Down
Loading

0 comments on commit 755b960

Please sign in to comment.