Skip to content

Commit

Permalink
Major code refactor (#53)
Browse files Browse the repository at this point in the history
* Remove rayMetaGeometry and refactor rayBoundary

* Refactor rayGeometry

* Refactor rayHitCounter

* Refactor rayMessage

* Remove rayPreCompileMacros header

* Refactor raySource

* Refactor rayTrace

* Refactor rayTraceKernel

* Refactor rayUtil

* Add option to enable progress bar

* Move rayTraceDirection and rayDataLog to rayUtil

* Bump version

* Add missing header

* Enable _USE_MATH_DEFINES

* Test _USE_MATH_DEFINES

* Test _USE_MATH_DEFINES again

* Define M_PI if not defined

* Remove old assert
  • Loading branch information
tobre1 authored Apr 11, 2024
1 parent 9d2eac1 commit e8da29f
Show file tree
Hide file tree
Showing 24 changed files with 875 additions and 993 deletions.
12 changes: 9 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR)
project(
ViennaRay
LANGUAGES CXX
VERSION 2.0.4)
VERSION 2.1.0)

# --------------------------------------------------------------------------------------------------------
# Library switches
Expand All @@ -15,10 +15,12 @@ option(VIENNARAY_DISABLE_COPY "Disable Embree Environment setup" OFF)
option(VIENNARAY_LEGACY_OPENMP "Use legacy OpenMP flags" OFF)

option(VIENNARAY_USE_WDIST "Enable weighted distribution of ray weights" OFF)
option(VIENNARAY_PRINT_PROGRESS "Enable progress bar" OFF)

option(VIENNARAY_BUILD_EXAMPLES "Build examples" OFF)
option(VIENNARAY_BUILD_TESTS "Build tests" OFF)

if (VIENNARAY_LEGACY_OPENMP)
if(VIENNARAY_LEGACY_OPENMP)
message(STATUS "[ViennaRay] Using legacy OpenMP flags")

find_package(OpenMP REQUIRED)
Expand Down Expand Up @@ -93,6 +95,10 @@ if(VIENNARAY_USE_WDIST)
target_compile_definitions(${PROJECT_NAME} INTERFACE VIENNARAY_USE_WDIST)
endif()

if(VIENNARAY_PRINT_PROGRESS)
target_compile_definitions(${PROJECT_NAME} INTERFACE VIENNARAY_PRINT_PROGRESS)
endif()

if(EMBREE_RAY_MASK)
message(STATUS "[ViennaRay] Using embree ray masking")
target_compile_definitions(${PROJECT_NAME} INTERFACE VIENNARAY_USE_RAY_MASKING)
Expand Down Expand Up @@ -133,7 +139,7 @@ CPMFindPackage(
GIT_REPOSITORY "https://github.com/embree/embree"
OPTIONS "EMBREE_TUTORIALS OFF")

if (NOT VIENNARAY_LEGACY_OPENMP)
if(NOT VIENNARAY_LEGACY_OPENMP)
find_package(OpenMP REQUIRED)
target_link_libraries(${PROJECT_NAME} INTERFACE OpenMP::OpenMP_CXX)
endif()
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ We recommend using [CPM.cmake](https://github.com/cpm-cmake/CPM.cmake) to consum
* Installation with CPM

```cmake
CPMAddPackage("gh:viennatools/viennaray@2.0.1")
CPMAddPackage("gh:viennatools/viennaray@2.1.0")
```

* With a local installation
Expand Down
Loading

0 comments on commit e8da29f

Please sign in to comment.