diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000000..4df495e28f --- /dev/null +++ b/.clang-format @@ -0,0 +1,3 @@ +BasedOnStyle: LLVM +IndentWidth: 2 + diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..3baffa5fad --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,64 @@ +{ + "files.associations": { + "map": "cpp", + "queue": "cpp", + "memory": "cpp", + "*.isph": "cpp", + "ranges": "cpp", + "cmath": "cpp", + "cstdarg": "cpp", + "cstddef": "cpp", + "cstdio": "cpp", + "cstdlib": "cpp", + "cstring": "cpp", + "atomic": "cpp", + "bit": "cpp", + "compare": "cpp", + "concepts": "cpp", + "cstdint": "cpp", + "algorithm": "cpp", + "iterator": "cpp", + "random": "cpp", + "type_traits": "cpp", + "utility": "cpp", + "initializer_list": "cpp", + "limits": "cpp", + "stdexcept": "cpp", + "cinttypes": "cpp", + "array": "cpp", + "cctype": "cpp", + "clocale": "cpp", + "condition_variable": "cpp", + "ctime": "cpp", + "cwchar": "cpp", + "cwctype": "cpp", + "deque": "cpp", + "set": "cpp", + "unordered_map": "cpp", + "vector": "cpp", + "exception": "cpp", + "fstream": "cpp", + "functional": "cpp", + "iomanip": "cpp", + "iosfwd": "cpp", + "iostream": "cpp", + "istream": "cpp", + "mutex": "cpp", + "new": "cpp", + "numbers": "cpp", + "optional": "cpp", + "ostream": "cpp", + "ratio": "cpp", + "semaphore": "cpp", + "sstream": "cpp", + "stop_token": "cpp", + "streambuf": "cpp", + "string": "cpp", + "string_view": "cpp", + "system_error": "cpp", + "thread": "cpp", + "tuple": "cpp", + "typeinfo": "cpp", + "__verbose_abort": "cpp" + } +} \ No newline at end of file diff --git a/common/cmake/clang.cmake b/common/cmake/clang.cmake index 2666d1be8b..b9603e0b7f 100644 --- a/common/cmake/clang.cmake +++ b/common/cmake/clang.cmake @@ -1,6 +1,8 @@ ## Copyright 2009-2021 Intel Corporation ## SPDX-License-Identifier: Apache-2.0 +INCLUDE(compiler_base) + MACRO(_SET_IF_EMPTY VAR VALUE) IF(NOT ${VAR}) SET(${VAR} "${VALUE}") @@ -9,7 +11,7 @@ ENDMACRO() IF (EMBREE_ARM) IF ("x86_64" IN_LIST CMAKE_OSX_ARCHITECTURES) - # set ARM an x86 flags for macOS universal binary build + # set ARM and x86 flags for macOS universal binary build SET(FLAGS_SSE2 "-D__SSE__ -D__SSE2__ -msse -msse2 -mno-sse4.2") SET(FLAGS_SSE42 "-D__SSE4_2__ -D__SSE4_1__ -msse4.2") SET(FLAGS_AVX "-D__AVX__ -D__SSE4_2__ -D__SSE4_1__ -D__BMI__ -D__BMI2__ -D__LZCNT__ -mavx") @@ -44,6 +46,8 @@ IF (WIN32) ELSE() SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /GS-") # do not protect against return address overrides ENDIF() + + # Stack protector override for specific files MACRO(DISABLE_STACK_PROTECTOR_FOR_FILE file) IF (EMBREE_STACK_PROTECTOR) SET_SOURCE_FILES_PROPERTIES(${file} PROPERTIES COMPILE_FLAGS "/GS-") @@ -87,28 +91,9 @@ ELSE() ENDIF() SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") # enables most warnings - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat -Wformat-security") # enables string format vulnerability warnings - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char") # treat char as signed on all processors, including ARM - IF (NOT APPLE) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE") # enables support for more secure position independent execution - ENDIF() - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") # generate position independent code suitable for shared libraries - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") # generate position independent code suitable for shared libraries - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") # enables C++11 features - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") # makes all symbols hidden by default - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden") # makes all inline symbols hidden by default - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing") # disables strict aliasing rules - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-tree-vectorize") # disable auto vectorizer - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORTIFY_SOURCE=2") # perform extra security checks for some standard library calls - IF (EMBREE_STACK_PROTECTOR) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector") # protects against return address overrides - ENDIF() - MACRO(DISABLE_STACK_PROTECTOR_FOR_FILE file) - IF (EMBREE_STACK_PROTECTOR) - SET_SOURCE_FILES_PROPERTIES(${file} PROPERTIES COMPILE_FLAGS "-fno-stack-protector") - ENDIF() - ENDMACRO() + APPLY_COMMON_COMPILER_FLAGS() + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") # enables C++11 features + CONFIGURE_STACK_PROTECTOR() IF (EMBREE_ADDRESS_SANITIZER) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fsanitize-address-use-after-scope -fno-omit-frame-pointer -fno-optimize-sibling-calls") @@ -120,36 +105,8 @@ ELSE() SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msimd128") # enable SIMD intrinsics ENDIF() - SET(CMAKE_CXX_FLAGS_DEBUG "") - SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g") # generate debug information - SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") # enable assertions - SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DTBB_USE_DEBUG") # configure TBB in debug mode - SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O3") # enable full optimizations - - SET(CMAKE_CXX_FLAGS_RELEASE "") - SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG") # disable assertions - SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3") # enable full optimizations - - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "") - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -g") # generate debug information - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DNDEBUG") # disable assertions - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O3") # enable full optimizations - - IF (APPLE) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.7") # makes sure code runs on older MacOSX versions - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") # link against libc++ which supports C++11 features - ELSE(APPLE) - IF (NOT EMBREE_ADDRESS_SANITIZER) # for address sanitizer this causes link errors - SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") # issues link error for undefined symbols in shared library - SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie") # enables position independent execution for executable - IF (NOT EMSCRIPTEN) - SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -z relro -z now") # re-arranges data sections to increase security - SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -z noexecstack") # we do not need an executable stack - SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -z relro -z now") # re-arranges data sections to increase security - SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -z noexecstack") # we do not need an executable stack - ENDIF() - ENDIF() - ENDIF(APPLE) - + APPLY_OPTIMIZATION_FLAGS() + APPLY_MACOS_FLAGS() + APPLY_LINUX_LINKER_FLAGS() ENDIF() diff --git a/common/cmake/compiler_base.cmake b/common/cmake/compiler_base.cmake new file mode 100644 index 0000000000..c920b627c3 --- /dev/null +++ b/common/cmake/compiler_base.cmake @@ -0,0 +1,94 @@ +## Copyright 2009-2022 Intel Corporation +## SPDX-License-Identifier: Apache-2.0 + +# Common compiler configuration macros shared between clang.cmake, dpcpp.cmake and gnu.cmake + +MACRO(_SET_IF_EMPTY VAR VALUE) + IF(NOT ${VAR}) + SET(${VAR} "${VALUE}") + ENDIF() +ENDMACRO() + +# Common security and visibility flags for non-Windows platforms +MACRO(APPLY_COMMON_COMPILER_FLAGS) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") # enables most warnings + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat -Wformat-security") # enables string format vulnerability warnings + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char") # treat char as signed on all processors, including ARM + IF (NOT APPLE) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE") # enables support for more secure position independent execution + ENDIF() + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") # generate position independent code suitable for shared libraries + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") # generate position independent code suitable for shared libraries + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") # makes all symbols hidden by default + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden") # makes all inline symbols hidden by default + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing") # disables strict aliasing rules + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-tree-vectorize") # disable auto vectorizer + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORTIFY_SOURCE=2") # perform extra security checks for some standard library calls +ENDMACRO() + +# Stack protector configuration +MACRO(CONFIGURE_STACK_PROTECTOR) + IF (EMBREE_STACK_PROTECTOR) + IF (WIN32 AND CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GS") # protects against return address overrides + ELSEIF (NOT WIN32) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector") # protects against return address overrides + ELSEIF (WIN32) + # MinGW or Clang on Windows - use GNU-style flag + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector") + ENDIF() + ELSEIF (WIN32 AND CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GS-") # do not protect against return address overrides + ENDIF() +ENDMACRO() + +MACRO(DISABLE_STACK_PROTECTOR_FOR_FILE file) + IF (EMBREE_STACK_PROTECTOR) + IF (WIN32 AND CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + SET_SOURCE_FILES_PROPERTIES(${file} PROPERTIES COMPILE_FLAGS "/GS-") + ELSE () + SET_SOURCE_FILES_PROPERTIES(${file} PROPERTIES COMPILE_FLAGS "-fno-stack-protector") + ENDIF() + ENDIF() +ENDMACRO() + +# Debug/Release optimization flags (non-Windows) +MACRO(APPLY_OPTIMIZATION_FLAGS) + SET(CMAKE_CXX_FLAGS_DEBUG "") + SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g") # generate debug information + SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") # enable assertions + SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DTBB_USE_DEBUG") # configure TBB in debug mode + SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O3") # enable full optimizations + + SET(CMAKE_CXX_FLAGS_RELEASE "") + SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG") # disable assertions + SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3") # enable full optimizations + + SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "") + SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -g") # generate debug information + SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DNDEBUG") # disable assertions + SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O3") # enable full optimizations +ENDMACRO() + +# macOS-specific linker flags +MACRO(APPLY_MACOS_FLAGS) + IF (APPLE) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.7") # makes sure code runs on older MacOSX versions + # Only use libc++ for Clang-based compilers; GCC on macOS doesn't support it + IF (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") # link against libc++ which supports C++11 features + ENDIF() + ENDIF() +ENDMACRO() + +# Linux/ELF-specific linker flags (not for Windows or macOS) +MACRO(APPLY_LINUX_LINKER_FLAGS) + IF (NOT APPLE AND NOT WIN32 AND NOT EMBREE_ADDRESS_SANITIZER AND NOT EMSCRIPTEN) + SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") # issues link error for undefined symbols in shared library + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie") # enables position independent execution for executable + SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -z relro -z now") # re-arranges data sections to increase security + SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -z noexecstack") # we do not need an executable stack + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -z relro -z now") # re-arranges data sections to increase security + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -z noexecstack") # we do not need an executable stack + ENDIF() +ENDMACRO() diff --git a/common/cmake/dpcpp.cmake b/common/cmake/dpcpp.cmake index a15c179ab9..ff6923638c 100644 --- a/common/cmake/dpcpp.cmake +++ b/common/cmake/dpcpp.cmake @@ -1,17 +1,36 @@ ## Copyright 2009-2022 Intel Corporation ## SPDX-License-Identifier: Apache-2.0 +INCLUDE(compiler_base) + MACRO(_SET_IF_EMPTY VAR VALUE) IF(NOT ${VAR}) SET(${VAR} "${VALUE}") ENDIF() ENDMACRO() -_SET_IF_EMPTY(FLAGS_SSE2 "-msse2") -_SET_IF_EMPTY(FLAGS_SSE42 "-msse4.2") -_SET_IF_EMPTY(FLAGS_AVX "-mavx") -_SET_IF_EMPTY(FLAGS_AVX2 "-mf16c -mavx2 -mfma -mlzcnt -mbmi -mbmi2") -_SET_IF_EMPTY(FLAGS_AVX512 "-march=skx") +IF (EMBREE_ARM) + IF ("x86_64" IN_LIST CMAKE_OSX_ARCHITECTURES) + # set ARM and x86 flags for macOS universal binary build + SET(FLAGS_SSE2 "-D__SSE__ -D__SSE2__ -msse -msse2 -mno-sse4.2") + SET(FLAGS_SSE42 "-D__SSE4_2__ -D__SSE4_1__ -msse4.2") + SET(FLAGS_AVX "-D__AVX__ -D__SSE4_2__ -D__SSE4_1__ -D__BMI__ -D__BMI2__ -D__LZCNT__ -mavx") + SET(FLAGS_AVX2 "-D__AVX2__ -D__AVX__ -D__SSE4_2__ -D__SSE4_1__ -D__BMI__ -D__BMI2__ -D__LZCNT__ -mf16c -mavx2 -mfma -mlzcnt -mbmi -mbmi2") + _SET_IF_EMPTY(FLAGS_AVX512 "-march=skx") + ELSE () + SET(FLAGS_SSE2 "-D__SSE__ -D__SSE2__") + SET(FLAGS_SSE42 "-D__SSE4_2__ -D__SSE4_1__") + SET(FLAGS_AVX "-D__AVX__ -D__SSE4_2__ -D__SSE4_1__ -D__BMI__ -D__BMI2__ -D__LZCNT__") + SET(FLAGS_AVX2 "-D__AVX2__ -D__AVX__ -D__SSE4_2__ -D__SSE4_1__ -D__BMI__ -D__BMI2__ -D__LZCNT__") + ENDIF () +ELSE () + # for `thread` keyword + _SET_IF_EMPTY(FLAGS_SSE2 "-msse2") + _SET_IF_EMPTY(FLAGS_SSE42 "-msse4.2") + _SET_IF_EMPTY(FLAGS_AVX "-mavx") + _SET_IF_EMPTY(FLAGS_AVX2 "-mf16c -mavx2 -mfma -mlzcnt -mbmi -mbmi2") + _SET_IF_EMPTY(FLAGS_AVX512 "-march=skx") +ENDIF () IF (NOT WIN32) OPTION(EMBREE_IGNORE_CMAKE_CXX_FLAGS "When enabled Embree ignores default CMAKE_CXX_FLAGS." ON) @@ -189,22 +208,17 @@ IF(SYCL_ONEAPI_ICX) ENDIF() ENDIF() -IF (EMBREE_STACK_PROTECTOR) - IF (SYCL_ONEAPI_ICX AND WIN32) +# Stack protector configuration (Windows ICX-specific handling) +IF (WIN32 AND SYCL_ONEAPI_ICX) + IF (EMBREE_STACK_PROTECTOR) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GS") # protects against return address overrides ELSE() - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector") # protects against return address overrides + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GS-") # do not protect against return address overrides ENDIF() +ELSE() + # Use shared stack protector macro for Unix and other platforms + CONFIGURE_STACK_PROTECTOR() ENDIF() -MACRO(DISABLE_STACK_PROTECTOR_FOR_FILE file) - IF (EMBREE_STACK_PROTECTOR) - IF (SYCL_ONEAPI_ICX AND WIN32) - SET_SOURCE_FILES_PROPERTIES(${file} PROPERTIES COMPILE_FLAGS "/GS-") - ELSE() - SET_SOURCE_FILES_PROPERTIES(${file} PROPERTIES COMPILE_FLAGS "-fno-stack-protector") - ENDIF() - ENDIF() -ENDMACRO() IF (SYCL_ONEAPI_ICX AND WIN32) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:precise") # makes dpcpp compiler compatible with clang++ diff --git a/common/cmake/gnu.cmake b/common/cmake/gnu.cmake index d43a1b534c..7cae52e8f4 100644 --- a/common/cmake/gnu.cmake +++ b/common/cmake/gnu.cmake @@ -1,6 +1,8 @@ ## Copyright 2009-2021 Intel Corporation ## SPDX-License-Identifier: Apache-2.0 +INCLUDE(compiler_base) + MACRO(_SET_IF_EMPTY VAR VALUE) IF(NOT ${VAR}) SET(${VAR} "${VALUE}") @@ -28,71 +30,24 @@ ENDIF() SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") IF (EMBREE_ARM) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char") # treat 'char' as 'signed char' SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flax-vector-conversions") # allow lax vector type conversions ENDIF (EMBREE_ARM) -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") # enables most warnings -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat -Wformat-security") # enables string format vulnerability warnings -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-class-memaccess") # disables clearing an object of type ‘XXX’ with no trivial copy-assignment; use assignment or value-initialization instead +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-class-memaccess") # disables clearing an object of type 'XXX' with no trivial copy-assignment; use assignment or value-initialization instead # these prevent compile to optimize away security checks SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-overflow") # assume that signed overflow occurs SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-delete-null-pointer-checks") # keep all checks for NULL pointers SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fwrapv") # this option instructs the compiler to assume that signed arithmetic overflow warps around. -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char") # treat char as signed on all processors, including ARM - -IF (NOT WIN32) - IF (NOT APPLE) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE") # enables support for more secure position independent execution - ENDIF() - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") # generate position independent code suitable for shared libraries - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") # generate position independent code suitable for shared libraries -ENDIF () +APPLY_COMMON_COMPILER_FLAGS() SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") # enables C++11 features -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") # makes all symbols hidden by default -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden") # makes all inline symbols hidden by default -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing") # disables strict aliasing rules -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-tree-vectorize") # disable auto vectorizer -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORTIFY_SOURCE=2") # perform extra security checks for some standard library calls -IF (EMBREE_STACK_PROTECTOR) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector") # protects against return address overrides -ENDIF() -MACRO(DISABLE_STACK_PROTECTOR_FOR_FILE file) - IF (EMBREE_STACK_PROTECTOR) - SET_SOURCE_FILES_PROPERTIES(${file} PROPERTIES COMPILE_FLAGS "-fno-stack-protector") - ENDIF() -ENDMACRO() +CONFIGURE_STACK_PROTECTOR() -SET(CMAKE_CXX_FLAGS_DEBUG "") -IF (EMBREE_ARM) - SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsigned-char") # treat 'char' as 'signed char' -ENDIF (EMBREE_ARM) -SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g") # generate debug information -SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") # enable assertions -SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DTBB_USE_DEBUG") # configure TBB in debug mode -SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O3") # enable full optimizations +APPLY_OPTIMIZATION_FLAGS() +APPLY_MACOS_FLAGS() -SET(CMAKE_CXX_FLAGS_RELEASE "") -IF (EMBREE_ARM) - SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fsigned-char") # treat 'char' as 'signed char' -ENDIF (EMBREE_ARM) -SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG") # disable assertions -SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3") # enable full optimizations - -SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "") -IF (EMBREE_ARM) - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -fsigned-char") # treat 'char' as 'signed char' -ENDIF (EMBREE_ARM) -SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -g") # generate debug information -SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DNDEBUG") # disable assertions -SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O3") # enable full optimizations - -IF (APPLE) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.7") # makes sure code runs on older MacOSX versions - # SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") # link against libc++ which supports C++11 features -ELSE(APPLE) +IF (NOT APPLE) IF (CMAKE_CXX_COMPILER_ID MATCHES "GNU") SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") # issues link error for undefined symbols in shared library SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -z noexecstack") # we do not need an executable stack @@ -101,5 +56,4 @@ ELSE(APPLE) SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -z relro -z now") # re-arranges data sections to increase security ENDIF () SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie") # enables position independent execution for executable -ENDIF(APPLE) - +ENDIF() diff --git a/diff.txt b/diff.txt new file mode 100644 index 0000000000..082aae2902 --- /dev/null +++ b/diff.txt @@ -0,0 +1,12383 @@ +diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml +index d82e0fbe8..0021dcb4b 100644 +--- a/.github/workflows/release.yml ++++ b/.github/workflows/release.yml +@@ -262,3 +262,22 @@ jobs: + artifact-in-macos: release-macosx-arm + path: "build/*.zip" + artifact-out-name: "antivirus-scan-arm" ++ ++ ++##################################################################### ++# Testing package ++##################################################################### ++ create-testing-package: ++ secrets: inherit ++ uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main ++ needs: [release-linux] ++ with: ++ image: embree/ubuntu:22.04 ++ runs-on: '[ "Linux", "docker" ]' ++ project: embree ++ artifact-in: release-linux ++ artifact-out: release-testing-PACKAGE-ZIP ++ artifact-path: ./build/*.tar.gz ++ cmd: | ++ rm build/embree-4.4.0.x86_64.linux.tar.gz ++ mv build/embree-4.4.0.x86_64.linux-testing.tar.gz build/embree-4.4.0-testing.tar.gz +\ No newline at end of file +diff --git a/CHANGELOG.md b/CHANGELOG.md +index 68c88c5f2..e1ad25c8f 100644 +--- a/CHANGELOG.md ++++ b/CHANGELOG.md +@@ -1,12 +1,20 @@ + Version History + --------------- + ++### Embree 4.4 ++ ++- Added support for passing geometry data to Embree using explicit host and SYCL device memory (see `rtcSetSharedGeometryBufferHostDevice`, `rtcNewBufferHostDevice`, and other API calls with `HostDevice` suffix). ++- Embree does not use SYCL shared memory anymore internally on systems without host unified memory (i.e., discrete GPUs). Therefore, memory transfers are triggered by specific Embree API calls (e.g. `rtcCommitScene`, `rtcCommitBuffer`). ++- Objects of type `RTCScene` are not accessible on a SYCL device anymore. Ray queries on SYCL devices must be performed using `RTCTraversable` objects and the `rtcTraversableIntersect` and `rtcTraversableOccluded` API calls. ++- Embree does not query the availability of RDRAND for its ISA detection anymore, which caused issues on some older AMD CPUs. ++- Performance improvements on GPU for the two level instancing case (RTC_MAX_INSTANCE_LEVEL_COUNT 2). ++ + ### Embree 4.3.3 + - Added RTCError RTC_ERROR_LEVEL_ZERO_RAYTRACING_SUPPORT_MISSING which can indicate a GPU driver that is too old or not installed properly. + - Added the API function rtcGetDeviceLastErrorMessage to query additional information about the last RTCError returned by rtcGetDeviceError. This can be used in case device creation failed and a rtcErrorFunction could not be set up for this purpose. + - Added the API function rtcGetErrorString which returns a string representation of a given RTCError error code. This is purely meant for convenient error information reporting on the user application side. + - Performance improvements on GPU for the one level instancing case (RTC_MAX_INSTANCE_LEVEL_COUNT 1). +-- Reduced the number of unneccessary GPU-CPU USM back-migrations which can increase build performance for scene with many instances on GPU. ++- Reduced the number of unnecessary GPU-CPU USM back-migrations which can increase build performance for scene with many instances on GPU. + - Started adding public CI tests for streamlining integration of external pull requests. + - Work-around for problem with unsigned Windows binaries. + +@@ -27,7 +35,7 @@ Version History + - Known issue: Embree build using Apple Clang 15 and ARM support (via the SEE2NEON library) may cause "EXEC_BAD_INSTRUCTION" runtime exceptions. Please use Apple Clang <= 14 on macOS. + + ### Embree 4.3.0 +-- Added instance array primitive for reducing memony requirements in scenes ++- Added instance array primitive for reducing memory requirements in scenes + with large amounts of similar instances. + - Properly checks driver if L0 RTAS extension can get loaded. + - Added varying version of rtcGetGeometryTransform for ISPC. +diff --git a/README.md b/README.md +index 1284ba422..90c2ad7b9 100644 +--- a/README.md ++++ b/README.md +@@ -879,8650 +879,6 @@ parameters that can be configured in CMake: + + + +-Embree API +-========== +- +-The Embree API is a low-level C99 ray tracing API which can be used to +-build spatial index structures for 3D scenes and perform ray queries of +-different types. +- +-The API can get used on the CPU using standard C, C++, and ISPC code +-and Intel GPUs by using SYCL code. +- +-The Intel® Implicit SPMD Program Compiler (Intel® ISPC) version of the +-API, is almost identical to the standard C99 version, but contains +-additional functions that operate on ray packets with a size of the +-native SIMD width used by Intel® ISPC. +- +-The SYCL version of the API is also mostly identical to the C99 version +-of the API, with some exceptions listed in section [Embree SYCL API]. +- +-For simplicity this document refers to the C99 version of the API +-functions. For changes when upgrading from the Embree 3 to the current +-Embree 4 API see Section [Upgrading from Embree 3 to Embree 4]. +- +-All API calls carry the prefix `rtc` (or `RTC` for types) which stands +-for **r**ay **t**racing **c**ore. The API supports scenes consisting of +-different geometry types such as triangle meshes, quad meshes (triangle +-pairs), grid meshes, flat curves, round curves, oriented curves, +-subdivision meshes, instances, and user-defined geometries. See Section +-[Scene Object](#scene-object) for more information. +- +-Finding the closest hit of a ray segment with the scene +-(`rtcIntersect`-type functions), and determining whether any hit +-between a ray segment and the scene exists (`rtcOccluded`-type +-functions) are both supported. The API supports queries for single rays +-and ray packets. See Section [Ray Queries](#ray-queries) for more +-information. +- +-The API is designed in an object-oriented manner, e.g. it contains +-device objects (`RTCDevice` type), scene objects (`RTCScene` type), +-geometry objects (`RTCGeometry` type), buffer objects (`RTCBuffer` +-type), and BVH objects (`RTCBVH` type). All objects are reference +-counted, and handles can be released by calling the appropriate release +-function (e.g. `rtcReleaseDevice`) or retained by incrementing the +-reference count (e.g. `rtcRetainDevice`). In general, API calls that +-access the same object are not thread-safe, unless specified otherwise. +-However, attaching geometries to the same scene and performing ray +-queries in a scene is thread-safe. +- +-Device Object +-------------- +- +-Embree supports a device concept, which allows different components of +-the application to use the Embree API without interfering with each +-other. An application typically first creates a device using the +-[rtcNewDevice] function (or [rtcNewSYCLDevice] when using SYCL for +-the GPU). This device can then be used to construct further objects, +-such as scenes and geometries. Before the application exits, it should +-release all devices by invoking [rtcReleaseDevice]. An application +-typically creates only a single device. If required differently, it +-should only use a small number of devices at any given time. +- +-Each user thread has its own error flag per device. If an error occurs +-when invoking an API function, this flag is set to an error code (if it +-isn't already set by a previous error). See Section +-[rtcGetDeviceError] for information on how to read the error code and +-Section [rtcSetDeviceErrorFunction] on how to register a callback +-that is invoked for each error encountered. It is recommended to always +-set a error callback function, to detect all errors. +- +-Scene Object +------------- +- +-A scene is a container for a set of geometries, and contains a spatial +-acceleration structure which can be used to perform different types of +-ray queries. +- +-A scene is created using the `rtcNewScene` function call, and released +-using the `rtcReleaseScene` function call. To populate a scene with +-geometries use the `rtcAttachGeometry` call, and to detach them use the +-`rtcDetachGeometry` call. Once all scene geometries are attached, an +-`rtcCommitScene` call (or `rtcJoinCommitScene` call) will finish the +-scene description and trigger building of internal data structures. +-After the scene got committed, it is safe to perform ray queries (see +-Section [Ray Queries](#ray-queries)) or to query the scene bounding box +-(see [rtcGetSceneBounds] and [rtcGetSceneLinearBounds]). +- +-If scene geometries get modified or attached or detached, the +-`rtcCommitScene` call must be invoked before performing any further ray +-queries for the scene; otherwise the effect of the ray query is +-undefined. The modification of a geometry, committing the scene, and +-tracing of rays must always happen sequentially, and never at the same +-time. Any API call that sets a property of the scene or geometries +-contained in the scene count as scene modification, e.g. including +-setting of intersection filter functions. +- +-Scene flags can be used to configure a scene to use less memory +-(`RTC_SCENE_FLAG_COMPACT`), use more robust traversal algorithms +-(`RTC_SCENE_FLAG_ROBUST`), and to optimize for dynamic content. See +-Section [rtcSetSceneFlags] for more details. +- +-A build quality can be specified for a scene to balance between +-acceleration structure build performance and ray query performance. See +-Section [rtcSetSceneBuildQuality] for more details on build quality. +- +-Geometry Object +---------------- +- +-A new geometry is created using the `rtcNewGeometry` function. +-Depending on the geometry type, different buffers must be bound (e.g. +-using `rtcSetSharedGeometryBuffer`) to set up the geometry data. In +-most cases, binding of a vertex and index buffer is required. The +-number of primitives and vertices of that geometry is typically +-inferred from the size of these bound buffers. +- +-Changes to the geometry always must be committed using the +-`rtcCommitGeometry` call before using the geometry. After committing, a +-geometry is not included in any scene. A geometry can be added to a +-scene by using the `rtcAttachGeometry` function (to automatically +-assign a geometry ID) or using the `rtcAttachGeometryById` function (to +-specify the geometry ID manually). A geometry can get attached to +-multiple scenes. +- +-All geometry types support multi-segment motion blur with an arbitrary +-number of equidistant time steps (in the range of 2 to 129) inside a +-user specified time range. Each geometry can have a different number of +-time steps and a different time range. The motion blur geometry is +-defined by linearly interpolating the geometries of neighboring time +-steps. To construct a motion blur geometry, first the number of time +-steps of the geometry must be specified using the +-`rtcSetGeometryTimeStepCount` function, and then a vertex buffer for +-each time step must be bound, e.g. using the +-`rtcSetSharedGeometryBuffer` function. Optionally, a time range +-defining the start (and end time) of the first (and last) time step can +-be set using the `rtcSetGeometryTimeRange` function. This feature will +-also allow geometries to appear and disappear during the camera shutter +-time if the time range is a sub range of [0,1]. +- +-Ray Queries +------------ +- +-The API supports finding the closest hit of a ray segment with the +-scene (`rtcIntersect`-type functions), and determining whether any hit +-between a ray segment and the scene exists (`rtcOccluded`-type +-functions). +- +-Supported are single ray queries (`rtcIntersect1` and `rtcOccluded1`) +-as well as ray packet queries for ray packets of size 4 +-(`rtcIntersect4` and `rtcOccluded4`), ray packets of size 8 +-(`rtcIntersect8` and `rtcOccluded8`), and ray packets of size 16 +-(`rtcIntersect16` and `rtcOccluded16`). +- +-See Sections [rtcIntersect1] and [rtcOccluded1] for a detailed +-description of how to set up and trace a ray. +- +-See tutorial [Triangle Geometry] for a complete example of how to +-trace single rays and ray packets. +- +-Point Queries +-------------- +- +-The API supports traversal of the BVH using a point query object that +-specifies a location and a query radius. For all primitives +-intersecting the according domain, a user defined callback function is +-called which allows queries such as finding the closest point on the +-surface geometries of the scene (see Tutorial [Closest Point]) or +-nearest neighbour queries (see Tutorial [Voronoi]). +- +-See Section [rtcPointQuery] for a detailed description of how to set +-up point queries. +- +-Collision Detection +-------------------- +- +-The Embree API also supports collision detection queries between two +-scenes consisting only of user geometries. Embree only performs +-broadphase collision detection, the narrow phase detection can be +-performed through a callback function. +- +-See Section [rtcCollide] for a detailed description of how to set up +-collision detection. +- +-Seen tutorial [Collision Detection](#collision-detection) for a +-complete example of collision detection being used on a simple cloth +-solver. +- +-Filter Functions +----------------- +- +-The API supports filter functions that are invoked for each +-intersection found during the `rtcIntersect`-type or `rtcOccluded`-type +-calls. +- +-The filter functions can be set per-geometry using the +-`rtcSetGeometryIntersectFilterFunction` and +-`rtcSetGeometryOccludedFilterFunction` calls. The former ones are +-called geometry intersection filter functions, the latter ones geometry +-occlusion filter functions. These filter functions are designed to be +-used to ignore intersections outside of a user-defined silhouette of a +-primitive, e.g. to model tree leaves using transparency textures. +- +-The filter function can also get passed as arguments directly to the +-traversal functions, see section [rtcInitIntersectArguments] and +-[rtcInitOccludedArguments] for more details. These argument filter +-functions are designed to change the semantics of the ray query, +-e.g. to accumulate opacity for transparent shadows, count the number of +-surfaces along a ray, collect all hits along a ray, etc. The argument +-filter function must be enabled to be used for a scene using the +-`RTC_SCENE_FLAG_FILTER_FUNCTION_IN_ARGUMENTS` scene flag. The callback +-is only invoked for geometries that enable the callback using the +-`rtcSetGeometryEnableFilterFunctionFromArguments` call, or enabled for +-all geometries when the `RTC_RAY_QUERY_FLAG_INVOKE_ARGUMENT_FILTER` ray +-query flag is set. +- +-BVH Build API +-------------- +- +-The internal algorithms to build a BVH are exposed through the `RTCBVH` +-object and `rtcBuildBVH` call. This call makes it possible to build a +-BVH in a user-specified format over user-specified primitives. See the +-documentation of the `rtcBuildBVH` call for more details. +- +-Embree SYCL API +-=============== +- +-Embree supports ray tracing on Intel GPUs by using the SYCL programming +-language. SYCL is a Khronos standardized C++ based language for single +-source heterogenous programming for acceleration offload, see the [SYCL +-webpage](https://www.khronos.org/sycl/) for details. +- +-The Embree SYCL API is designed for photorealistic rendering use cases, +-where scene setup is performed on the host, and rendering on the +-device. The Embree SYCL API is very similar to the standard Embree C99 +-API, and supports most of its features, such as all triangle-type +-geometries, all curve types and basis functions, point geometry types, +-user geometries, filter callbacks, multi-level instancing, and motion +-blur. +- +-To enable SYCL support you have to include the `sycl.hpp` file before +-the Embree API headers: +- +- #include +- #include +- +-Next you need to initializes an Embree SYCL device using the +-`rtcNewSYCLDevice` API function by providing a SYCL context. +- +-Embree provides the `rtcIsSYCLDeviceSupported` API function to check if +-some SYCL device is supported by Embree. You can also use the +-`rtcSYCLDeviceSelector` to conveniently select the first SYCL device +-that is supported by Embree, e.g.: +- +- sycl::device device(rtcSYCLDeviceSelector); +- sycl::queue queue(device, exception_handler); +- sycl::context context(device); +- RTCDevice device = rtcNewSYCLDevice(context,""); +- +-Scenes created with an Embree SYCL device can only get used to trace +-rays using SYCL on the GPU, it is not possible to trace rays on the CPU +-with such a device. To render on the CPU and GPU in parallel, the user +-has to create a second Embree device and create a second scene to be +-used on the CPU. +- +-Files containing SYCL code, have to get compiled with the Intel® oneAPI +-DPC++ compiler. Please see section [Linux SYCL Compilation] and +-[Windows SYCL Compilation] for supported compilers. The DPC++ +-compiler performs a two-phase compilation, where host code is compiled +-in a first phase, and device code compiled in a second compilation +-phase. +- +-Standard Embree API functions for scene construction can get used on +-the host but not the device. Data buffers that are shared with Embree +-(e.g. for vertex of index buffers) have to get allocated as SYCL +-unified shared memory (USM memory), using the `sycl::malloc` or +-`sycl::aligned_alloc` calls with `sycl::usm::alloc::shared` property, +-or the sycl::aligned\_alloc\_shared call, e.g: +- +- void* ptr = sycl::aligned_alloc(16, bytes, queue, sycl::usm::alloc::shared); +- +-These shared allocations have to be valid during rendering, as Embree +-may access contained data when tracing rays. Embree does not support +-device-only memory allocations, as the BVH builder implemented on the +-CPU relies on reading the data buffers. +- +-Device side rendering can get invoked by submitting a SYCL +-`parallel_for` to the SYCL queue: +- +- const sycl::specialization_id feature_mask; +- +- RTCFeatureFlags required_features = RTC_FEATURE_FLAG_TRIANGLE; +- +- queue.submit([=](sycl::handler& cgh) +- { +- cgh.set_specialization_constant(required_features); +- +- cgh.parallel_for(sycl::range<1>(1),[=](sycl::id<1> item, sycl::kernel_handler kh) +- { +- RTCIntersectArguments args; +- rtcInitIntersectArguments(&args); +- +- const RTCFeatureFlags features = kh.get_specialization_constant(); +- args.feature_mask = features; +- +- struct RTCRayHit rayhit; +- rayhit.ray.org_x = ox; +- rayhit.ray.org_y = oy; +- rayhit.ray.org_z = oz; +- rayhit.ray.dir_x = dx; +- rayhit.ray.dir_y = dy; +- rayhit.ray.dir_z = dz; +- rayhit.ray.tnear = 0; +- rayhit.ray.tfar = std::numeric_limits::infinity(); +- rayhit.ray.mask = -1; +- rayhit.ray.flags = 0; +- rayhit.hit.geomID = RTC_INVALID_GEOMETRY_ID; +- rayhit.hit.instID[0] = RTC_INVALID_GEOMETRY_ID; +- +- rtcIntersect1(scene, &rayhit, &args); +- +- result->geomID = rayhit.hit.geomID; +- result->primID = rayhit.hit.primID; +- result->tfar = rayhit.ray.tfar; +- }); +- }); +- queue.wait_and_throw(); +- +-This example passes a feature mask using a specialization contant to +-the `rtcIntersect1` function, which is recommended for GPU rendering. +-For best performance, this feature mask should get used to enable only +-features required by the application to render the scene, e.g. just +-triangles in this example. +- +-Inside the SYCL `parallel_for` loop you can use rendering related +-functions, such as the `rtcIntersect1` and `rtcOccluded1` functions to +-trace rays, `rtcForwardIntersect1/Ex` and `rtcForwardOccluded1/Ex` to +-continue object traversal from inside a user geometry callback, and +-`rtcGetGeometryUserDataFromScene` to get the user data pointer of some +-geometry. +- +-Have a look at the [Minimal] tutorial for a minimal SYCL example. +- +-SYCL JIT caching +----------------- +- +-Compile times for just in time compilation (JIT compilation) can be +-large. To resolve this issue we recommend enabling persistent JIT +-compilation caching inside your application, by setting the +-`SYCL_CACHE_PERSISTENT` environment variable to `1`, and the +-`SYCL_CACHE_DIR` environment variable to some proper directory where +-the JIT cache should get stored. These environment variables have to +-get set before the SYCL device is created, e.g: +- +- setenv("SYCL_CACHE_PERSISTENT","1",1); +- setenv("SYCL_CACHE_DIR","cache_dir",1); +- +- sycl::device device(rtcSYCLDeviceSelector); +- ... +- +-SYCL Memory Pooling +-------------------- +- +-Memory Pooling is a mechanism where small USM memory allocations are +-packed into larger allocation blocks. This mode is required when your +-application performs many small USM allocations, as otherwise only a +-small fraction of GPU memory is usable and data transfer performance +-will be low. +- +-Memory pooling is supported for USM allocations that are read-only by +-the device. The following example allocated device read-only memory +-with memory pooling support: +- +- sycl::aligned_alloc_shared(align, bytes, queue, +- sycl::ext::oneapi::property::usm::device_read_only()); +- +-Embree SYCL Limitations +------------------------ +- +-Embree only supports Xe HPC and HPG GPUs as SYCL devices, thus in +-particular the CPU and other GPUs cannot get used as a SYCL device. To +-render on the CPU just use the standard C99 API without relying on +-SYCL. +- +-The SYCL language spec puts some restrictions to device functions, such +-as disallowing: global variable access, malloc, invokation of virtual +-functions, function pointers, runtime type information, exceptions, +-recursion, etc. See Section +-`5.4. Language Restrictions for device functions` of the [SYCL +-specification](https://www.khronos.org/registry/SYCL/specs/sycl-2020/html/sycl-2020.html#sec:language.restrictions.kernels) +-for more details. +- +-Using Intel's oneAPI DPC++ compiler invoking an indirectly called +-function is allowed, but we do not recommend this for performance +-reasons. +- +-Some features are not supported by the Embree SYCL API thus cannot get +-used on the GPU: +- +-- The packet tracing functions `rtcIntersect4/8/16` and +- `rtcOccluded4/8/16` are not supported in SYCL device side code. +- Using these functions makes no sense for SYCL, as the programming +- model is implicitely executed in SIMT mode on the GPU anyway. +- +-- Filter and user geometry callbacks stored inside the geometry +- objects are not supported on SYCL. Please use the alternative +- approach of passing the function pointer through the +- `RTCIntersectArguments` (or `RTCOccludedArguments`) structures to +- the tracing function, which enables inlining on the GPU. +- +-- The `rtcInterpolate` function cannot get used on the the device. +- For most primitive types the vertex data interpolation is anyway a +- trivial operation, and an API call just introduces overheads. On +- the CPU that overhead is acceptable, but on the GPU it is not. The +- `rtcInterpolate` function does not know the geometry type it is +- interpolating over, thus its implementation on the GPU would +- contain a large switch statement for all potential geometry types. +- +-- Tracing rays using `rtcIntersect1` and `rtcOccluded1` functions +- from user geometry callbacks is not supported in SYCL. Please use +- the tail recursive `rtcForwardIntersect1` and `rtcForwardOccluded1` +- calls instead. +- +-- Subdivision surfaces are not supported for Embree SYCL devices. +- +-- Collision detection (`rtcCollide` API call) is not supported in +- SYCL device side code. +- +-- Point queries (`rtcPointQuery` API call) are not supported in SYCL +- device side code. +- +-Embree SYCL Known Issues +------------------------- +- +-- The SYCL support of Embree is in beta phase. Current functionality, +- quality, and GPU performance may not reflect that of the final +- product. +- +-- Compilation with build configuration "debug" is currently not +- working on Windows. +- +-Upgrading from Embree 3 to Embree 4 +-=================================== +- +-This section summarizes API changes between Embree 3 and Embree4. Most +-of these changes are motivated by GPU performance and having a +-consistent API that works properly for the CPU and GPU. +- +-- The API include folder got renamed from embree3 to embree4, to be +- able to install Embree 3 and Embree 4 side by side, without having +- conflicts in API folder. +- +-- The `RTCIntersectContext` is renamed to `RTCRayQueryContext` and +- the `RTCIntersectContextFlags` got renamed to `RTCRayQueryFlags`. +- +-- There are some changes to the `rtcIntersect` and `rtcOccluded` +- functions. Most members of the old intersect context have been +- moved to some optional `RTCIntersectArguments` (and +- `RTCOccludedArguments`) structures, which also contains a pointer +- to the new ray query context. The argument structs fulfill the task +- of providing additional advanced arguments to the traversal +- functions. The ray query context can get used to pass additional +- data to callbacks, and to maintain an instID stack in case +- instancing is done manually inside user geometry callbacks. The +- arguments struct is not available inside callbacks. This change was +- in particular necessary for SYCL to allow inlining of function +- pointers provided to the traversal functions, and to reduce the +- amount of state passed to callbacks, which both improves GPU +- performance. Most applications can just drop passing the ray query +- context to port to Embree 4. +- +-- The `rtcFilterIntersection` and `rtcFilterOcclusion` API calls that +- invoke both, the geometry and argument version of the filter +- callback, from a user geometry callback are no longer supported. +- Instead applications should use the +- `rtcInvokeIntersectFilterFromGeometry` and +- `rtcInvokeOccludedFilterFromGeometry` API calls that invoke just +- the geometry version of the filter function, and invoke the +- argument filter function manually if required. +- +-- The filter function passed as arguments to `rtcIntersect` and +- `rtcOccluded` functions is only invoked for some geometry if +- enabled through `rtcSetGeometryEnableFilterFunctionFromArguments` +- for that geometry. Alternatively, argument filter functions can get +- enabled for all geometries using the +- `RTC_RAY_QUERY_FLAG_INVOKE_ARGUMENT_FILTER` ray query flag. +- +-- User geometry callbacks get a valid vector as input to identify +- valid and invalid rays. In Embree 3 the user geometry callback just +- had to update the ray hit members when an intersection was found +- and perform no operation otherwise. In Embree 4 the callback +- additionally has to return valid=-1 when a hit was found, and +- valid=0 when no hit was found. This allows Embree to properly pass +- the new hit distance to the ray tracing hardware only in the case a +- hit was found. +- +-- Further ray masking is enabled by default now as required by most +- applications and the default ray mask for geometries got changed +- from 0xFFFFFFFF to 0x1. +- +-- The stream tracing functions `rtcIntersect1M`, `rtcIntersect1Mp`, +- `rtcIntersectNM`, `rtcIntersectNp`, `rtcOccluded1M`, +- `rtcOccluded1Mp`, `rtcOccludedNM`, and `rtcOccludedNp` got removed +- as they were rarely used and did not provide relevant performance +- benefits. As alternative the application can just iterate over +- `rtcIntersect1` and potentially `rtcIntersect4/8/16` to get similar +- performance. +- +-To use Embree through SYCL on the CPU and GPU additional changes are +-required: +- +-- Embree 3 allows to use `rtcIntersect` recursively from a user +- geometry or intersection filter callback to continue a ray inside +- an instantiated object. In Embree 4 using `rtcIntersect` +- recursively is disallowed on the GPU but still supported on the +- CPU. To properly continue a ray inside an instantiated object use +- the new `rtcForwardIntersect1` and `rtcForwardOccluded1` functions. +- +-- The geometry object of Embree 4 is a host side only object, thus +- accessing it during rendering from the GPU is not allowed. Thus all +- API functions that take an RTCGeometry object as argument cannot +- get used during rendering. Thus in particular the +- `rtcGetGeometryUserData(RTCGeometry)` call cannot get used, but +- there is an alternative function +- `rtcGetGeometryUserDataFromScene(RTCScene scene,uint geomID)` that +- should get used instead. +- +-- The user geometry callback and filter callback functions should get +- passed through the intersection and occlusion argument structures +- to the `rtcIntersect1` and `rtcOccluded1` functions directly to +- allow inlining. The experimental geometry version of the callbacks +- is disabled in SYCL and should not get used. +- +-- The feature flags should get used in SYCL to minimal GPU code for +- optimal performance. +- +-- The `rtcInterpolate` function cannot get used on the device, and +- vertex data interpolation should get implemented by the +- application. +- +-- Indirectly called functions must be declared with +- `RTC_SYCL_INDIRECTLY_CALLABLE` when used as filter or user geometry +- callbacks. +- +-```{=tex} +- +-``` +-Embree API Reference +-==================== +- +-rtcNewDevice +------------- +- +-#### NAME +- +- rtcNewDevice - creates a new device +- +-#### SYNOPSIS +- +- #include +- +- RTCDevice rtcNewDevice(const char* config); +- +-#### DESCRIPTION +- +-This function creates a new device to be used for CPU ray tracing and +-returns a handle to this device. The device object is reference counted +-with an initial reference count of 1. The handle can be released using +-the `rtcReleaseDevice` API call. +- +-The device object acts as a class factory for all other object types. +-All objects created from the device (like scenes, geometries, etc.) +-hold a reference to the device, thus the device will not be destroyed +-unless these objects are destroyed first. +- +-Objects are only compatible if they belong to the same device, e.g it +-is not allowed to create a geometry in one device and attach it to a +-scene created with a different device. +- +-A configuration string (`config` argument) can be passed to the device +-construction. This configuration string can be `NULL` to use the +-default configuration. +- +-The following configuration is supported: +- +-- `threads=[int]`: Specifies a number of build threads to use. A +- value of 0 enables all detected hardware threads. By default all +- hardware threads are used. +- +-- `user_threads=[int]`: Sets the number of user threads that can be +- used to join and participate in a scene commit using +- `rtcJoinCommitScene`. The tasking system will only use +- threads-user\_threads many worker threads, thus if the app wants to +- solely use its threads to commit scenes, just set threads equal to +- user\_threads. This option only has effect with the Intel(R) +- Threading Building Blocks (TBB) tasking system. +- +-- `set_affinity=[0/1]`: When enabled, build threads are affinitized +- to hardware threads. This option is disabled by default on standard +- CPUs, and enabled by default on Xeon Phi Processors. +- +-- `start_threads=[0/1]`: When enabled, the build threads are started +- upfront. This can be useful for benchmarking to exclude thread +- creation time. This option is disabled by default. +- +-- `isa=[sse2,sse4.2,avx,avx2,avx512]`: Use specified ISA. By default +- the ISA is selected automatically. +- +-- `max_isa=[sse2,sse4.2,avx,avx2,avx512]`: Configures the automated +- ISA selection to use maximally the specified ISA. +- +-- `hugepages=[0/1]`: Enables or disables usage of huge pages. Under +- Linux huge pages are used by default but under Windows and macOS +- they are disabled by default. +- +-- `enable_selockmemoryprivilege=[0/1]`: When set to 1, this enables +- the `SeLockMemoryPrivilege` privilege with is required to use huge +- pages on Windows. This option has an effect only under Windows and +- is ignored on other platforms. See Section [Huge Page Support] +- for more details. +- +-- `verbose=[0,1,2,3]`: Sets the verbosity of the output. When set to +- 0, no output is printed by Embree, when set to a higher level more +- output is printed. By default Embree does not print anything on the +- console. +- +-- `frequency_level=[simd128,simd256,simd512]`: Specifies the +- frequency level the application want to run on, which can be +- either: +- +- a) simd128 to run at highest frequency +- b) simd256 to run at AVX2-heavy frequency level +- c) simd512 to run at heavy AVX512 frequency level. When some +- frequency level is specified, Embree will avoid doing +- optimizations that may reduce the frequency level below the +- level specified. E.g. if your app does not use AVX instructions +- setting "frequency\_level=simd128" will cause some CPUs to run +- at highest frequency, which may result in higher application +- performance if you do much shading. If you application heavily +- uses AVX code, you should best set the frequency level to +- simd256. Per default Embree tries to avoid reducing the +- frequency of the CPU by setting the simd256 level only when the +- CPU has no significant down clocking. +- +-Different configuration options should be separated by commas, e.g.: +- +- rtcNewDevice("threads=1,isa=avx"); +- +-#### EXIT STATUS +- +-On success returns a handle of the created device. On failure returns +-`NULL` as device and sets a per-thread error code that can be queried +-using `rtcGetDeviceError(NULL)`. +- +-#### SEE ALSO +- +-[rtcRetainDevice], [rtcReleaseDevice], [rtcNewSYCLDevice] +- +-```{=tex} +- +-``` +-rtcNewSYCLDevice +----------------- +- +-#### NAME {#name} +- +- rtcNewSYCLDevice - creates a new device to be used with SYCL +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- RTCDevice rtcNewSYCLDevice(sycl::context context, const char* config); +- +-#### DESCRIPTION {#description} +- +-This function creates a new device to be used with SYCL for GPU +-rendering and returns a handle to this device. The device object is +-reference counted with an initial reference count of 1. The handle can +-get released using the `rtcReleaseDevice` API call. +- +-The passed SYCL context (`context` argument) is used to allocate GPU +-data, thus only devices contained inside this context can be used for +-rendering. By default the GPU data is allocated on the first GPU device +-of the context, but this behavior can get changed with the +-[rtcSetDeviceSYCLDevice] function. +- +-The device object acts as a class factory for all other object types. +-All objects created from the device (like scenes, geometries, etc.) +-hold a reference to the device, thus the device will not be destroyed +-unless these objects are destroyed first. +- +-Objects are only compatible if they belong to the same device, e.g it +-is not allowed to create a geometry in one device and attach it to a +-scene created with a different device. +- +-For an overview of configurations that can get passed (`config` +-argument) please see the [rtcNewDevice] function description. +- +-#### EXIT STATUS {#exit-status} +- +-On success returns a handle of the created device. On failure returns +-`NULL` as device and sets a per-thread error code that can be queried +-using `rtcGetDeviceError(NULL)`. +- +-#### SEE ALSO {#see-also} +- +-[rtcRetainDevice], [rtcReleaseDevice], [rtcNewDevice] +- +-```{=tex} +- +-``` +-rtcIsSYCLDeviceSupported +------------------------- +- +-#### NAME {#name} +- +- rtcIsSYCLDeviceSupported - checks if some SYCL device is supported by Embree +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- bool rtcIsSYCLDeviceSupported(const sycl::device sycl_device); +- +-#### DESCRIPTION {#description} +- +-This function can be used to check if some SYCL device (`sycl_device` +-argument) is supported by Embree. +- +-#### EXIT STATUS {#exit-status} +- +-The function returns true if the SYCL device is supported by Embree and +-false otherwise. On failure an error code is set that can get queried +-using `rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcSYCLDeviceSelector] +- +-```{=tex} +- +-``` +-rtcSYCLDeviceSelector +---------------------- +- +-#### NAME {#name} +- +- rtcSYCLDeviceSelector - SYCL device selector function to select +- devices supported by Embree +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- int rtcSYCLDeviceSelector(const sycl::device sycl_device); +- +-#### DESCRIPTION {#description} +- +-This function checks if the passed SYCL device (`sycl_device` +-arguments) is supported by Embree or not. This function can be used +-directly to select some supported SYCL device by using it as SYCL +-device selector function. For instance, the following code sequence +-selects an Embree supported SYCL device and creates an Embree device +-from it: +- +- sycl::device sycl_device(rtcSYCLDeviceSelector); +- sycl::queue sycl_queue(sycl_device); +- sycl::context(sycl_device); +- RTCDevice device = rtcNewSYCLDevice(sycl_context,nullptr); +- +-#### EXIT STATUS {#exit-status} +- +-The function returns -1 if the SYCL device is supported by Embree and 1 +-otherwise. On failure an error code is set that can get queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcIsSYCLDeviceSupported] +- +-```{=tex} +- +-``` +-rtcSetDeviceSYCLDevice +----------------------- +- +-#### NAME {#name} +- +- rtcSetDeviceSYCLDevice - sets the SYCL device to be used for memory allocations +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcSetDeviceSYCLDevice(RTCDevice device, const sycl::device sycl_device); +- +-#### DESCRIPTION {#description} +- +-This function sets the SYCL device (`sycl_device` argument) to be used +-to allocate GPU memory when using the specified Embree device (`device` +-argument). This SYCL device must be one of the SYCL devices contained +-inside the SYCL context used to create the Embree device. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can get queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewSYCLDevice] +- +-```{=tex} +- +-``` +-rtcRetainDevice +---------------- +- +-#### NAME {#name} +- +- rtcRetainDevice - increments the device reference count +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcRetainDevice(RTCDevice device); +- +-#### DESCRIPTION {#description} +- +-Device objects are reference counted. The `rtcRetainDevice` function +-increments the reference count of the passed device object (`device` +-argument). This function together with `rtcReleaseDevice` allows to use +-the internal reference counting in a C++ wrapper class to manage the +-ownership of the object. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewDevice], [rtcReleaseDevice] +- +-```{=tex} +- +-``` +-rtcReleaseDevice +----------------- +- +-#### NAME {#name} +- +- rtcReleaseDevice - decrements the device reference count +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcReleaseDevice(RTCDevice device); +- +-#### DESCRIPTION {#description} +- +-Device objects are reference counted. The `rtcReleaseDevice` function +-decrements the reference count of the passed device object (`device` +-argument). When the reference count falls to 0, the device gets +-destroyed. +- +-All objects created from the device (like scenes, geometries, etc.) +-hold a reference to the device, thus the device will not get destroyed +-unless these objects are destroyed first. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewDevice], [rtcRetainDevice] +- +-```{=tex} +- +-``` +-rtcGetDeviceProperty +--------------------- +- +-#### NAME {#name} +- +- rtcGetDeviceProperty - queries properties of the device +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- ssize_t rtcGetDeviceProperty( +- RTCDevice device, +- enum RTCDeviceProperty prop +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcGetDeviceProperty` function can be used to query properties +-(`prop` argument) of a device object (`device` argument). The returned +-property is an integer of type `ssize_t`. +- +-Possible properties to query are: +- +-- `RTC_DEVICE_PROPERTY_VERSION`: Queries the combined version number +- (MAJOR.MINOR.PATCH) with two decimal digits per component. E.g. for +- Embree 2.8.3 the integer 208003 is returned. +- +-- `RTC_DEVICE_PROPERTY_VERSION_MAJOR`: Queries the major version +- number of Embree. +- +-- `RTC_DEVICE_PROPERTY_VERSION_MINOR`: Queries the minor version +- number of Embree. +- +-- `RTC_DEVICE_PROPERTY_VERSION_PATCH`: Queries the patch version +- number of Embree. +- +-- `RTC_DEVICE_PROPERTY_NATIVE_RAY4_SUPPORTED`: Queries whether the +- `rtcIntersect4` and `rtcOccluded4` functions preserve packet size +- and ray order when invoking callback functions. This is only the +- case if Embree is compiled with `EMBREE_RAY_PACKETS` and `SSE2` (or +- `SSE4.2`) enabled, and if the machine it is running on supports +- `SSE2` (or `SSE4.2`). +- +-- `RTC_DEVICE_PROPERTY_NATIVE_RAY8_SUPPORTED`: Queries whether the +- `rtcIntersect8` and `rtcOccluded8` functions preserve packet size +- and ray order when invoking callback functions. This is only the +- case if Embree is compiled with `EMBREE_RAY_PACKETS` and `AVX` (or +- `AVX2`) enabled, and if the machine it is running on supports `AVX` +- (or `AVX2`). +- +-- `RTC_DEVICE_PROPERTY_NATIVE_RAY16_SUPPORTED`: Queries whether the +- `rtcIntersect16` and `rtcOccluded16` functions preserve packet size +- and ray order when invoking callback functions. This is only the +- case if Embree is compiled with `EMBREE_RAY_PACKETS` and `AVX512` +- enabled, and if the machine it is running on supports `AVX512`. +- +-- `RTC_DEVICE_PROPERTY_RAY_MASK_SUPPORTED`: Queries whether ray masks +- are supported. This is only the case if Embree is compiled with +- `EMBREE_RAY_MASK` enabled. +- +-- `RTC_DEVICE_PROPERTY_BACKFACE_CULLING_ENABLED`: Queries whether +- back face culling is enabled. This is only the case if Embree is +- compiled with `EMBREE_BACKFACE_CULLING` enabled. +- +-- `RTC_DEVICE_PROPERTY_BACKFACE_CULLING_CURVES_ENABLED`: Queries +- whether back face culling for curves is enabled. This is only the +- case if Embree is compiled with `EMBREE_BACKFACE_CULLING_CURVES` +- enabled. +- +-- `RTC_DEVICE_PROPERTY_BACKFACE_CULLING_SPHERES_ENABLED`: Queries +- whether back face culling for spheres is enabled. This is only the +- case if Embree is compiled with `EMBREE_BACKFACE_CULLING_SPHERES` +- enabled. +- +-- `RTC_DEVICE_PROPERTY_COMPACT_POLYS_ENABLED`: Queries whether +- compact polys is enabled. This is only the case if Embree is +- compiled with `EMBREE_COMPACT_POLYS` enabled. +- +-- `RTC_DEVICE_PROPERTY_FILTER_FUNCTION_SUPPORTED`: Queries whether +- filter functions are supported, which is the case if Embree is +- compiled with `EMBREE_FILTER_FUNCTION` enabled. +- +-- `RTC_DEVICE_PROPERTY_IGNORE_INVALID_RAYS_ENABLED`: Queries whether +- invalid rays are ignored, which is the case if Embree is compiled +- with `EMBREE_IGNORE_INVALID_RAYS` enabled. +- +-- `RTC_DEVICE_PROPERTY_TRIANGLE_GEOMETRY_SUPPORTED`: Queries whether +- triangles are supported, which is the case if Embree is compiled +- with `EMBREE_GEOMETRY_TRIANGLE` enabled. +- +-- `RTC_DEVICE_PROPERTY_QUAD_GEOMETRY_SUPPORTED`: Queries whether +- quads are supported, which is the case if Embree is compiled with +- `EMBREE_GEOMETRY_QUAD` enabled. +- +-- `RTC_DEVICE_PROPERTY_SUBDIVISION_GEOMETRY_SUPPORTED`: Queries +- whether subdivision meshes are supported, which is the case if +- Embree is compiled with `EMBREE_GEOMETRY_SUBDIVISION` enabled. +- +-- `RTC_DEVICE_PROPERTY_CURVE_GEOMETRY_SUPPORTED`: Queries whether +- curves are supported, which is the case if Embree is compiled with +- `EMBREE_GEOMETRY_CURVE` enabled. +- +-- `RTC_DEVICE_PROPERTY_POINT_GEOMETRY_SUPPORTED`: Queries whether +- points are supported, which is the case if Embree is compiled with +- `EMBREE_GEOMETRY_POINT` enabled. +- +-- `RTC_DEVICE_PROPERTY_USER_GEOMETRY_SUPPORTED`: Queries whether user +- geometries are supported, which is the case if Embree is compiled +- with `EMBREE_GEOMETRY_USER` enabled. +- +-- `RTC_DEVICE_PROPERTY_TASKING_SYSTEM`: Queries the tasking system +- Embree is compiled with. Possible return values are: +- +- 0. internal tasking system +- 1. Intel Threading Building Blocks (TBB) +- 2. Parallel Patterns Library (PPL) +- +-- `RTC_DEVICE_PROPERTY_JOIN_COMMIT_SUPPORTED`: Queries whether +- `rtcJoinCommitScene` is supported. This is not the case when Embree +- is compiled with PPL or older versions of TBB. +- +-- `RTC_DEVICE_PROPERTY_PARALLEL_COMMIT_SUPPORTED`: Queries whether +- `rtcCommitScene` can get invoked from multiple TBB worker threads +- concurrently. This feature is only supported starting with TBB 2019 +- Update 9. +- +-#### EXIT STATUS {#exit-status} +- +-On success returns the value of the queried property. For properties +-returning a boolean value, the return value 0 denotes `false` and 1 +-denotes `true`. +- +-On failure zero is returned and an error code is set that can be +-queried using `rtcGetDeviceError`. +- +-```{=tex} +- +-``` +-rtcGetDeviceError +------------------ +- +-#### NAME {#name} +- +- rtcGetDeviceError - returns the error code of the device +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- RTCError rtcGetDeviceError(RTCDevice device); +- +-#### DESCRIPTION {#description} +- +-Each thread has its own error code per device. If an error occurs when +-calling an API function, this error code is set to the occurred error +-if it stores no previous error. The `rtcGetDeviceError` function reads +-and returns the currently stored error and clears the error code. This +-assures that the returned error code is always the first error occurred +-since the last invocation of `rtcGetDeviceError`. +- +-Possible error codes returned by `rtcGetDeviceError` are: +- +-- `RTC_ERROR_NONE`: No error occurred. +- +-- `RTC_ERROR_UNKNOWN`: An unknown error has occurred. +- +-- `RTC_ERROR_INVALID_ARGUMENT`: An invalid argument was specified. +- +-- `RTC_ERROR_INVALID_OPERATION`: The operation is not allowed for the +- specified object. +- +-- `RTC_ERROR_OUT_OF_MEMORY`: There is not enough memory left to +- complete the operation. +- +-- `RTC_ERROR_UNSUPPORTED_CPU`: The CPU is not supported as it does +- not support the lowest ISA Embree is compiled for. +- +-- `RTC_ERROR_CANCELLED`: The operation got canceled by a memory +- monitor callback or progress monitor callback function. +- +-- `RTC_ERROR_LEVEL_ZERO_RAYTRACING_SUPPORT_MISSING`: This error can +- occur when creating an Embree device with SYCL support using +- `rtcNewSYCLDevice` fails. This error probably means that the GPU +- driver is to old or not installed properly. Install a new GPU +- driver and on Linux make sure that the package +- `intel-level-zero-gpu-raytracing` is installed. For general driver +- installation information for Linux refer to +- . +- +-When the device construction fails, `rtcNewDevice` returns `NULL` as +-device. To detect the error code of a such a failed device +-construction, pass `NULL` as device to the `rtcGetDeviceError` +-function. For all other invocations of `rtcGetDeviceError`, a proper +-device pointer must be specified. +- +-The API function `rtcGetDeviceLastErrorMessage` can be used to get more +-details about the last `RTCError` a `RTCDevice` encountered. +- +-For convenient reporting of a `RTCError`, the API function +-`rtcGetErrorString` can be used, which returns a string representation +-of a given `RTCError`. +- +-#### EXIT STATUS {#exit-status} +- +-Returns the error code for the device. +- +-#### SEE ALSO {#see-also} +- +-[rtcSetDeviceErrorFunction], [rtcGetDeviceLastErrorMessage], +-[rtcGetErrorString] +- +-```{=tex} +- +-``` +-rtcGetDeviceLastErrorMessage +----------------------------- +- +-#### NAME {#name} +- +- rtcGetDeviceLastErrorMessage - returns a message corresponding +- to the last error code +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- const char* rtcGetDeviceLastErrorMessage(RTCDevice device); +- +-#### DESCRIPTION {#description} +- +-This function can be used to get a message corresponding to the last +-error code (returned by `rtcGetDeviceError`) which often provides +-details about the error that happened. The message is the same as the +-message that will written to console when verbosity is \> 0 or which is +-passed as the `str` argument of the `RTCErrorFunction` (see +-[rtcSetDeviceErrorFunction]). However, when device construction fails +-this is the only way to get additional information about the error. In +-this case, `rtcNewDevice` returns `NULL` as device. To query the error +-message for such a failed device construction, pass `NULL` as device to +-the `rtcGetDeviceLastErrorMessage` function. For all other invocations +-of `rtcGetDeviceLastErrorMessage`, a proper device pointer must be +-specified. +- +-#### EXIT STATUS {#exit-status} +- +-Returns a message corresponding to the last error code. +- +-#### SEE ALSO {#see-also} +- +-[rtcGetDeviceError], [rtcSetDeviceErrorFunction] +- +-```{=tex} +- +-``` +-rtcGetErrorString +------------------ +- +-#### NAME {#name} +- +- rtcGetErrorString - returns a string representation +- of a given RTCError +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- const char* rtcGetErrorString(RTCError code); +- +-#### DESCRIPTION {#description} +- +-Returns a string representation for a `RTCError` error code. For +-example, for the `RTCError` RTC\_ERROR\_UNKNOWN this function will +-return the string "Unknown Error". This is purely a convenience +-function for printing error information on the user side. +- +-The returned strings should not be used for comparing different +-`RTCError` error codes or make other decisions based on the type of +-error that occurred. For such things only the `RTCError` enum values +-should be used. +- +-#### EXIT STATUS {#exit-status} +- +-Returns a string representation of a given `RTCError` error code. +- +-#### SEE ALSO {#see-also} +- +-[rtcGetDeviceError] +- +-```{=tex} +- +-``` +-rtcSetDeviceErrorFunction +-------------------------- +- +-#### NAME {#name} +- +- rtcSetDeviceErrorFunction - sets an error callback function for the device +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- typedef void (*RTCErrorFunction)( +- void* userPtr, +- RTCError code, +- const char* str +- ); +- +- void rtcSetDeviceErrorFunction( +- RTCDevice device, +- RTCErrorFunction error, +- void* userPtr +- ); +- +-#### DESCRIPTION {#description} +- +-Using the `rtcSetDeviceErrorFunction` call, it is possible to set a +-callback function (`error` argument) with payload (`userPtr` argument), +-which is called whenever an error occurs for the specified device +-(`device` argument). +- +-Only a single callback function can be registered per device, and +-further invocations overwrite the previously set callback function. +-Passing `NULL` as function pointer disables the registered callback +-function. +- +-When the registered callback function is invoked, it gets passed the +-user-defined payload (`userPtr` argument as specified at registration +-time), the error code (`code` argument) of the occurred error, as well +-as a string (`str` argument) that further describes the error. +- +-The error code is also set if an error callback function is registered. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcGetDeviceError] +- +-```{=tex} +- +-``` +-rtcSetDeviceMemoryMonitorFunction +---------------------------------- +- +-#### NAME {#name} +- +- rtcSetDeviceMemoryMonitorFunction - registers a callback function +- to track memory consumption +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- typedef bool (*RTCMemoryMonitorFunction)( +- void* userPtr, +- ssize_t bytes, +- bool post +- ); +- +- void rtcSetDeviceMemoryMonitorFunction( +- RTCDevice device, +- RTCMemoryMonitorFunction memoryMonitor, +- void* userPtr +- ); +- +-#### DESCRIPTION {#description} +- +-Using the `rtcSetDeviceMemoryMonitorFunction` call, it is possible to +-register a callback function (`memoryMonitor` argument) with payload +-(`userPtr` argument) for a device (`device` argument), which is called +-whenever internal memory is allocated or deallocated by objects of that +-device. Using this memory monitor callback mechanism, the application +-can track the memory consumption of an Embree device, and optionally +-terminate API calls that consume too much memory. +- +-Only a single callback function can be registered per device, and +-further invocations overwrite the previously set callback function. +-Passing `NULL` as function pointer disables the registered callback +-function. +- +-Once registered, the Embree device will invoke the memory monitor +-callback function before or after it allocates or frees important +-memory blocks. The callback function gets passed the payload as +-specified at registration time (`userPtr` argument), the number of +-bytes allocated or deallocated (`bytes` argument), and whether the +-callback is invoked after the allocation or deallocation took place +-(`post` argument). The callback function might get called from multiple +-threads concurrently. +- +-The application can track the current memory usage of the Embree device +-by atomically accumulating the `bytes` input parameter provided to the +-callback function. This parameter will be \>0 for allocations and \<0 +-for deallocations. +- +-Embree will continue its operation normally when returning `true` from +-the callback function. If `false` is returned, Embree will cancel the +-current operation with the `RTC_ERROR_OUT_OF_MEMORY` error code. +-Issuing multiple cancel requests from different threads is allowed. +-Canceling will only happen when the callback was called for allocations +-(bytes \> 0), otherwise the cancel request will be ignored. +- +-If a callback to cancel was invoked before the allocation happens +-(`post == false`), then the `bytes` parameter should not be +-accumulated, as the allocation will never happen. If the callback to +-cancel was invoked after the allocation happened (`post == true`), then +-the `bytes` parameter should be accumulated, as the allocation properly +-happened and a deallocation will later free that data block. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewDevice] +- +-```{=tex} +- +-``` +-rtcNewScene +------------ +- +-#### NAME {#name} +- +- rtcNewScene - creates a new scene +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- RTCScene rtcNewScene(RTCDevice device); +- +-#### DESCRIPTION {#description} +- +-This function creates a new scene bound to the specified device +-(`device` argument), and returns a handle to this scene. The scene +-object is reference counted with an initial reference count of 1. The +-scene handle can be released using the `rtcReleaseScene` API call. +- +-#### EXIT STATUS {#exit-status} +- +-On success a scene handle is returned. On failure `NULL` is returned +-and an error code is set that can be queried using `rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcRetainScene], [rtcReleaseScene] +- +-```{=tex} +- +-``` +-rtcGetSceneDevice +------------------ +- +-#### NAME {#name} +- +- rtcGetSceneDevice - returns the device the scene got created in +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- RTCDevice rtcGetSceneDevice(RTCScene scene); +- +-#### DESCRIPTION {#description} +- +-This function returns the device object the scene got created in. The +-returned handle own one additional reference to the device object, thus +-you should need to call `rtcReleaseDevice` when the returned handle is +-no longer required. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcReleaseDevice] +- +-```{=tex} +- +-``` +-rtcRetainScene +--------------- +- +-#### NAME {#name} +- +- rtcRetainScene - increments the scene reference count +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcRetainScene(RTCScene scene); +- +-#### DESCRIPTION {#description} +- +-Scene objects are reference counted. The `rtcRetainScene` function +-increments the reference count of the passed scene object (`scene` +-argument). This function together with `rtcReleaseScene` allows to use +-the internal reference counting in a C++ wrapper class to handle the +-ownership of the object. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewScene], [rtcReleaseScene] +- +-```{=tex} +- +-``` +-rtcReleaseScene +---------------- +- +-#### NAME {#name} +- +- rtcReleaseScene - decrements the scene reference count +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcReleaseScene(RTCScene scene); +- +-#### DESCRIPTION {#description} +- +-Scene objects are reference counted. The `rtcReleaseScene` function +-decrements the reference count of the passed scene object (`scene` +-argument). When the reference count falls to 0, the scene gets +-destroyed. +- +-The scene holds a reference to all attached geometries, thus if the +-scene gets destroyed, all geometries get detached and their reference +-count decremented. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewScene], [rtcRetainScene] +- +-```{=tex} +- +-``` +-rtcAttachGeometry +------------------ +- +-#### NAME {#name} +- +- rtcAttachGeometry - attaches a geometry to the scene +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- unsigned int rtcAttachGeometry( +- RTCScene scene, +- RTCGeometry geometry +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcAttachGeometry` function attaches a geometry (`geometry` +-argument) to a scene (`scene` argument) and assigns a geometry ID to +-that geometry. All geometries attached to a scene are defined to be +-included inside the scene. A geometry can get attached to multiple +-scenes. The geometry ID is unique for the scene, and is used to +-identify the geometry when hit by a ray during ray queries. +- +-This function is thread-safe, thus multiple threads can attach +-geometries to a scene in parallel. +- +-The geometry IDs are assigned sequentially, starting from 0, as long as +-no geometry got detached. If geometries got detached, the +-implementation will reuse IDs in an implementation dependent way. +-Consequently sequential assignment is no longer guaranteed, but a +-compact range of IDs. +- +-These rules allow the application to manage a dynamic array to +-efficiently map from geometry IDs to its own geometry representation. +-Alternatively, the application can also use per-geometry user data to +-map to its geometry representation. See `rtcSetGeometryUserData` and +-`rtcGetGeometryUserData` for more information. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcSetGeometryUserData], [rtcGetGeometryUserData] +- +-```{=tex} +- +-``` +-rtcAttachGeometryByID +---------------------- +- +-#### NAME {#name} +- +- rtcAttachGeometryByID - attaches a geometry to the scene +- using a specified geometry ID +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcAttachGeometryByID( +- RTCScene scene, +- RTCGeometry geometry, +- unsigned int geomID +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcAttachGeometryByID` function attaches a geometry (`geometry` +-argument) to a scene (`scene` argument) and assigns a user provided +-geometry ID (`geomID` argument) to that geometry. All geometries +-attached to a scene are defined to be included inside the scene. A +-geometry can get attached to multiple scenes. The passed user-defined +-geometry ID is used to identify the geometry when hit by a ray during +-ray queries. Using this function, it is possible to share the same IDs +-to refer to geometries inside the application and Embree. +- +-This function is thread-safe, thus multiple threads can attach +-geometries to a scene in parallel. +- +-The user-provided geometry ID must be unused in the scene, otherwise +-the creation of the geometry will fail. Further, the user-provided +-geometry IDs should be compact, as Embree internally creates a vector +-which size is equal to the largest geometry ID used. Creating very +-large geometry IDs for small scenes would thus cause a memory +-consumption and performance overhead. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcAttachGeometry] +- +-```{=tex} +- +-``` +-rtcDetachGeometry +------------------ +- +-#### NAME {#name} +- +- rtcDetachGeometry - detaches a geometry from the scene +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcDetachGeometry(RTCScene scene, unsigned int geomID); +- +-#### DESCRIPTION {#description} +- +-This function detaches a geometry identified by its geometry ID +-(`geomID` argument) from a scene (`scene` argument). When detached, the +-geometry is no longer contained in the scene. +- +-This function is thread-safe, thus multiple threads can detach +-geometries from a scene at the same time. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcAttachGeometry], [rtcAttachGeometryByID] +- +-```{=tex} +- +-``` +-rtcGetGeometry +--------------- +- +-#### NAME {#name} +- +- rtcGetGeometry - returns the geometry bound to +- the specified geometry ID +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- RTCGeometry rtcGetGeometry(RTCScene scene, unsigned int geomID); +- +-#### DESCRIPTION {#description} +- +-The `rtcGetGeometry` function returns the geometry that is bound to the +-specified geometry ID (`geomID` argument) for the specified scene +-(`scene` argument). This function just looks up the handle and does +-*not* increment the reference count. If you want to get ownership of +-the handle, you need to additionally call `rtcRetainGeometry`. +- +-This function is not thread safe and thus can be used during rendering. +-However, it is generally recommended to store the geometry handle +-inside the application's geometry representation and look up the +-geometry handle from that representation directly. +- +-If you need a thread safe version of this function please use +-[rtcGetGeometryThreadSafe]. +- +-#### EXIT STATUS {#exit-status} +- +-On failure `NULL` is returned and an error code is set that can be +-queried using `rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcAttachGeometry], [rtcAttachGeometryByID], +-[rtcGetGeometryThreadSafe] +- +-```{=tex} +- +-``` +-rtcGetGeometryThreadSafe +------------------------- +- +-#### NAME {#name} +- +- rtcGetGeometryThreadSafe - returns the geometry bound to +- the specified geometry ID +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- RTCGeometry rtcGetGeometryThreadSafe(RTCScene scene, unsigned int geomID); +- +-#### DESCRIPTION {#description} +- +-The `rtcGetGeometryThreadSafe` function returns the geometry that is +-bound to the specified geometry ID (`geomID` argument) for the +-specified scene (`scene` argument). This function just looks up the +-handle and does *not* increment the reference count. If you want to get +-ownership of the handle, you need to additionally call +-`rtcRetainGeometry`. +- +-This function is thread safe and should NOT get used during rendering. +-If you need a fast non-thread safe version during rendering please use +-the [rtcGetGeometry] function. +- +-#### EXIT STATUS {#exit-status} +- +-On failure `NULL` is returned and an error code is set that can be +-queried using `rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcAttachGeometry], [rtcAttachGeometryByID], [rtcGetGeometry] +- +-```{=tex} +- +-``` +-rtcCommitScene +--------------- +- +-#### NAME {#name} +- +- rtcCommitScene - commits scene changes +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcCommitScene(RTCScene scene); +- +-#### DESCRIPTION {#description} +- +-The `rtcCommitScene` function commits all changes for the specified +-scene (`scene` argument). This internally triggers building of a +-spatial acceleration structure for the scene using all available worker +-threads. Ray queries can be performed only after committing all scene +-changes. +- +-If the application uses TBB 2019 Update 9 or later for parallelization +-of rendering, lazy scene construction during rendering is supported by +-`rtcCommitScene`. Therefore `rtcCommitScene` can get called from +-multiple TBB worker threads concurrently for the same scene. The +-`rtcCommitScene` function will then internally isolate the scene +-construction using a tbb::isolated\_task\_group. The alternative +-approach of using `rtcJoinCommitScene` which uses an tbb:task\_arena +-internally, is not recommended due to it's high runtime overhead. +- +-If scene geometries get modified or attached or detached, the +-`rtcCommitScene` call must be invoked before performing any further ray +-queries for the scene; otherwise the effect of the ray query is +-undefined. The modification of a geometry, committing the scene, and +-tracing of rays must always happen sequentially, and never at the same +-time. Any API call that sets a property of the scene or geometries +-contained in the scene count as scene modification, e.g. including +-setting of intersection filter functions. +- +-The kind of acceleration structure built can be influenced using scene +-flags (see `rtcSetSceneFlags`), and the quality can be specified using +-the `rtcSetSceneBuildQuality` function. +- +-Embree silently ignores primitives during spatial acceleration +-structure construction that would cause numerical issues, +-e.g. primitives containing NaNs, INFs, or values greater than 1.844E18f +-(as no reasonable calculations can be performed with such values +-without causing overflows). +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcJoinCommitScene] +- +-```{=tex} +- +-``` +-rtcJoinCommitScene +------------------- +- +-#### NAME {#name} +- +- rtcJoinCommitScene - commits the scene from multiple threads +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcJoinCommitScene(RTCScene scene); +- +-#### DESCRIPTION {#description} +- +-The `rtcJoinCommitScene` function commits all changes for the specified +-scene (`scene` argument). The scene commit internally triggers building +-of a spatial acceleration structure for the scene. Ray queries can be +-performed after scene changes got properly committed. +- +-The `rtcJoinCommitScene` function can get called from multiple user +-threads which will all cooperate in the build operation. All threads +-calling into this function will return from `rtcJoinCommitScene` after +-the scene commit is finished. All threads must consistently call +-`rtcJoinCommitScene` and not `rtcCommitScene`. +- +-In contrast to the `rtcCommitScene` function, the `rtcJoinCommitScene` +-function can be called from multiple user threads, while the +-`rtcCommitScene` can only get called from multiple TBB worker threads +-when used concurrently. For optimal performance we strongly recommend +-using TBB inside the application together with the `rtcCommitScene` +-function and to avoid using the `rtcJoinCommitScene` function. +- +-The `rtcJoinCommitScene` feature allows a flexible way to lazily create +-hierarchies during rendering. A thread reaching a not-yet-constructed +-sub-scene of a two-level scene can generate the sub-scene geometry and +-call `rtcJoinCommitScene` on that just generated scene. During +-construction, further threads reaching the not-yet-built scene can join +-the build operation by also invoking `rtcJoinCommitScene`. A thread +-that calls `rtcJoinCommitScene` after the build finishes will directly +-return from the `rtcJoinCommitScene` call. +- +-Multiple scene commit operations on different scenes can be running at +-the same time, hence it is possible to commit many small scenes in +-parallel, distributing the commits to many threads. +- +-When using Embree with the Intel® Threading Building Blocks (which is +-the default), threads that call `rtcJoinCommitScene` will join the +-build operation, but other TBB worker threads might also participate in +-the build. To avoid thread oversubscription, we recommend using TBB +-also inside the application. Further, the join mode only works properly +-starting with TBB v4.4 Update 1. For earlier TBB versions, threads that +-call `rtcJoinCommitScene` to join a running build will just trigger the +-build and wait for the build to finish. Further, old TBB versions with +-`TBB_INTERFACE_VERSION_MAJOR < 8` do not support `rtcJoinCommitScene`, +-and invoking this function will result in an error. +- +-When using Embree with the internal tasking system, only threads that +-call `rtcJoinCommitScene` will perform the build operation, and no +-additional worker threads will be scheduled. +- +-When using Embree with the Parallel Patterns Library (PPL), +-`rtcJoinCommitScene` is not supported and calling that function will +-result in an error. +- +-To detect whether `rtcJoinCommitScene` is supported, use the +-`rtcGetDeviceProperty` function. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcCommitScene], [rtcGetDeviceProperty] +- +-```{=tex} +- +-``` +-rtcSetSceneProgressMonitorFunction +----------------------------------- +- +-#### NAME {#name} +- +- rtcSetSceneProgressMonitorFunction - registers a callback +- to track build progress +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- typedef bool (*RTCProgressMonitorFunction)( +- void* ptr, +- double n +- ); +- +- void rtcSetSceneProgressMonitorFunction( +- RTCScene scene, +- RTCProgressMonitorFunction progress, +- void* userPtr +- ); +- +-#### DESCRIPTION {#description} +- +-Embree supports a progress monitor callback mechanism that can be used +-to report progress of hierarchy build operations and to cancel build +-operations. +- +-The `rtcSetSceneProgressMonitorFunction` registers a progress monitor +-callback function (`progress` argument) with payload (`userPtr` +-argument) for the specified scene (`scene` argument). +- +-Only a single callback function can be registered per scene, and +-further invocations overwrite the previously set callback function. +-Passing `NULL` as function pointer disables the registered callback +-function. +- +-Once registered, Embree will invoke the callback function multiple +-times during hierarchy build operations of the scene, by passing the +-payload as set at registration time (`userPtr` argument), and a double +-in the range $[0, 1]$ which estimates the progress of the operation +-(`n` argument). The callback function might be called from multiple +-threads concurrently. +- +-When returning `true` from the callback function, Embree will continue +-the build operation normally. When returning `false`, Embree will +-cancel the build operation with the `RTC_ERROR_CANCELLED` error code. +-Issuing multiple cancel requests for the same build operation is +-allowed. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewScene] +- +-```{=tex} +- +-``` +-rtcSetSceneBuildQuality +------------------------ +- +-#### NAME {#name} +- +- rtcSetSceneBuildQuality - sets the build quality for +- the scene +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcSetSceneBuildQuality( +- RTCScene scene, +- enum RTCBuildQuality quality +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcSetSceneBuildQuality` function sets the build quality +-(`quality` argument) for the specified scene (`scene` argument). +-Possible values for the build quality are: +- +-- `RTC_BUILD_QUALITY_LOW`: Create lower quality data structures, +- e.g. for dynamic scenes. A two-level spatial index structure is +- built when enabling this mode, which supports fast partial scene +- updates, and allows for setting a per-geometry build quality +- through the `rtcSetGeometryBuildQuality` function. +- +-- `RTC_BUILD_QUALITY_MEDIUM`: Default build quality for most usages. +- Gives a good compromise between build and render performance. +- +-- `RTC_BUILD_QUALITY_HIGH`: Create higher quality data structures for +- final-frame rendering. For certain geometry types this enables a +- spatial split BVH. When high quality mode is enabled, filter +- callbacks may be invoked multiple times for the same geometry. +- +-Selecting a higher build quality results in better rendering +-performance but slower scene commit times. The default build quality +-for a scene is `RTC_BUILD_QUALITY_MEDIUM`. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcSetGeometryBuildQuality] +- +-```{=tex} +- +-``` +-rtcSetSceneFlags +----------------- +- +-#### NAME {#name} +- +- rtcSetSceneFlags - sets the flags for the scene +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- enum RTCSceneFlags +- { +- RTC_SCENE_FLAG_NONE = 0, +- RTC_SCENE_FLAG_DYNAMIC = (1 << 0), +- RTC_SCENE_FLAG_COMPACT = (1 << 1), +- RTC_SCENE_FLAG_ROBUST = (1 << 2), +- RTC_SCENE_FLAG_FILTER_FUNCTION_IN_ARGUMENTS = (1 << 3) +- }; +- +- void rtcSetSceneFlags(RTCScene scene, enum RTCSceneFlags flags); +- +-#### DESCRIPTION {#description} +- +-The `rtcSetSceneFlags` function sets the scene flags (`flags` argument) +-for the specified scene (`scene` argument). Possible scene flags are: +- +-- `RTC_SCENE_FLAG_NONE`: No flags set. +- +-- `RTC_SCENE_FLAG_DYNAMIC`: Provides better build performance for +- dynamic scenes (but also higher memory consumption). +- +-- `RTC_SCENE_FLAG_COMPACT`: Uses compact acceleration structures and +- avoids algorithms that consume much memory. +- +-- `RTC_SCENE_FLAG_ROBUST`: Uses acceleration structures that allow +- for robust traversal, and avoids optimizations that reduce +- arithmetic accuracy. This mode is typically used for avoiding +- artifacts caused by rays shooting through edges of neighboring +- primitives. +- +-- `RTC_SCENE_FLAG_FILTER_FUNCTION_IN_ARGUMENTS`: Enables scene +- support for filter functions passed as argument to the traversal +- functions. See Section [rtcInitIntersectArguments] and +- [rtcInitOccludedArguments] for more details. +- +-Multiple flags can be enabled using an `or` operation, +-e.g. `RTC_SCENE_FLAG_COMPACT | RTC_SCENE_FLAG_ROBUST`. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcGetSceneFlags] +- +-```{=tex} +- +-``` +-rtcGetSceneFlags +----------------- +- +-#### NAME {#name} +- +- rtcGetSceneFlags - returns the flags of the scene +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- enum RTCSceneFlags rtcGetSceneFlags(RTCScene scene); +- +-#### DESCRIPTION {#description} +- +-Queries the flags of a scene. This function can be useful when setting +-individual flags, e.g. to just set the robust mode without changing +-other flags the following way: +- +- RTCSceneFlags flags = rtcGetSceneFlags(scene); +- rtcSetSceneFlags(scene, RTC_SCENE_FLAG_ROBUST | flags); +- +-#### EXIT STATUS {#exit-status} +- +-On failure `RTC_SCENE_FLAG_NONE` is returned and an error code is set +-that can be queried using `rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcSetSceneFlags] +- +-```{=tex} +- +-``` +-rtcGetSceneBounds +------------------ +- +-#### NAME {#name} +- +- rtcGetSceneBounds - returns the axis-aligned bounding box of the scene +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- struct RTCORE_ALIGN(16) RTCBounds +- { +- float lower_x, lower_y, lower_z, align0; +- float upper_x, upper_y, upper_z, align1; +- }; +- +- void rtcGetSceneBounds( +- RTCScene scene, +- struct RTCBounds* bounds_o +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcGetSceneBounds` function queries the axis-aligned bounding box +-of the specified scene (`scene` argument) and stores that bounding box +-to the provided destination pointer (`bounds_o` argument). The stored +-bounding box consists of lower and upper bounds for the x, y, and z +-dimensions as specified by the `RTCBounds` structure. +- +-The provided destination pointer must be aligned to 16 bytes. The +-function may be invoked only after committing the scene; otherwise the +-result is undefined. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcGetSceneLinearBounds], [rtcCommitScene], [rtcJoinCommitScene] +- +-```{=tex} +- +-``` +-rtcGetSceneLinearBounds +------------------------ +- +-#### NAME {#name} +- +- rtcGetSceneLinearBounds - returns the linear bounds of the scene +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- struct RTCORE_ALIGN(16) RTCLinearBounds +- { +- RTCBounds bounds0; +- RTCBounds bounds1; +- }; +- +- void rtcGetSceneLinearBounds( +- RTCScene scene, +- struct RTCLinearBounds* bounds_o +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcGetSceneLinearBounds` function queries the linear bounds of the +-specified scene (`scene` argument) and stores them to the provided +-destination pointer (`bounds_o` argument). The stored linear bounds +-consist of bounding boxes for time 0 (`bounds0` member) and time 1 +-(`bounds1` member) as specified by the `RTCLinearBounds` structure. +-Linearly interpolating these bounds to a specific time `t` yields +-bounds for the geometry at that time. +- +-The provided destination pointer must be aligned to 16 bytes. The +-function may be called only after committing the scene, otherwise the +-result is undefined. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcGetSceneBounds], [rtcCommitScene], [rtcJoinCommitScene] +- +-```{=tex} +- +-``` +-rtcNewGeometry +--------------- +- +-#### NAME {#name} +- +- rtcNewGeometry - creates a new geometry object +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- enum RTCGeometryType +- { +- RTC_GEOMETRY_TYPE_TRIANGLE, +- RTC_GEOMETRY_TYPE_QUAD, +- RTC_GEOMETRY_TYPE_SUBDIVISION, +- RTC_GEOMETRY_TYPE_FLAT_LINEAR_CURVE, +- RTC_GEOMETRY_TYPE_FLAT_BEZIER_CURVE, +- RTC_GEOMETRY_TYPE_FLAT_BSPLINE_CURVE, +- RTC_GEOMETRY_TYPE_FLAT_HERMITE_CURVE, +- RTC_GEOMETRY_TYPE_FLAT_CATMULL_ROM_CURVE, +- RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_BEZIER_CURVE, +- RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_BSPLINE_CURVE, +- RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_HERMITE_CURVE, +- RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_CATMULL_ROM_CURVE, +- RTC_GEOMETRY_TYPE_CONE_LINEAR_CURVE, +- RTC_GEOMETRY_TYPE_ROUND_LINEAR_CURVE, +- RTC_GEOMETRY_TYPE_ROUND_BEZIER_CURVE, +- RTC_GEOMETRY_TYPE_ROUND_BSPLINE_CURVE, +- RTC_GEOMETRY_TYPE_ROUND_HERMITE_CURVE, +- RTC_GEOMETRY_TYPE_ROUND_CATMULL_ROM_CURVE, +- RTC_GEOMETRY_TYPE_GRID, +- RTC_GEOMETRY_TYPE_SPHERE_POINT, +- RTC_GEOMETRY_TYPE_DISC_POINT, +- RTC_GEOMETRY_TYPE_ORIENTED_DISC_POINT, +- RTC_GEOMETRY_TYPE_USER, +- RTC_GEOMETRY_TYPE_INSTANCE, +- RTC_GEOMETRY_TYPE_INSTANCE_ARRAY, +- }; +- +- RTCGeometry rtcNewGeometry( +- RTCDevice device, +- enum RTCGeometryType type +- ); +- +-#### DESCRIPTION {#description} +- +-Geometries are objects that represent an array of primitives of the +-same type. The `rtcNewGeometry` function creates a new geometry of +-specified type (`type` argument) bound to the specified device +-(`device` argument) and returns a handle to this geometry. The geometry +-object is reference counted with an initial reference count of 1. The +-geometry handle can be released using the `rtcReleaseGeometry` API +-call. +- +-Supported geometry types are triangle meshes +-(`RTC_GEOMETRY_TYPE_TRIANGLE` type), quad meshes (triangle pairs) +-(`RTC_GEOMETRY_TYPE_QUAD` type), Catmull-Clark subdivision surfaces +-(`RTC_GEOMETRY_TYPE_SUBDIVISION` type), curve geometries with different +-bases (`RTC_GEOMETRY_TYPE_FLAT_LINEAR_CURVE`, +-`RTC_GEOMETRY_TYPE_FLAT_BEZIER_CURVE`,\ +-`RTC_GEOMETRY_TYPE_FLAT_BSPLINE_CURVE`, +-`RTC_GEOMETRY_TYPE_FLAT_HERMITE_CURVE`,\ +-`RTC_GEOMETRY_TYPE_FLAT_CATMULL_ROM_CURVE`, +-`RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_BEZIER_CURVE`, +-`RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_BSPLINE_CURVE`, +-`RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_HERMITE_CURVE`, +-`RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_CATMULL_ROM_CURVE`, +-`RTC_GEOMETRY_TYPE_CONE_LINEAR_CURVE`, +-`RTC_GEOMETRY_TYPE_ROUND_LINEAR_CURVE`, +-`RTC_GEOMETRY_TYPE_ROUND_BEZIER_CURVE`, +-`RTC_GEOMETRY_TYPE_ROUND_BSPLINE_CURVE`, +-`RTC_GEOMETRY_TYPE_ROUND_HERMITE_CURVE`, +-`RTC_GEOMETRY_TYPE_ROUND_CATMULL_ROM_CURVE` types) grid meshes +-(`RTC_GEOMETRY_TYPE_GRID`), point geometries +-(`RTC_GEOMETRY_TYPE_SPHERE_POINT`, `RTC_GEOMETRY_TYPE_DISC_POINT`, +-`RTC_TYPE_ORIENTED_DISC_POINT`), user-defined geometries +-(`RTC_GEOMETRY_TYPE_USER`), instances (`RTC_GEOMETRY_TYPE_INSTANCE`), +-and instance arrays (`RTC_GEOMETRY_TYPE_INSTANCE_ARRAY`). +- +-The types `RTC_GEOMETRY_TYPE_ROUND_BEZIER_CURVE`, +-`RTC_GEOMETRY_TYPE_ROUND_BSPLINE_CURVE`, and +-`RTC_GEOMETRY_TYPE_ROUND_CATMULL_ROM_CURVE` will treat the curve as a +-sweep surface of a varying-radius circle swept tangentially along the +-curve. The types `RTC_GEOMETRY_TYPE_FLAT_BEZIER_CURVE`, +-`RTC_GEOMETRY_TYPE_FLAT_BSPLINE_CURVE`, and +-`RTC_GEOMETRY_TYPE_FLAT_CATMULL_ROM_CURVE` use ray-facing ribbons as a +-faster-to-intersect approximation. +- +-After construction, geometries are enabled by default and not attached +-to any scene. Geometries can be disabled (`rtcDisableGeometry` call), +-and enabled again (`rtcEnableGeometry` call). A geometry can be +-attached to multiple scenes using the `rtcAttachGeometry` call (or +-`rtcAttachGeometryByID` call), and detached using the +-`rtcDetachGeometry` call. During attachment, a geometry ID is assigned +-to the geometry (or assigned by the user when using the +-`rtcAttachGeometryByID` call), which uniquely identifies the geometry +-inside that scene. This identifier is returned when primitives of the +-geometry are hit in later ray queries for the scene. +- +-Geometries can also be modified, including their vertex and index +-buffers. After modifying a buffer, `rtcUpdateGeometryBuffer` must be +-called to notify that the buffer got modified. +- +-The application can use the `rtcSetGeometryUserData` function to set a +-user data pointer to its own geometry representation, and later read +-out this pointer using the `rtcGetGeometryUserData` function. +- +-After setting up the geometry or modifying it, `rtcCommitGeometry` must +-be called to finish the geometry setup. After committing the geometry, +-vertex data interpolation can be performed using the `rtcInterpolate` +-and `rtcInterpolateN` functions. +- +-A build quality can be specified for a geometry using the +-`rtcSetGeometryBuildQuality` function, to balance between acceleration +-structure build performance and ray query performance. The build +-quality per geometry will be used if a two-level acceleration structure +-is built internally, which is the case if the `RTC_BUILD_QUALITY_LOW` +-is set as the scene build quality. See Section +-[rtcSetSceneBuildQuality] for more details. +- +-#### EXIT STATUS {#exit-status} +- +-On failure `NULL` is returned and an error code is set that can be +-queried using `rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcEnableGeometry], [rtcDisableGeometry], [rtcAttachGeometry], +-[rtcAttachGeometryByID], [rtcUpdateGeometryBuffer], +-[rtcSetGeometryUserData], [rtcGetGeometryUserData], +-[rtcCommitGeometry], [rtcInterpolate], [rtcInterpolateN], +-[rtcSetGeometryBuildQuality], [rtcSetSceneBuildQuality], +-[RTC\_GEOMETRY\_TYPE\_TRIANGLE], [RTC\_GEOMETRY\_TYPE\_QUAD], +-[RTC\_GEOMETRY\_TYPE\_SUBDIVISION], [RTC\_GEOMETRY\_TYPE\_CURVE], +-[RTC\_GEOMETRY\_TYPE\_GRID], [RTC\_GEOMETRY\_TYPE\_POINT], +-[RTC\_GEOMETRY\_TYPE\_USER], [RTC\_GEOMETRY\_TYPE\_INSTANCE], +-[RTC\_GEOMETRY\_TYPE\_INSTANCE\_ARRAY] +- +-```{=tex} +- +-``` +-RTC\_GEOMETRY\_TYPE\_TRIANGLE +------------------------------ +- +-#### NAME {#name} +- +- RTC_GEOMETRY_TYPE_TRIANGLE - triangle geometry type +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- RTCGeometry geometry = +- rtcNewGeometry(device, RTC_GEOMETRY_TYPE_TRIANGLE); +- +-#### DESCRIPTION {#description} +- +-Triangle meshes are created by passing `RTC_GEOMETRY_TYPE_TRIANGLE` to +-the `rtcNewGeometry` function call. The triangle indices can be +-specified by setting an index buffer (`RTC_BUFFER_TYPE_INDEX` type) and +-the triangle vertices by setting a vertex buffer +-(`RTC_BUFFER_TYPE_VERTEX` type). See `rtcSetGeometryBuffer` and +-`rtcSetSharedGeometryBuffer` for more details on how to set buffers. +-The index buffer must contain an array of three 32-bit indices per +-triangle (`RTC_FORMAT_UINT3` format) and the number of primitives is +-inferred from the size of that buffer. The vertex buffer must contain +-an array of single precision `x`, `y`, `z` floating point coordinates +-(`RTC_FORMAT_FLOAT3` format), and the number of vertices are inferred +-from the size of that buffer. The vertex buffer can be at most 16 GB +-large. +- +-The parametrization of a triangle uses the first vertex `p0` as base +-point, the vector `p1 - p0` as u-direction and the vector `p2 - p0` as +-v-direction. Thus vertex attributes `t0,t1,t2` can be linearly +-interpolated over the triangle the following way: +- +- t_uv = (1-u-v)*t0 + u*t1 + v*t2 +- = t0 + u*(t1-t0) + v*(t2-t0) +- +-A triangle whose vertices are laid out counter-clockwise has its +-geometry normal pointing upwards outside the front face, like +-illustrated in the following picture: +- +-![][imgTriangleUV] +- +-For multi-segment motion blur, the number of time steps must be first +-specified using the `rtcSetGeometryTimeStepCount` call. Then a vertex +-buffer for each time step can be set using different buffer slots, and +-all these buffers have to have the same stride and size. +- +-Also see tutorial [Triangle Geometry] for an example of how to create +-triangle meshes. +- +-#### EXIT STATUS {#exit-status} +- +-On failure `NULL` is returned and an error code is set that be get +-queried using `rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewGeometry] +- +-```{=tex} +- +-``` +-RTC\_GEOMETRY\_TYPE\_QUAD +-------------------------- +- +-#### NAME {#name} +- +- RTC_GEOMETRY_TYPE_QUAD - quad geometry type +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- RTCGeometry geometry = +- rtcNewGeometry(device, RTC_GEOMETRY_TYPE_QUAD); +- +-#### DESCRIPTION {#description} +- +-Quad meshes are created by passing `RTC_GEOMETRY_TYPE_QUAD` to the +-`rtcNewGeometry` function call. The quad indices can be specified by +-setting an index buffer (`RTC_BUFFER_TYPE_INDEX` type) and the quad +-vertices by setting a vertex buffer (`RTC_BUFFER_TYPE_VERTEX` type). +-See `rtcSetGeometryBuffer` and `rtcSetSharedGeometryBuffer` for more +-details on how to set buffers. The index buffer contains an array of +-four 32-bit indices per quad (`RTC_FORMAT_UINT4` format), and the +-number of primitives is inferred from the size of that buffer. The +-vertex buffer contains an array of single precision `x`, `y`, `z` +-floating point coordinates (`RTC_FORMAT_FLOAT3` format), and the number +-of vertices is inferred from the size of that buffer. The vertex buffer +-can be at most 16 GB large. +- +-A quad is internally handled as a pair of two triangles `v0,v1,v3` and +-`v2,v3,v1`, with the `u'`/`v'` coordinates of the second triangle +-corrected by `u = 1-u'` and `v = 1-v'` to produce a quad +-parametrization where `u` and `v` are in the range 0 to 1. Thus the +-parametrization of a quad uses the first vertex `p0` as base point, and +-the vector `p1 - p0` as `u`-direction, and `p3 - p0` as v-direction. +-Thus vertex attributes `t0,t1,t2,t3` can be bilinearly interpolated +-over the quadrilateral the following way: +- +- t_uv = (1-v)((1-u)*t0 + u*t1) + v*((1-u)*t3 + u*t2) +- +-Mixed triangle/quad meshes are supported by encoding a triangle as a +-quad, which can be achieved by replicating the last triangle vertex +-(`v0,v1,v2` -\> `v0,v1,v2,v2`). This way the second triangle is a line +-(which can never get hit), and the parametrization of the first +-triangle is compatible with the standard triangle parametrization. +- +-A quad whose vertices are laid out counter-clockwise has its geometry +-normal pointing upwards outside the front face, like illustrated in the +-following picture. +- +-![][imgQuadUV] +- +-For multi-segment motion blur, the number of time steps must be first +-specified using the `rtcSetGeometryTimeStepCount` call. Then a vertex +-buffer for each time step can be set using different buffer slots, and +-all these buffers must have the same stride and size. +- +-#### EXIT STATUS {#exit-status} +- +-On failure `NULL` is returned and an error code is set that can be +-queried using `rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewGeometry] +- +-```{=tex} +- +-``` +-RTC\_GEOMETRY\_TYPE\_GRID +-------------------------- +- +-#### NAME {#name} +- +- RTC_GEOMETRY_TYPE_GRID - grid geometry type +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- RTCGeometry geometry = +- rtcNewGeometry(device, RTC_GEOMETRY_TYPE_GRID); +- +-#### DESCRIPTION {#description} +- +-Grid meshes are created by passing `RTC_GEOMETRY_TYPE_GRID` to the +-`rtcNewGeometry` function call, and contain an array of grid +-primitives. This array of grids can be specified by setting up a grid +-buffer (with `RTC_BUFFER_TYPE_GRID` type and `RTC_FORMAT_GRID` format) +-and the grid mesh vertices by setting a vertex buffer +-(`RTC_BUFFER_TYPE_VERTEX` type). See `rtcSetGeometryBuffer` and +-`rtcSetSharedGeometryBuffer` for more details on how to set buffers. +-The number of grid primitives in the grid mesh is inferred from the +-size of the grid buffer. +- +-The vertex buffer contains an array of single precision `x`, `y`, `z` +-floating point coordinates (`RTC_FORMAT_FLOAT3` format), and the number +-of vertices is inferred from the size of that buffer. +- +-Each grid in the grid buffer is of the type `RTCGrid`: +- +- struct RTCGrid +- { +- unsigned int startVertexID; +- unsigned int stride; +- unsigned short width,height; +- }; +- +-The `RTCGrid` structure describes a 2D grid of vertices (with respect +-to the vertex buffer of the grid mesh). The `width` and `height` +-members specify the number of vertices in u and v direction, +-e.g. setting both `width` and `height` to 3 sets up a 3×3 vertex grid. +-The maximum allowed `width` and `height` is 32767. The `startVertexID` +-specifies the ID of the top-left vertex in the vertex grid, while the +-`stride` parameter specifies a stride (in number of vertices) used to +-step to the next row. +- +-A vertex grid of dimensions `width` and `height` is treated as a +-`(width-1)` x `(height-1)` grid of `quads` (triangle-pairs), with the +-same shared edge handling as for regular quad meshes. However, the +-`u`/`v` coordinates have the uniform range `[0..1]` for an entire +-vertex grid. The `u` direction follows the `width` of the grid while +-the `v` direction the `height`. +- +-For multi-segment motion blur, the number of time steps must be first +-specified using the `rtcSetGeometryTimeStepCount` call. Then a vertex +-buffer for each time step can be set using different buffer slots, and +-all these buffers must have the same stride and size. +- +-#### EXIT STATUS {#exit-status} +- +-On failure `NULL` is returned and an error code is set that can be +-queried using `rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewGeometry] +- +-```{=tex} +- +-``` +-RTC\_GEOMETRY\_TYPE\_SUBDIVISION +--------------------------------- +- +-#### NAME {#name} +- +- RTC_GEOMETRY_TYPE_SUBDIVISION - subdivision geometry type +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- RTCGeometry geometry = +- rtcNewGeometry(device, RTC_GEOMETRY_TYPE_SUBDIVISION); +- +-#### DESCRIPTION {#description} +- +-Catmull-Clark subdivision meshes are supported, including support for +-edge creases, vertex creases, holes, non-manifold geometry, and +-face-varying interpolation. The number of vertices per face can be in +-the range of 3 to 15 vertices (triangles, quadrilateral, pentagons, +-etc). +- +-Subdivision meshes are created by passing +-`RTC_GEOMETRY_TYPE_SUBDIVISION` to the `rtcNewGeometry` function. +-Various buffers need to be set by the application to set up the +-subdivision mesh. See `rtcSetGeometryBuffer` and +-`rtcSetSharedGeometryBuffer` for more details on how to set buffers. +-The face buffer (`RTC_BUFFER_TYPE_FACE` type and `RTC_FORMAT_UINT` +-format) contains the number of edges/indices of each face (3 to 15), +-and the number of faces is inferred from the size of this buffer. The +-index buffer (`RTC_BUFFER_TYPE_INDEX` type) contains multiple (3 to 15) +-32-bit vertex indices (`RTC_FORMAT_UINT` format) for each face, and the +-number of edges is inferred from the size of this buffer. The vertex +-buffer (`RTC_BUFFER_TYPE_VERTEX` type) stores an array of single +-precision `x`, `y`, `z` floating point coordinates (`RTC_FORMAT_FLOAT3` +-format), and the number of vertices is inferred from the size of this +-buffer. +- +-Optionally, the application may set additional index buffers using +-different buffer slots if multiple topologies are required for +-face-varying interpolation. The standard vertex buffers +-(`RTC_BUFFER_TYPE_VERTEX`) are always bound to the geometry topology +-(topology 0) thus use `RTC_BUFFER_TYPE_INDEX` with buffer slot 0. User +-vertex data interpolation may use different topologies as described +-later. +- +-Optionally, the application can set up the hole buffer +-(`RTC_BUFFER_TYPE_HOLE`) which contains an array of 32-bit indices +-(`RTC_FORMAT_UINT` format) of faces that should be considered +-non-existing in all topologies. The number of holes is inferred from +-the size of this buffer. +- +-Optionally, the application can fill the level buffer +-(`RTC_BUFFER_TYPE_LEVEL`) with a tessellation rate for each of the +-edges of each face. This buffer must have the same size as the index +-buffer. The tessellation level is a positive floating point value +-(`RTC_FORMAT_FLOAT` format) that specifies how many quads along the +-edge should be generated during tessellation. If no level buffer is +-specified, a level of 1 is used. The maximally supported edge level is +-4096, and larger levels are clamped to that value. Note that edges may +-be shared between (typically 2) faces. To guarantee a watertight +-tessellation, the level of these shared edges should be identical. A +-uniform tessellation rate for an entire subdivision mesh can be set by +-using the `rtcSetGeometryTessellationRate` function. The existence of a +-level buffer has precedence over the uniform tessellation rate. +- +-Optionally, the application can fill the sparse edge crease buffers to +-make edges appear sharper. The edge crease index buffer +-(`RTC_BUFFER_TYPE_EDGE_CREASE_INDEX`) contains an array of pairs of +-32-bit vertex indices (`RTC_FORMAT_UINT2` format) that specify +-unoriented edges in the geometry topology. The edge crease weight +-buffer (`RTC_BUFFER_TYPE_EDGE_CREASE_WEIGHT`) stores for each of these +-crease edges a positive floating point weight (`RTC_FORMAT_FLOAT` +-format). The number of edge creases is inferred from the size of these +-buffers, which has to be identical. The larger a weight, the sharper +-the edge. Specifying a weight of infinity is supported and marks an +-edge as infinitely sharp. Storing an edge multiple times with the same +-crease weight is allowed, but has lower performance. Storing an edge +-multiple times with different crease weights results in undefined +-behavior. For a stored edge (i,j), the reverse direction edges (j,i) do +-not have to be stored, as both are considered the same unoriented edge. +-Edge crease features are shared between all topologies. +- +-Optionally, the application can fill the sparse vertex crease buffers +-to make vertices appear sharper. The vertex crease index buffer +-(`RTC_BUFFER_TYPE_VERTEX_CREASE_INDEX`), contains an array of 32-bit +-vertex indices (`RTC_FORMAT_UINT` format) to specify a set of vertices +-from the geometry topology. The vertex crease weight buffer +-(`RTC_BUFFER_TYPE_VERTEX_CREASE_WEIGHT`) specifies for each of these +-vertices a positive floating point weight (`RTC_FORMAT_FLOAT` format). +-The number of vertex creases is inferred from the size of these +-buffers, and has to be identical. The larger a weight, the sharper the +-vertex. Specifying a weight of infinity is supported and makes the +-vertex infinitely sharp. Storing a vertex multiple times with the same +-crease weight is allowed, but has lower performance. Storing a vertex +-multiple times with different crease weights results in undefined +-behavior. Vertex crease features are shared between all topologies. +- +-Subdivision modes can be used to force linear interpolation for parts +-of the subdivision mesh; see `rtcSetGeometrySubdivisionMode` for more +-details. +- +-For multi-segment motion blur, the number of time steps must be first +-specified using the `rtcSetGeometryTimeStepCount` call. Then a vertex +-buffer for each time step can be set using different buffer slots, and +-all these buffers have to have the same stride and size. +- +-Also see tutorial [Subdivision Geometry] for an example of how to +-create subdivision surfaces. +- +-#### Parametrization +- +-The parametrization for subdivision faces is different for +-quadrilaterals and non-quadrilateral faces. +- +-The parametrization of a quadrilateral face uses the first vertex `p0` +-as base point, and the vector `p1 - p0` as u-direction and `p3 - p0` as +-v-direction. +- +-The parametrization for all other face types (with number of vertices +-not equal 4), have a special parametrization where the subpatch ID `n` +-(of the `n`-th quadrilateral that would be obtained by a single +-subdivision step) and the local hit location inside this quadrilateral +-are encoded in the UV coordinates. The following code extracts the +-sub-patch ID `i` and local UVs of this subpatch: +- +- unsigned int l = floorf(0.5f*U); +- unsigned int h = floorf(0.5f*V); +- unsigned int i = 4*h+l; +- float u = 2.0f*fracf(0.5f*U)-0.5f; +- float v = 2.0f*fracf(0.5f*V)-0.5f; +- +-This encoding allows local subpatch UVs to be in the range `[-0.5,1.5[` +-thus negative subpatch UVs can be passed to `rtcInterpolate` to sample +-subpatches slightly out of bounds. This can be useful to calculate +-derivatives using finite differences if required. The encoding further +-has the property that one can just move the value `u` (or `v`) on a +-subpatch by adding `du` (or `dv`) to the special UV encoding as long as +-it does not fall out of the `[-0.5,1.5[` range. +- +-To smoothly interpolate vertex attributes over the subdivision surface +-we recommend using the `rtcInterpolate` function, which will apply the +-standard subdivision rules for interpolation and automatically takes +-care of the special UV encoding for non-quadrilaterals. +- +-#### Face-Varying Data +- +-Face-varying interpolation is supported through multiple topologies per +-subdivision mesh and binding such topologies to vertex attribute +-buffers to interpolate. This way, texture coordinates may use a +-different topology with additional boundaries to construct separate UV +-regions inside one subdivision mesh. +- +-Each such topology `i` has a separate index buffer (specified using +-`RTC_BUFFER_TYPE_INDEX` with buffer slot `i`) and separate subdivision +-mode that can be set using `rtcSetGeometrySubdivisionMode`. A vertex +-attribute buffer `RTC_BUFFER_TYPE_VERTEX_ATTRIBUTE` bound to a buffer +-slot `j` can be assigned to use a topology for interpolation using the +-`rtcSetGeometryVertexAttributeTopology` call. +- +-The face buffer (`RTC_BUFFER_TYPE_FACE` type) is shared between all +-topologies, which means that the `n`-th primitive always has the same +-number of vertices (e.g. being a triangle or a quad) for each topology. +-However, the indices of the topologies themselves may be different. +- +-#### EXIT STATUS {#exit-status} +- +-On failure `NULL` is returned and an error code is set that can be +-queried using `rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewGeometry] +- +-```{=tex} +- +-``` +-RTC\_GEOMETRY\_TYPE\_CURVE +--------------------------- +- +-#### NAME {#name} +- +- RTC_GEOMETRY_TYPE_FLAT_LINEAR_CURVE - +- flat curve geometry with linear basis +- +- RTC_GEOMETRY_TYPE_FLAT_BEZIER_CURVE - +- flat curve geometry with cubic Bézier basis +- +- RTC_GEOMETRY_TYPE_FLAT_BSPLINE_CURVE - +- flat curve geometry with cubic B-spline basis +- +- RTC_GEOMETRY_TYPE_FLAT_HERMITE_CURVE - +- flat curve geometry with cubic Hermite basis +- +- RTC_GEOMETRY_TYPE_FLAT_CATMULL_ROM_CURVE - +- flat curve geometry with Catmull-Rom basis +- +- RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_BEZIER_CURVE - +- flat normal oriented curve geometry with cubic Bézier basis +- +- RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_BSPLINE_CURVE - +- flat normal oriented curve geometry with cubic B-spline basis +- +- RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_HERMITE_CURVE - +- flat normal oriented curve geometry with cubic Hermite basis +- +- RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_CATMULL_ROM_CURVE - +- flat normal oriented curve geometry with Catmull-Rom basis +- +- RTC_GEOMETRY_TYPE_CONE_LINEAR_CURVE - +- capped cone curve geometry with linear basis - discontinuous at edge boundaries +- +- RTC_GEOMETRY_TYPE_ROUND_LINEAR_CURVE - +- capped cone curve geometry with linear basis and spherical ending +- +- RTC_GEOMETRY_TYPE_ROUND_BEZIER_CURVE - +- swept surface curve geometry with cubic Bézier basis +- +- RTC_GEOMETRY_TYPE_ROUND_BSPLINE_CURVE - +- swept surface curve geometry with cubic B-spline basis +- +- RTC_GEOMETRY_TYPE_ROUND_HERMITE_CURVE - +- swept surface curve geometry with cubic Hermite basis +- +- RTC_GEOMETRY_TYPE_ROUND_CATMULL_ROM_CURVE - +- swept surface curve geometry with Catmull-Rom basis +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- rtcNewGeometry(device, RTC_GEOMETRY_TYPE_FLAT_LINEAR_CURVE); +- rtcNewGeometry(device, RTC_GEOMETRY_TYPE_FLAT_BEZIER_CURVE); +- rtcNewGeometry(device, RTC_GEOMETRY_TYPE_FLAT_BSPLINE_CURVE); +- rtcNewGeometry(device, RTC_GEOMETRY_TYPE_FLAT_HERMITE_CURVE); +- rtcNewGeometry(device, RTC_GEOMETRY_TYPE_FLAT_CATMULL_ROM_CURVE); +- rtcNewGeometry(device, RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_BEZIER_CURVE); +- rtcNewGeometry(device, RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_BSPLINE_CURVE); +- rtcNewGeometry(device, RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_HERMITE_CURVE); +- rtcNewGeometry(device, RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_CATMULL_ROM_CURVE); +- rtcNewGeometry(device, RTC_GEOMETRY_TYPE_CONE_LINEAR_CURVE); +- rtcNewGeometry(device, RTC_GEOMETRY_TYPE_ROUND_LINEAR_CURVE); +- rtcNewGeometry(device, RTC_GEOMETRY_TYPE_ROUND_BEZIER_CURVE); +- rtcNewGeometry(device, RTC_GEOMETRY_TYPE_ROUND_BSPLINE_CURVE); +- rtcNewGeometry(device, RTC_GEOMETRY_TYPE_ROUND_HERMITE_CURVE); +- rtcNewGeometry(device, RTC_GEOMETRY_TYPE_ROUND_CATMULL_ROM_CURVE); +- +-#### DESCRIPTION {#description} +- +-Curves with per vertex radii are supported with linear, cubic Bézier, +-cubic B-spline, and cubic Hermite bases. Such curve geometries are +-created by passing `RTC_GEOMETRY_TYPE_FLAT_LINEAR_CURVE`, +-`RTC_GEOMETRY_TYPE_FLAT_BEZIER_CURVE`, +-`RTC_GEOMETRY_TYPE_FLAT_BSPLINE_CURVE`, +-`RTC_GEOMETRY_TYPE_FLAT_HERMITE_CURVE`, +-`RTC_GEOMETRY_TYPE_FLAT_CATMULL_ROM_CURVE`, +-`RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_FLAT_BEZIER_CURVE`, +-`RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_FLAT_BSPLINE_CURVE`, +-`RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_FLAT_HERMITE_CURVE`, +-`RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_FLAT_CATMULL_ROM_CURVE`, +-`RTC_GEOMETRY_TYPE_CONE_LINEAR_CURVE`, +-`RTC_GEOMETRY_TYPE_ROUND_LINEAR_CURVE`, +-`RTC_GEOMETRY_TYPE_ROUND_BEZIER_CURVE`, +-`RTC_GEOMETRY_TYPE_ROUND_BSPLINE_CURVE`, +-`RTC_GEOMETRY_TYPE_ROUND_HERMITE_CURVE`, or +-`RTC_GEOMETRY_TYPE_ROUND_CATMULL_ROM_CURVE` to the `rtcNewGeometry` +-function. The curve indices can be specified through an index buffer +-(`RTC_BUFFER_TYPE_INDEX`) and the curve vertices through a vertex +-buffer (`RTC_BUFFER_TYPE_VERTEX`). For the Hermite basis a tangent +-buffer (`RTC_BUFFER_TYPE_TANGENT`), normal oriented curves a normal +-buffer (`RTC_BUFFER_TYPE_NORMAL`), and for normal oriented Hermite +-curves a normal derivative buffer (`RTC_BUFFER_TYPE_NORMAL_DERIVATIVE`) +-has to get specified additionally. See `rtcSetGeometryBuffer` and +-`rtcSetSharedGeometryBuffer` for more details on how to set buffers. +- +-The index buffer contains an array of 32-bit indices (`RTC_FORMAT_UINT` +-format), each pointing to the first control vertex in the vertex +-buffer, but also to the first tangent in the tangent buffer, and first +-normal in the normal buffer if these buffers are present. +- +-The vertex buffer stores each control vertex in the form of a single +-precision position and radius stored in (`x`, `y`, `z`, `r`) order in +-memory (`RTC_FORMAT_FLOAT4` format). The number of vertices is inferred +-from the size of this buffer. The radii may be smaller than zero but +-the interpolated radii should always be greater or equal to zero. +-Similarly, the tangent buffer stores the derivative of each control +-vertex (`x`, `y`, `z`, `r` order and `RTC_FORMAT_FLOAT4` format) and +-the normal buffer stores a single precision normal per control vertex +-(`x`, `y`, `z` order and `RTC_FORMAT_FLOAT3` format). +- +-##### Linear Basis +- +-For the linear basis the indices point to the first of 2 consecutive +-control points in the vertex buffer. The first control point is the +-start and the second control point the end of the line segment. When +-constructing hair strands in this basis, the end-point can be shared +-with the start of the next line segment. +- +-For the linear basis the user optionally can provide a flags buffer of +-type `RTC_BUFFER_TYPE_FLAGS` which contains bytes that encode if the +-left neighbor segment (`RTC_CURVE_FLAG_NEIGHBOR_LEFT` flag) and/or +-right neighbor segment (`RTC_CURVE_FLAG_NEIGHBOR_RIGHT` flags) exist +-(see [RTCCurveFlags]). If this buffer is not set, than the left/right +-neighbor bits are automatically calculated base on the index buffer +-(left segment exists if segment(id-1)+1 == segment(id) and right +-segment exists if segment(id+1)-1 == segment(id)). +- +-A left neighbor segment is assumed to end at the start vertex of the +-current segment, and to start at the previous vertex in the vertex +-buffer. Similarly, the right neighbor segment is assumed to start at +-the end vertex of the current segment, and to end at the next vertex in +-the vertex buffer. +- +-Only when the left and right bits are properly specified the current +-segment can properly attach to the left and/or right neighbor, +-otherwise the touching area may not get rendered properly. +- +-##### Bézier Basis +- +-For the cubic Bézier basis the indices point to the first of 4 +-consecutive control points in the vertex buffer. These control points +-use the cubic Bézier basis, where the first control point represents +-the start point of the curve, and the 4th control point the end point +-of the curve. The Bézier basis is interpolating, thus the curve does go +-exactly through the first and fourth control vertex. +- +-##### B-spline Basis +- +-For the cubic B-spline basis the indices point to the first of 4 +-consecutive control points in the vertex buffer. These control points +-make up a cardinal cubic B-spline (implicit equidistant knot vector). +-This basis is not interpolating, thus the curve does in general not go +-through any of the control points directly. A big advantage of this +-basis is that 3 control points can be shared for two continuous +-neighboring curve segments, e.g. the curves (p0,p1,p2,p3) and +-(p1,p2,p3,p4) are C1 continuous. This feature makes this basis a good +-choice to construct continuous multi-segment curves, as memory +-consumption can be kept minimal. +- +-##### Hermite Basis +- +-For the cubic Hermite basis the indices point to the first of 2 +-consecutive points in the vertex buffer, and the first of 2 consecutive +-tangents in the tangent buffer. These two points and two tangents make +-up a cubic Hermite curve. This basis is interpolating, thus does +-exactly go through the first and second control point, and the first +-order derivative at the begin and end matches exactly the value +-specified in the tangent buffer. When connecting two segments +-continuously, the end point and tangent of the previous segment can be +-shared. Different versions of Catmull-Rom splines can be easily +-constructed using the Hermite basis, by calculating a proper tangent +-buffer from the control points. +- +-##### Catmull-Rom Basis +- +-For the Catmull-Rom basis the indices point to the first of 4 +-consecutive control points in the vertex buffer. This basis goes +-through p1 and p2, with tangents (p2-p0)/2 and (p3-p1)/2. +- +-##### Flat Curves +- +-The `RTC_GEOMETRY_TYPE_FLAT_*` flat mode is a fast mode designed to +-render distant hair. In this mode the curve is rendered as a connected +-sequence of ray facing quads. Individual quads are considered to have +-subpixel size, and zooming onto the curve might show geometric +-artifacts. The number of quads to subdivide into can be specified +-through the `rtcSetGeometryTessellationRate` function. By default the +-tessellation rate is 4. +- +-##### Normal Oriented Curves +- +-The `RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_*` mode is a mode designed to +-render blades of grass. In this mode a vertex spline has to get +-specified as for the previous modes, but additionally a normal spline +-is required. If the Hermite basis is used, the `RTC_BUFFER_TYPE_NORMAL` +-and `RTC_BUFFER_TYPE_NORMAL_DERIVATIVE` buffers have both to be set. +- +-The curve is rendered as a flat band whose center approximately follows +-the provided vertex spline, whose half width approximately follows the +-provided radius spline, and whose normal orientation approximately +-follows the provided normal spline. +- +-To intersect the normal oriented curve, we perform a newton-raphson +-style intersection of a ray with a tensor product surface of a linear +-basis (perpendicular to the curve) and cubic Bézier basis (along the +-curve). We use a guide curve and its derivatives to construct the +-control points of that surface. The guide curve is defined by a sweep +-surface defined by sweeping a line centered at the vertex spline +-location along the curve. At each parameter value the half width of the +-line matches the radius spline, and the direction matches the cross +-product of the normal from the normal spline and tangent of the vertex +-spline. Note that this construction does not work when the provided +-normals are parallel to the curve direction. For this reason the +-provided normals should best be kept as perpendicular to the curve +-direction as possible. We further assume second order derivatives of +-the center curve to be zero for this construction, as otherwise very +-large curvatures occurring in corner cases, can thicken the constructed +-curve significantly. +- +-##### Round Curves +- +-In the `RTC_GEOMETRY_TYPE_ROUND_*` round mode, a real geometric surface +-is rendered for the curve, which is more expensive but allows closeup +-views. +- +-For the linear basis the round mode renders a cone that tangentially +-touches a start-sphere and end-sphere. The start sphere is rendered +-when no previous segments is indicated by the neighbor bits. The end +-sphere is always rendered but parts that lie inside the next segment +-are clipped away (if that next segment exists). This way a curve is +-closed on both ends and the interior will render properly as long as +-only neighboring segments penetrate into a segment. For this to work +-properly it is important that the flags buffer is properly populated +-with neighbor information. +- +-For the cubic polynomial bases, the round mode renders a sweep surface +-by sweeping a varying radius circle tangential along the curve. As a +-limitation, the radius of the curve has to be smaller than the +-curvature radius of the curve at each location on the curve. +- +-The intersection with the curve segment stores the parametric hit +-location along the curve segment as u-coordinate (range 0 to +1). +- +-For flat curves, the v-coordinate is set to the normalized distance in +-the range -1 to +1. For normal oriented curves the v-coordinate is in +-the range 0 to 1. For the linear basis and in round mode the +-v-coordinate is set to zero. +- +-In flat mode, the geometry normal `Ng` is set to the tangent of the +-curve at the hit location. In round mode and for normal oriented +-curves, the geometry normal `Ng` is set to the non-normalized geometric +-normal of the surface. +- +-For multi-segment motion blur, the number of time steps must be first +-specified using the `rtcSetGeometryTimeStepCount` call. Then a vertex +-buffer for each time step can be set using different buffer slots, and +-all these buffers must have the same stride and size. For the Hermite +-basis also a tangent buffer has to be set for each time step and for +-normal oriented curves a normal buffer has to get specified for each +-time step. +- +-Also see tutorials [Hair] and [Curves] for examples of how to +-create and use curve geometries. +- +-#### EXIT STATUS {#exit-status} +- +-On failure `NULL` is returned and an error code is set that can be +-queried using `rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewGeometry], [RTCCurveFlags] +- +-```{=tex} +- +-``` +-RTC\_GEOMETRY\_TYPE\_POINT +--------------------------- +- +-#### NAME {#name} +- +- RTC_GEOMETRY_TYPE_SPHERE_POINT - +- point geometry spheres +- +- RTC_GEOMETRY_TYPE_DISC_POINT - +- point geometry with ray-oriented discs +- +- RTC_GEOMETRY_TYPE_ORIENTED_DISC_POINT - +- point geometry with normal-oriented discs +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- rtcNewGeometry(device, RTC_GEOMETRY_TYPE_SPHERE_POINT); +- rtcNewGeometry(device, RTC_GEOMETRY_TYPE_DISC_POINT); +- rtcNewGeometry(device, RTC_GEOMETRY_TYPE_ORIENTED_DISC_POINT); +- +-#### DESCRIPTION {#description} +- +-Points with per vertex radii are supported with sphere, ray-oriented +-discs, and normal-oriented discs geometric representations. Such point +-geometries are created by passing `RTC_GEOMETRY_TYPE_SPHERE_POINT`, +-`RTC_GEOMETRY_TYPE_DISC_POINT`, or +-`RTC_GEOMETRY_TYPE_ORIENTED_DISC_POINT` to the `rtcNewGeometry` +-function. The point vertices can be specified t through a vertex buffer +-(`RTC_BUFFER_TYPE_VERTEX`). For the normal oriented discs a normal +-buffer (`RTC_BUFFER_TYPE_NORMAL`) has to get specified additionally. +-See `rtcSetGeometryBuffer` and `rtcSetSharedGeometryBuffer` for more +-details on how to set buffers. +- +-The vertex buffer stores each control vertex in the form of a single +-precision position and radius stored in (`x`, `y`, `z`, `r`) order in +-memory (`RTC_FORMAT_FLOAT4` format). The number of vertices is inferred +-from the size of this buffer. Similarly, the normal buffer stores a +-single precision normal per control vertex (`x`, `y`, `z` order and +-`RTC_FORMAT_FLOAT3` format). +- +-In the `RTC_GEOMETRY_TYPE_SPHERE_POINT` mode, a real geometric surface +-is rendered for the curve, which is more expensive but allows closeup +-views. +- +-The `RTC_GEOMETRY_TYPE_DISC_POINT` flat mode is a fast mode designed to +-render distant points. In this mode the point is rendered as a ray +-facing disc. +- +-The `RTC_GEOMETRY_TYPE_ORIENTED_DISC_POINT` mode is a mode designed as +-a midpoint geometrically between ray facing discs and spheres. In this +-mode the point is rendered as a normal oriented disc. +- +-For all point types, only the hit distance and geometry normal is +-returned as hit information, u and v are set to zero. +- +-For multi-segment motion blur, the number of time steps must be first +-specified using the `rtcSetGeometryTimeStepCount` call. Then a vertex +-buffer for each time step can be set using different buffer slots, and +-all these buffers must have the same stride and size. +- +-Also see tutorial [Points] for an example of how to create and use +-point geometries. +- +-#### EXIT STATUS {#exit-status} +- +-On failure `NULL` is returned and an error code is set that can be +-queried using `rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewGeometry] +- +-```{=tex} +- +-``` +-RTC\_GEOMETRY\_TYPE\_USER +-------------------------- +- +-#### NAME {#name} +- +- RTC_GEOMETRY_TYPE_USER - user geometry type +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- RTCGeometry geometry = +- rtcNewGeometry(device, RTC_GEOMETRY_TYPE_USER); +- +-#### DESCRIPTION {#description} +- +-User-defined geometries contain a number of user-defined primitives, +-just like triangle meshes contain multiple triangles. The shape of the +-user-defined primitives is specified through registered callback +-functions, which enable extending Embree with arbitrary types of +-primitives. +- +-User-defined geometries are created by passing `RTC_GEOMETRY_TYPE_USER` +-to the `rtcNewGeometry` function call. One has to set the number of +-primitives (see `rtcSetGeometryUserPrimitiveCount`), a user data +-pointer (see `rtcSetGeometryUserData`), a bounding function closure +-(see `rtcSetGeometryBoundsFunction`), as well as user-defined intersect +-(see `rtcSetGeometryIntersectFunction`) and occluded (see +-`rtcSetGeometryOccludedFunction`) callback functions. The bounding +-function is used to query the bounds of all time steps of a user +-primitive, while the intersect and occluded callback functions are +-called to intersect the primitive with a ray. The user data pointer is +-passed to each callback invocation and can be used to point to the +-application's representation of the user geometry. +- +-The creation of a user geometry typically looks the following: +- +- RTCGeometry geometry = rtcNewGeometry(device, RTC_GEOMETRY_TYPE_USER); +- rtcSetGeometryUserPrimitiveCount(geometry, numPrimitives); +- rtcSetGeometryUserData(geometry, userGeometryRepresentation); +- rtcSetGeometryBoundsFunction(geometry, boundsFunction); +- rtcSetGeometryIntersectFunction(geometry, intersectFunction); +- rtcSetGeometryOccludedFunction(geometry, occludedFunction); +- +-Please have a look at the `rtcSetGeometryBoundsFunction`, +-`rtcSetGeometryIntersectFunction`, and `rtcSetGeometryOccludedFunction` +-functions on the implementation of the callback functions. +- +-Primitives of a user geometry are ignored during rendering when their +-bounds are empty, thus bounds have lower\>upper in at least one +-dimension. +- +-See tutorial [User Geometry] for an example of how to use the +-user-defined geometries. +- +-#### EXIT STATUS {#exit-status} +- +-On failure `NULL` is returned and an error code is set that can be +-queried using `rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewGeometry], [rtcSetGeometryUserPrimitiveCount], +-[rtcSetGeometryUserData], [rtcSetGeometryBoundsFunction], +-[rtcSetGeometryIntersectFunction], [rtcSetGeometryOccludedFunction] +- +-```{=tex} +- +-``` +-RTC\_GEOMETRY\_TYPE\_INSTANCE +------------------------------ +- +-#### NAME {#name} +- +- RTC_GEOMETRY_TYPE_INSTANCE - instance geometry type +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- RTCGeometry geometry = +- rtcNewGeometry(device, RTC_GEOMETRY_TYPE_INSTANCE); +- +-#### DESCRIPTION {#description} +- +-Embree supports instancing of scenes using affine transformations (3×3 +-matrix plus translation). As the instanced scene is stored only a +-single time, even if instanced to multiple locations, this feature can +-be used to create very complex scenes with small memory footprint. +- +-Embree supports both single-level instancing and multi-level +-instancing. The maximum instance nesting depth is +-`RTC_MAX_INSTANCE_LEVEL_COUNT`; it can be configured at compile-time +-using the constant `EMBREE_MAX_INSTANCE_LEVEL_COUNT`. Users should +-adapt this constant to their needs: instances nested any deeper are +-silently ignored in release mode, and cause assertions in debug mode. +- +-Instances are created by passing `RTC_GEOMETRY_TYPE_INSTANCE` to the +-`rtcNewGeometry` function call. The instanced scene can be set using +-the `rtcSetGeometryInstancedScene` call, and the affine transformation +-can be set using the `rtcSetGeometryTransform` function. +- +-Please note that `rtcCommitScene` on the instanced scene should be +-called first, followed by `rtcCommitGeometry` on the instance, followed +-by `rtcCommitScene` for the top-level scene containing the instance. +- +-If a ray hits the instance, the `geomID` and `primID` members of the +-hit are set to the geometry ID and primitive ID of the hit primitive in +-the instanced scene, and the `instID` member of the hit is set to the +-geometry ID of the instance in the top-level scene. +- +-The instancing scheme can also be implemented using user geometries. To +-achieve this, the user geometry code should set the `instID` member of +-the ray query context to the geometry ID of the instance, then trace +-the transformed ray, and finally set the `instID` field of the ray +-query context again to -1. The `instID` field is copied automatically +-by each primitive intersector into the `instID` field of the hit +-structure when the primitive is hit. See the [User Geometry] tutorial +-for an example. +- +-For multi-segment motion blur, the number of time steps must be first +-specified using the `rtcSetGeometryTimeStepCount` function. Then a +-transformation for each time step can be specified using the +-`rtcSetGeometryTransform` function. +- +-See tutorials [Instanced Geometry] and [Multi Level Instancing] for +-examples of how to use instances. +- +-#### EXIT STATUS {#exit-status} +- +-On failure `NULL` is returned and an error code is set that can be +-queried using `rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewGeometry], [rtcSetGeometryInstancedScene], +-[rtcSetGeometryTransform] +- +-```{=tex} +- +-``` +-RTC\_GEOMETRY\_TYPE\_INSTANCE\_ARRAY +------------------------------------- +- +-#### NAME {#name} +- +- RTC_GEOMETRY_TYPE_INSTANCE_ARRAY - instance array geometry type +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- RTCGeometry geometry = +- rtcNewGeometry(device, RTC_GEOMETRY_TYPE_INSTANCE_ARRAY); +- +-#### DESCRIPTION {#description} +- +-Embree supports instance arrays, which is a more memory efficient way +-to represent large amounts of instances of the same or a small set of +-(sub)scenes. The main difference to regular Embree instances is that +-Embree instance arrays have a buffer of transformations (either affine +-transformations or quaternion decompositions +-[RTCQuaternionDecomposition]) that can be allocated by Embree or a +-shared buffer, similar to vertex buffers for triangle meshes. +-Optionally, instead of instancing only one scene, an instance array can +-instance multiple scenes by passing an array of scenes and a +-corresponding index buffer that specifies which instance of the +-instance array instances which of the scenes in the scenes array. +- +-Instance arrays are created by passing +-`RTC_GEOMETRY_TYPE_INSTANCE_ARRAY` to the `rtcNewGeometry` function +-call. The instanced scene can be either be set using the +-`rtcSetGeometryInstancedScene` call, or if multiple scenes should be +-instanced by passing an array of scenes using +-`rtcSetGeometryInstancedScenes`. The latter also requires to specify an +-index buffer using `rtcSetNewGeometryBuffer` or +-`rtcSetSharedGeometryBuffer` with `RTC_BUFFER_TYPE_INDEX` as the buffer +-type. +- +-Because the transformation information can become large for a large +-amount of instances, the instance array allows to share the +-transformation buffer between the user application and Embree. It can +-be either stored in a buffer created by Embree with +-`rtcSetNewGeometryBuffer` or an already existing buffer can be shared +-using `rtcSetSharedGeometryBuffer`. In either case, the buffer type has +-to be `RTC_BUFFER_TYPE_TRANSFORM` and the allowed formats are +-`RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR`, `RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR`, +-`RTC_FORMAT_FLOAT3X4_ROW_MAJOR`, and +-`RTC_FORMAT_QUATERNION_DECOMPOSITION`. Embree will not modify the data +-in the transformation buffer. +- +-Embree instance arrays support both single-level instancing and +-multi-level instancing. The maximum instance nesting depth is +-`RTC_MAX_INSTANCE_LEVEL_COUNT`; it can be configured at compile-time +-using the constant `EMBREE_MAX_INSTANCE_LEVEL_COUNT`. Users should +-adapt this constant to their needs: instances nested any deeper are +-silently ignored in release mode, and cause assertions in debug mode. +- +-Please note that `rtcCommitScene` on the instanced scene(s) should be +-called first, followed by `rtcCommitGeometry` on the instance array, +-followed by `rtcCommitScene` for the top-level scene containing the +-instance array. +- +-If a ray hits the instance, the `geomID` and `primID` members of the +-hit are set to the geometry ID and primitive ID of the hit primitive in +-the instanced scene. The `instID` member of the hit is set to the +-geometry ID of the instance array in the top-level scene and the +-`instPrimID` member is set to the index of the hit instance of the +-instance array. +- +-For multi-segment motion blur, the number of time steps must be first +-specified using the `rtcSetGeometryTimeStepCount` function. Then a +-transformation for each time step can be specified using the +-`rtcSetNewGeometryBuffer` or `rtcSetSharedGeometryBuffer` function and +-passing the time step as the `slot` parameter of these calls. +- +-See the [Instance Array Geometry] tutorial for an example of how to +-use instance arrays. +- +-#### EXIT STATUS {#exit-status} +- +-On failure `NULL` is returned and an error code is set that can be +-queried using `rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewGeometry], [rtcSetGeometryInstancedScene], +-[rtcSetGeometryInstancedScenes], [rtcSetNewGeometryBuffer], +-[rtcSetSharedGeometryBuffer], [rtcGetGeometryTransformEx] +- +-```{=tex} +- +-``` +-RTCCurveFlags +-------------- +- +-#### NAME {#name} +- +- RTCCurveFlags - per segment flags for curve geometry +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- enum RTCCurveFlags +- { +- RTC_CURVE_FLAG_NEIGHBOR_LEFT = (1 << 0), +- RTC_CURVE_FLAG_NEIGHBOR_RIGHT = (1 << 1) +- }; +- +-#### DESCRIPTION {#description} +- +-The RTCCurveFlags type is used for linear curves to determine if the +-left and/or right neighbor segment exist. Therefore one attaches a +-buffer of type RTC\_BUFFER\_TYPE\_FLAGS to the curve geometry which +-stores an individual byte per curve segment. +- +-If the RTC\_CURVE\_FLAG\_NEIGHBOR\_LEFT flag in that byte is enabled +-for a curve segment, then the left segment exists (which starts one +-vertex before the start vertex of the current curve) and the current +-segment is rendered to properly attach to that segment. +- +-If the RTC\_CURVE\_FLAG\_NEIGHBOR\_RIGHT flag in that byte is enabled +-for a curve segment, then the right segment exists (which ends one +-vertex after the end vertex of the current curve) and the current +-segment is rendered to properly attach to that segment. +- +-When not properly specifying left and right flags for linear curves, +-the rendering at the ending of these curves may not look correct, in +-particular when round linear curves are viewed from the inside. +- +-#### EXIT STATUS {#exit-status} +- +-#### SEE ALSO {#see-also} +- +-[RTC\_GEOMETRY\_TYPE\_CURVE] +- +-```{=tex} +- +-``` +-rtcRetainGeometry +------------------ +- +-#### NAME {#name} +- +- rtcRetainGeometry - increments the geometry reference count +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcRetainGeometry(RTCGeometry geometry); +- +-#### DESCRIPTION {#description} +- +-Geometry objects are reference counted. The `rtcRetainGeometry` +-function increments the reference count of the passed geometry object +-(`geometry` argument). This function together with `rtcReleaseGeometry` +-allows to use the internal reference counting in a C++ wrapper class to +-handle the ownership of the object. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewGeometry], [rtcReleaseGeometry] +- +-```{=tex} +- +-``` +-rtcReleaseGeometry +------------------- +- +-#### NAME {#name} +- +- rtcReleaseGeometry - decrements the geometry reference count +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcReleaseGeometry(RTCGeometry geometry); +- +-#### DESCRIPTION {#description} +- +-Geometry objects are reference counted. The `rtcReleaseGeometry` +-function decrements the reference count of the passed geometry object +-(`geometry` argument). When the reference count falls to 0, the +-geometry gets destroyed. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewGeometry], [rtcRetainGeometry] +- +-```{=tex} +- +-``` +-rtcCommitGeometry +------------------ +- +-#### NAME {#name} +- +- rtcCommitGeometry - commits geometry changes +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcCommitGeometry(RTCGeometry geometry); +- +-#### DESCRIPTION {#description} +- +-The `rtcCommitGeometry` function is used to commit all geometry changes +-performed to a geometry (`geometry` parameter). After a geometry gets +-modified, this function must be called to properly update the internal +-state of the geometry to perform interpolations using `rtcInterpolate` +-or to commit a scene containing the geometry using `rtcCommitScene`. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcInterpolate], [rtcCommitScene] +- +-```{=tex} +- +-``` +-rtcEnableGeometry +------------------ +- +-#### NAME {#name} +- +- rtcEnableGeometry - enables the geometry +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcEnableGeometry(RTCGeometry geometry); +- +-#### DESCRIPTION {#description} +- +-The `rtcEnableGeometry` function enables the specified geometry +-(`geometry` argument). Only enabled geometries are rendered. Each +-geometry is enabled by default at construction time. +- +-After enabling a geometry, the scene containing that geometry must be +-committed using `rtcCommitScene` for the change to have effect. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewGeometry], [rtcDisableGeometry], [rtcCommitScene] +- +-```{=tex} +- +-``` +-rtcDisableGeometry +------------------- +- +-#### NAME {#name} +- +- rtcDisableGeometry - disables the geometry +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcDisableGeometry(RTCGeometry geometry); +- +-#### DESCRIPTION {#description} +- +-The `rtcDisableGeometry` function disables the specified geometry +-(`geometry` argument). A disabled geometry is not rendered. Each +-geometry is enabled by default at construction time. +- +-After disabling a geometry, the scene containing that geometry must be +-committed using `rtcCommitScene` for the change to have effect. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewGeometry], [rtcEnableGeometry], [rtcCommitScene] +- +-```{=tex} +- +-``` +-rtcSetGeometryTimeStepCount +---------------------------- +- +-#### NAME {#name} +- +- rtcSetGeometryTimeStepCount - sets the number of time steps of the +- geometry +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcSetGeometryTimeStepCount( +- RTCGeometry geometry, +- unsigned int timeStepCount +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcSetGeometryTimeStepCount` function sets the number of time +-steps for multi-segment motion blur (`timeStepCount` parameter) of the +-specified geometry (`geometry` parameter). +- +-For triangle meshes (`RTC_GEOMETRY_TYPE_TRIANGLE`), quad meshes +-(`RTC_GEOMETRY_TYPE_QUAD`), curves (`RTC_GEOMETRY_TYPE_CURVE`), points +-(`RTC_GEOMETRY_TYPE_POINT`), and subdivision geometries +-(`RTC_GEOMETRY_TYPE_SUBDIVISION`), the number of time steps directly +-corresponds to the number of vertex buffer slots available +-(`RTC_BUFFER_TYPE_VERTEX` buffer type). For these geometries, one +-vertex buffer per time step must be specified when creating +-multi-segment motion blur geometries. +- +-For instance geometries (`RTC_GEOMETRY_TYPE_INSTANCE`), a +-transformation must be specified for each time step (see +-`rtcSetGeometryTransform`). +- +-For user geometries, the registered bounding callback function must +-provide a bounding box per primitive and time step, and the +-intersection and occlusion callback functions should properly intersect +-the motion-blurred geometry at the ray time. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewGeometry], [rtcSetGeometryTimeRange] +- +-```{=tex} +- +-``` +-rtcSetGeometryTimeRange +------------------------ +- +-#### NAME {#name} +- +- rtcSetGeometryTimeRange - sets the time range for a motion blur geometry +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcSetGeometryTimeRange( +- RTCGeometry geometry, +- float startTime, +- float endTime +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcSetGeometryTimeRange` function sets a time range which defines +-the start (and end time) of the first (and last) time step of a motion +-blur geometry. The time range is defined relative to the camera shutter +-interval [0,1] but it can be arbitrary. Thus the startTime can be +-smaller, equal, or larger 0, indicating a geometry whose animation +-definition start before, at, or after the camera shutter opens. Similar +-the endTime can be smaller, equal, or larger than 1, indicating a +-geometry whose animation definition ends after, at, or before the +-camera shutter closes. The startTime has to be smaller or equal to the +-endTime. +- +-The default time range when this function is not called is the entire +-camera shutter [0,1]. For best performance at most one time segment +-of the piece wise linear definition of the motion should fall outside +-the shutter window to the left and to the right. Thus do not set the +-startTime or endTime too far outside the [0,1] interval for best +-performance. +- +-This time range feature will also allow geometries to appear and +-disappear during the camera shutter time if the specified time range is +-a sub range of [0,1]. +- +-Please also have a look at the `rtcSetGeometryTimeStepCount` function +-to see how to define the time steps for the specified time range. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcSetGeometryTimeStepCount] +- +-```{=tex} +- +-``` +-rtcSetGeometryVertexAttributeCount +----------------------------------- +- +-#### NAME {#name} +- +- rtcSetGeometryVertexAttributeCount - sets the number of vertex +- attributes of the geometry +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcSetGeometryVertexAttributeCount( +- RTCGeometry geometry, +- unsigned int vertexAttributeCount +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcSetGeometryVertexAttributeCount` function sets the number of +-slots (`vertexAttributeCount` parameter) for vertex attribute buffers +-(`RTC_BUFFER_TYPE_VERTEX_ATTRIBUTE`) that can be used for the specified +-geometry (`geometry` parameter). +- +-This function is supported only for triangle meshes +-(`RTC_GEOMETRY_TYPE_TRIANGLE`), quad meshes (`RTC_GEOMETRY_TYPE_QUAD`), +-curves (`RTC_GEOMETRY_TYPE_CURVE`), points (`RTC_GEOMETRY_TYPE_POINT`), +-and subdivision geometries (`RTC_GEOMETRY_TYPE_SUBDIVISION`). +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewGeometry], [RTCBufferType] +- +-```{=tex} +- +-``` +-rtcSetGeometryMask +------------------- +- +-#### NAME {#name} +- +- rtcSetGeometryMask - sets the geometry mask +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcSetGeometryMask( +- RTCGeometry geometry, +- unsigned int mask +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcSetGeometryMask` function sets a 32-bit geometry mask (`mask` +-argument) for the specified geometry (`geometry` argument). +- +-This geometry mask is used together with the ray mask stored inside the +-`mask` field of the ray. The primitives of the geometry are hit by the +-ray only if the bitwise `and` operation of the geometry mask with the +-ray mask is not 0. This feature can be used to disable selected +-geometries for specifically tagged rays, e.g. to disable shadow casting +-for certain geometries. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[RTCRay], [rtcGetDeviceProperty] +- +-```{=tex} +- +-``` +-rtcSetGeometryBuildQuality +--------------------------- +- +-#### NAME {#name} +- +- rtcSetGeometryBuildQuality - sets the build quality for the geometry +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcSetGeometryBuildQuality( +- RTCGeometry geometry, +- enum RTCBuildQuality quality +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcSetGeometryBuildQuality` function sets the build quality +-(`quality` argument) for the specified geometry (`geometry` argument). +-The per-geometry build quality is only a hint and may be ignored. +-Embree currently uses the per-geometry build quality when the scene +-build quality is set to `RTC_BUILD_QUALITY_LOW`. In this mode a +-two-level acceleration structure is build, and geometries build a +-separate acceleration structure using the geometry build quality. The +-per-geometry build quality can be one of: +- +-- `RTC_BUILD_QUALITY_LOW`: Creates lower quality data structures, +- e.g. for dynamic scenes. +- +-- `RTC_BUILD_QUALITY_MEDIUM`: Default build quality for most usages. +- Gives a good compromise between build and render performance. +- +-- `RTC_BUILD_QUALITY_HIGH`: Creates higher quality data structures +- for final-frame rendering. Enables a spatial split builder for +- certain primitive types. +- +-- `RTC_BUILD_QUALITY_REFIT`: Uses a BVH refitting approach when +- changing only the vertex buffer. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcSetSceneBuildQuality] +- +-```{=tex} +- +-``` +-rtcSetGeometryMaxRadiusScale +----------------------------- +- +-#### NAME {#name} +- +- rtcSetGeometryMaxRadiusScale - assigns a maximal curve radius scale factor for min-width feature +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcSetGeometryMaxRadiusScale(RTCGeometry geometry, float maxRadiusScale); +- +-#### DESCRIPTION {#description} +- +-The `rtcSetMaxGeometryScale` function specifies a maximal scaling +-factor for curve radii used by the min-width feature. +- +-The min-width feature can increase the radius of curves and points, in +-order to reduce aliasing and improve render times. The feature is +-disabled by default and has to get enabled using the EMBREE\_MIN\_WIDTH +-cmake option. +- +-To use the feature, one has to specify a maximal curve radius scaling +-factor using the [rtcSetGeometryMaxRadiusScale] function. This factor +-should be a small number (e.g. 4) as the constructed BVH bounds get +-increased in order to bound the curve in the worst case of maximal +-radii. +- +-One also has to set the minWidthDistanceFactor in the +-RTCRayQueryContext when tracing a ray. This factor controls the target +-radius size of a curve or point at some distance away of the ray +-origin. +- +-For each control point p with radius r of a curve or point primitive, +-the primitive intersectors first calculate a target radius r' as: +- +- r' = length(p-ray_org) * minWidthDistanceFactor +- +-Typically the minWidthDistanceFactor is set by the application such +-that the target radius projects to the width of half a pixel (thus +-primitive diameter is pixel sized). +- +-The target radius r' is then clamped against the minimal bound r and +-maximal bound maxRadiusScale\*r to obtain the final radius r'': +- +- r'' = max(r, min(r', maxRadiusScale*r)) +- +-Thus curves or points close to the camera are rendered with a normal +-radii r, and curves or points far from the camera are not enlarged too +-much, as this would be very expensive to render. +- +-When `rtcSetGeometryMaxRadiusScale` function is not invoked for a curve +-or point geometry (or if the maximal scaling factor is set to 1.0), +-then the curve or point geometry renders normally, with radii not +-modified by the min-width feature. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcInitRayQueryContext] +- +-```{=tex} +- +-``` +-rtcSetGeometryBuffer +--------------------- +- +-#### NAME {#name} +- +- rtcSetGeometryBuffer - assigns a view of a buffer to the geometry +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcSetGeometryBuffer( +- RTCGeometry geometry, +- enum RTCBufferType type, +- unsigned int slot, +- enum RTCFormat format, +- RTCBuffer buffer, +- size_t byteOffset, +- size_t byteStride, +- size_t itemCount +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcSetGeometryBuffer` function binds a view of a buffer object +-(`buffer` argument) to a geometry buffer type and slot (`type` and +-`slot` argument) of the specified geometry (`geometry` argument). +- +-One can specify the start of the first buffer element in bytes +-(`byteOffset` argument), the byte stride between individual buffer +-elements (`byteStride` argument), the format of the buffer elements +-(`format` argument), and the number of elements to bind (`itemCount`). +- +-The start address (`byteOffset` argument) and stride (`byteStride` +-argument) must be both aligned to 4 bytes, otherwise the +-`rtcSetGeometryBuffer` function will fail. +- +-After successful completion of this function, the geometry will hold a +-reference to the buffer object. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcSetSharedGeometryBuffer], [rtcSetNewGeometryBuffer] +- +-```{=tex} +- +-``` +-rtcSetSharedGeometryBuffer +--------------------------- +- +-#### NAME {#name} +- +- rtcSetSharedGeometryBuffer - assigns a view of a shared data buffer +- to a geometry +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcSetSharedGeometryBuffer( +- RTCGeometry geometry, +- enum RTCBufferType type, +- unsigned int slot, +- enum RTCFormat format, +- const void* ptr, +- size_t byteOffset, +- size_t byteStride, +- size_t itemCount +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcSetSharedGeometryBuffer` function binds a view of a shared +-user-managed data buffer (`ptr` argument) to a geometry buffer type and +-slot (`type` and `slot` argument) of the specified geometry (`geometry` +-argument). +- +-One can specify the start of the first buffer element in bytes +-(`byteOffset` argument), the byte stride between individual buffer +-elements (`byteStride` argument), the format of the buffer elements +-(`format` argument), and the number of elements to bind (`itemCount`). +- +-The start address (`byteOffset` argument) and stride (`byteStride` +-argument) must be both aligned to 4 bytes; otherwise the +-`rtcSetSharedGeometryBuffer` function will fail. +- +-When the buffer will be used as a vertex buffer +-(`RTC_BUFFER_TYPE_VERTEX` and `RTC_BUFFER_TYPE_VERTEX_ATTRIBUTE`), the +-last buffer element must be readable using 16-byte SSE load +-instructions, thus padding the last element is required for certain +-layouts. E.g. a standard `float3` vertex buffer layout should add +-storage for at least one more float to the end of the buffer. +- +-The buffer data must remain valid for as long as the buffer may be +-used, and the user is responsible for freeing the buffer data when no +-longer required. +- +-Sharing buffers can significantly reduce the memory required by the +-application, thus we recommend using this feature. When enabling the +-`RTC_SCENE_FLAG_COMPACT` scene flag, the spatial index structures index +-into the vertex buffer, resulting in even higher memory savings. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcSetGeometryBuffer], [rtcSetNewGeometryBuffer] +- +-```{=tex} +- +-``` +-rtcSetNewGeometryBuffer +------------------------ +- +-#### NAME {#name} +- +- rtcSetNewGeometryBuffer - creates and assigns a new data buffer to +- the geometry +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void* rtcSetNewGeometryBuffer( +- RTCGeometry geometry, +- enum RTCBufferType type, +- unsigned int slot, +- enum RTCFormat format, +- size_t byteStride, +- size_t itemCount +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcSetNewGeometryBuffer` function creates a new data buffer of +-specified format (`format` argument), byte stride (`byteStride` +-argument), and number of items (`itemCount` argument), and assigns it +-to a geometry buffer slot (`type` and `slot` argument) of the specified +-geometry (`geometry` argument). The buffer data is managed internally +-and automatically freed when the geometry is destroyed. +- +-The byte stride (`byteStride` argument) must be aligned to 4 bytes; +-otherwise the `rtcSetNewGeometryBuffer` function will fail. +- +-The allocated buffer will be automatically over-allocated slightly when +-used as a vertex buffer, where a requirement is that each buffer +-element should be readable using 16-byte SSE load instructions. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcSetGeometryBuffer], [rtcSetSharedGeometryBuffer] +- +-```{=tex} +- +-``` +-RTCFormat +---------- +- +-#### NAME {#name} +- +- RTCFormat - specifies format of data in buffers +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- enum RTCFormat +- { +- RTC_FORMAT_UINT, +- RTC_FORMAT_UINT2, +- RTC_FORMAT_UINT3, +- RTC_FORMAT_UINT4, +- +- RTC_FORMAT_FLOAT, +- RTC_FORMAT_FLOAT2, +- RTC_FORMAT_FLOAT3, +- RTC_FORMAT_FLOAT4, +- RTC_FORMAT_FLOAT5, +- RTC_FORMAT_FLOAT6, +- RTC_FORMAT_FLOAT7, +- RTC_FORMAT_FLOAT8, +- RTC_FORMAT_FLOAT9, +- RTC_FORMAT_FLOAT10, +- RTC_FORMAT_FLOAT11, +- RTC_FORMAT_FLOAT12, +- RTC_FORMAT_FLOAT13, +- RTC_FORMAT_FLOAT14, +- RTC_FORMAT_FLOAT15, +- RTC_FORMAT_FLOAT16, +- +- RTC_FORMAT_FLOAT3X4_ROW_MAJOR, +- RTC_FORMAT_FLOAT4X4_ROW_MAJOR, +- +- RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR, +- RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR, +- +- RTC_FORMAT_GRID, +- +- RTC_FORMAT_QUATERNION_DECOMPOSITION +- }; +- +-#### DESCRIPTION {#description} +- +-The `RTFormat` structure defines the data format stored in data buffers +-provided to Embree using the [rtcSetGeometryBuffer], +-[rtcSetSharedGeometryBuffer], and [rtcSetNewGeometryBuffer] API +-calls. +- +-The `RTC_FORMAT_UINT/2/3/4` format are used to specify that data +-buffers store unsigned integers, or unsigned integer vectors of size +-2,3 or 4. This format has typically to get used when specifying index +-buffers, e.g. `RTC_FORMAT_UINT3` for triangle meshes. +- +-The `RTC_FORMAT_FLOAT/2/3/4...` format are used to specify that data +-buffers store single precision floating point values, or vectors there +-of (size 2,3,4, etc.). This format is typcally used to specify to +-format of vertex buffers, e.g. the `RTC_FORMAT_FLOAT3` type for vertex +-buffers of triangle meshes. +- +-The `RTC_FORMAT_FLOAT3X4_ROW_MAJOR` and +-`RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR` formats, specify a 3x4 floating +-point matrix layed out either row major or column major. The +-`RTC_FORMAT_FLOAT4X4_ROW_MAJOR` and `RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR` +-formats, specify a 4x4 floating point matrix layed out either row major +-or column major. The `RTC_FORMAT_QUATERNION_DECOMPOSITION` format +-specifies a structure that represents a quaternion decomposition (see +-[RTCQuaternionDecomposition]) of an affine transformation. These +-formats are used in the [rtcSetGeometryTransform] function or in +-geometry buffers with type `RTC_BUFFER_TYPE_TRANSFORM` in order to set +-a transformation matrix for instance and instance array geometries. +- +-The `RTC_FORMAT_GRID` is a special data format used to specify grid +-primitives of layout RTCGrid when creating grid geometries (see +-[RTC\_GEOMETRY\_TYPE\_GRID]). +- +-#### EXIT STATUS {#exit-status} +- +-#### SEE ALSO {#see-also} +- +-[rtcSetGeometryBuffer], [rtcSetSharedGeometryBuffer], +-[rtcSetNewGeometryBuffer], [rtcSetGeometryTransform] +-[RTCQuaternionDecomposition] +- +-```{=tex} +- +-``` +-RTCBufferType +-------------- +- +-#### NAME {#name} +- +- RTCFormat - specifies format of data in buffers +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- enum RTCBufferType +- { +- RTC_BUFFER_TYPE_INDEX = 0, +- RTC_BUFFER_TYPE_VERTEX = 1, +- RTC_BUFFER_TYPE_VERTEX_ATTRIBUTE = 2, +- RTC_BUFFER_TYPE_NORMAL = 3, +- RTC_BUFFER_TYPE_TANGENT = 4, +- RTC_BUFFER_TYPE_NORMAL_DERIVATIVE = 5, +- +- RTC_BUFFER_TYPE_GRID = 8, +- +- RTC_BUFFER_TYPE_FACE = 16, +- RTC_BUFFER_TYPE_LEVEL = 17, +- RTC_BUFFER_TYPE_EDGE_CREASE_INDEX = 18, +- RTC_BUFFER_TYPE_EDGE_CREASE_WEIGHT = 19, +- RTC_BUFFER_TYPE_VERTEX_CREASE_INDEX = 20, +- RTC_BUFFER_TYPE_VERTEX_CREASE_WEIGHT = 21, +- RTC_BUFFER_TYPE_HOLE = 22, +- +- RTC_BUFFER_TYPE_TRANSFORM = 23, +- +- RTC_BUFFER_TYPE_FLAGS = 32 +- }; +- +-#### DESCRIPTION {#description} +- +-The `RTBufferType` structure defines slots to assign data buffers to +-using the [rtcSetGeometryBuffer], [rtcSetSharedGeometryBuffer], and +-[rtcSetNewGeometryBuffer] API calls. +- +-For most geometry types the `RTC_BUFFER_TYPE_INDEX` slot is used to +-assign an index buffer, while the `RTC_BUFFER_TYPE_VERTEX` is used to +-assign the corresponding vertex buffer. +- +-The `RTC_BUFFER_TYPE_VERTEX_ATTRIBUTE` slot can get used to assign +-arbitrary additional vertex data which can get interpolated using the +-[rtcInterpolate] API call. +- +-The `RTC_BUFFER_TYPE_NORMAL`, `RTC_BUFFER_TYPE_TANGENT`, and +-`RTC_BUFFER_TYPE_NORMAL_DERIVATIVE` are special buffers required to +-assign per vertex normals, tangents, and normal derivatives for some +-curve types. +- +-The `RTC_BUFFER_TYPE_GRID` buffer is used to assign the grid primitive +-buffer for grid geometries (see [RTC\_GEOMETRY\_TYPE\_GRID]). +- +-The `RTC_BUFFER_TYPE_FACE`, `RTC_BUFFER_TYPE_LEVEL`, +-`RTC_BUFFER_TYPE_EDGE_CREASE_INDEX`, +-`RTC_BUFFER_TYPE_EDGE_CREASE_WEIGHT`, +-`RTC_BUFFER_TYPE_VERTEX_CREASE_INDEX`, +-`RTC_BUFFER_TYPE_VERTEX_CREASE_WEIGHT`, and `RTC_BUFFER_TYPE_HOLE` are +-special buffers required to create subdivision meshes (see +-[RTC\_GEOMETRY\_TYPE\_SUBDIVISION]). +- +-The `RTC_BUFFER_TYPE_TRANSFORM` buffer is used to provide instance +-transformation information for instance array geometries (see +-[RTC\_GEOMETRY\_TYPE\_INSTANCE\_ARRAY]). +- +-The `RTC_BUFFER_TYPE_FLAGS` can get used to add additional flag per +-primitive of a geometry, and is currently only used for linear curves. +- +-#### EXIT STATUS {#exit-status} +- +-#### SEE ALSO {#see-also} +- +-[rtcSetGeometryBuffer], [rtcSetSharedGeometryBuffer], +-[rtcSetNewGeometryBuffer] +- +-```{=tex} +- +-``` +-rtcGetGeometryBufferData +------------------------- +- +-#### NAME {#name} +- +- rtcGetGeometryBufferData - gets pointer to +- the first buffer view element +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void* rtcGetGeometryBufferData( +- RTCGeometry geometry, +- enum RTCBufferType type, +- unsigned int slot +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcGetGeometryBufferData` function returns a pointer to the first +-element of the buffer view attached to the specified buffer type and +-slot (`type` and `slot` argument) of the geometry (`geometry` +-argument). +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcSetGeometryBuffer], [rtcSetSharedGeometryBuffer], +-[rtcSetNewGeometryBuffer] +- +-```{=tex} +- +-``` +-rtcUpdateGeometryBuffer +------------------------ +- +-#### NAME {#name} +- +- rtcUpdateGeometryBuffer - marks a buffer view bound to the geometry +- as modified +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcUpdateGeometryBuffer( +- RTCGeometry geometry, +- enum RTCBufferType type, +- unsigned int slot +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcUpdateGeometryBuffer` function marks the buffer view bound to +-the specified buffer type and slot (`type` and `slot` argument) of a +-geometry (`geometry` argument) as modified. +- +-If a data buffer is changed by the application, the +-`rtcUpdateGeometryBuffer` call must be invoked for that buffer. Each +-buffer view assigned to a buffer slot is initially marked as modified, +-thus this function needs to be called only when doing buffer +-modifications after the first `rtcCommitScene`. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewGeometry], [rtcCommitScene] +- +-```{=tex} +- +-``` +-rtcSetGeometryIntersectFilterFunction +-------------------------------------- +- +-#### NAME {#name} +- +- rtcSetGeometryIntersectFilterFunction - sets the intersection filter +- for the geometry +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- struct RTCFilterFunctionNArguments +- { +- int* valid; +- void* geometryUserPtr; +- const struct RTCRayQueryContext* context; +- struct RTCRayN* ray; +- struct RTCHitN* hit; +- unsigned int N; +- }; +- +- typedef void (*RTCFilterFunctionN)( +- const struct RTCFilterFunctionNArguments* args +- ); +- +- void rtcSetGeometryIntersectFilterFunction( +- RTCGeometry geometry, +- RTCFilterFunctionN filter +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcSetGeometryIntersectFilterFunction` function registers an +-intersection filter callback function (`filter` argument) for the +-specified geometry (`geometry` argument). +- +-Only a single callback function can be registered per geometry, and +-further invocations overwrite the previously set callback function. +-Passing `NULL` as function pointer disables the registered callback +-function. +- +-The registered intersection filter function is invoked for every hit +-encountered during the `rtcIntersect`-type ray queries and can accept +-or reject that hit. The feature can be used to define a silhouette for +-a primitive and reject hits that are outside the silhouette. E.g. a +-tree leaf could be modeled with an alpha texture that decides whether +-hit points lie inside or outside the leaf. +- +-If the `RTC_BUILD_QUALITY_HIGH` mode is set, the filter functions may +-be called multiple times for the same primitive hit. Further, rays +-hitting exactly the edge might also report two hits for the same +-surface. For certain use cases, the application may have to work around +-this limitation by collecting already reported hits (`geomID`/`primID` +-pairs) and ignoring duplicates. +- +-The filter function callback of type `RTCFilterFunctionN` gets passed a +-number of arguments through the `RTCFilterFunctionNArguments` +-structure. The `valid` parameter of that structure points to an integer +-valid mask (0 means invalid and -1 means valid). The `geometryUserPtr` +-member is a user pointer optionally set per geometry through the +-`rtcSetGeometryUserData` function. The `context` member points to the +-ray query context passed to the ray query function. The `ray` parameter +-points to `N` rays in SOA layout. The `hit` parameter points to `N` +-hits in SOA layout to test. The `N` parameter is the number of rays and +-hits in `ray` and `hit`. The hit distance is provided as the `tfar` +-value of the ray. If the hit geometry is instanced, the `instID` member +-of the ray is valid, and the ray and the potential hit are in object +-space. +- +-The filter callback function has the task to check for each valid ray +-whether it wants to accept or reject the corresponding hit. To reject a +-hit, the filter callback function just has to write `0` to the integer +-valid mask of the corresponding ray. To accept the hit, it just has to +-leave the valid mask set to `-1`. When accepting a hit, the filter +-function is further allowed to change the hit and decrease the `tfar` +-value of the ray but it should not modify other ray data nor any +-inactive components of the ray or hit. +- +-When performing ray queries using `rtcIntersect1`, it is guaranteed +-that the packet size is 1 when the callback is invoked. When performing +-ray queries using the `rtcIntersect4/8/16` functions, it is not +-generally guaranteed that the ray packet size (and order of rays inside +-the packet) passed to the callback matches the initial ray packet. +-However, under some circumstances these properties are guaranteed, and +-whether this is the case can be queried using `rtcGetDeviceProperty`. +- +-For many usage scenarios, repacking and re-ordering of rays does not +-cause difficulties in implementing the callback function. However, +-algorithms that need to extend the ray with additional data must use +-the `rayID` component of the ray to identify the original ray to access +-the per-ray data. +- +-The implementation of the filter function can choose to implement a +-single code path that uses the ray access helper functions `RTCRay_XXX` +-and hit access helper functions `RTCHit_XXX` to access ray and hit +-data. Alternatively the code can branch to optimized implementations +-for specific sizes of `N` and cast the `ray` and `hit` inputs to the +-proper packet types. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcSetGeometryOccludedFilterFunction] +- +-```{=tex} +- +-``` +-rtcSetGeometryOccludedFilterFunction +------------------------------------- +- +-#### NAME {#name} +- +- rtcSetGeometryOccludedFilterFunction - sets the occlusion filter +- for the geometry +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcSetGeometryOccludedFilterFunction( +- RTCGeometry geometry, +- RTCFilterFunctionN filter +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcSetGeometryOccludedFilterFunction` function registers an +-occlusion filter callback function (`filter` argument) for the +-specified geometry (`geometry` argument). +- +-Only a single callback function can be registered per geometry, and +-further invocations overwrite the previously set callback function. +-Passing `NULL` as function pointer disables the registered callback +-function. +- +-The registered occlusion filter function is invoked for every hit +-encountered during the `rtcOccluded`-type ray queries and can accept or +-reject that hit. The feature can be used to define a silhouette for a +-primitive and reject hits that are outside the silhouette. E.g. a tree +-leaf could be modeled with an alpha texture that decides whether hit +-points lie inside or outside the leaf. +- +-Please see the description of the +-`rtcSetGeometryIntersectFilterFunction` for a description of the filter +-callback function. +- +-The `rtcOccluded`-type functions terminate traversal when a hit got +-committed. As filter functions can only set the `tfar` distance of the +-ray for a committed hit, the occlusion filter cannot influence the +-`tfar` value of subsequent traversal, as that directly ends. For that +-reason `rtcOccluded` and occlusion filters cannot get used to gather +-the next n-hits, and `rtcIntersect` and intersection filters should get +-used instead. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcSetGeometryIntersectFilterFunction] +- +-```{=tex} +- +-``` +-rtcSetGeometryEnableFilterFunctionFromArguments +------------------------------------------------ +- +-#### NAME {#name} +- +- rtcSetGeometryEnableFilterFunctionFromArguments - enables +- argument filter functions for the geometry +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcSetGeometryEnableFilterFunctionFromArguments( +- RTCGeometry geometry, bool enable); +- +-#### DESCRIPTION {#description} +- +-This function enables invokation the filter function passed through +-`RTCIntersectArguments` or `RTCOccludedArguments` to the intersect and +-occluded queries. If enable is true the argument filter function +-invokation is enabled for the geometry or disabled otherwise. By +-default the invokation of the argument filter function is disabled for +-some geometry. +- +-The argument filter function invokation can also get enforced for each +-geometry by using the `RTC_RAY_QUERY_FLAG_INVOKE_ARGUMENT_FILTER` ray +-query flag that can get passed to `rtcIntersect` and `rtcOccluded` +-functions. See Section [rtcInitIntersectArguments] and +-[rtcInitOccludedArguments] for more details. +- +-In order to use the argument filter function for some scene, that +-feature additionally has to get enabled using the +-`RTC_SCENE_FLAG_FILTER_FUNCTION_IN_ARGUMENTS` scene flag. See Section +-[rtcSetSceneFlags] for more details. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can get queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcInitIntersectArguments], [rtcInitOccludedArguments], +-[rtcSetSceneFlags] +- +-```{=tex} +- +-``` +-rtcInvokeIntersectFilterFromGeometry +------------------------------------- +- +-#### NAME {#name} +- +- rtcInvokeIntersectFilterFromGeometry - invokes the +- intersection filter function from the geometry +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcInvokeIntersectFilterFromGeometry( +- const struct RTCIntersectFunctionNArguments* args, +- const struct RTCFilterFunctionNArguments* filterArgs +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcInvokeIntersectFilterFromGeometry` function can be called +-inside an `RTCIntersectFunctionN` user geometry callback function to +-invoke the intersection filter registered to the geometry. For this an +-`RTCFilterFunctionNArguments` structure must be created (see +-`rtcSetGeometryIntersectFilterFunction`) which basically consists of a +-valid mask, a hit packet to filter, the corresponding ray packet, and +-the packet size. After the invocation of +-`rtcInvokeIntersectFilterFromGeometry`, only rays that are still valid +-(valid mask set to -1) should update a hit. +- +-#### EXIT STATUS {#exit-status} +- +-For performance reasons this function does not do any error checks, +-thus will not set any error flags on failure. +- +-#### SEE ALSO {#see-also} +- +-[rtcInvokeOccludedFilterFromGeometry], +-[rtcSetGeometryIntersectFunction] +- +-```{=tex} +- +-``` +-rtcInvokeOccludedFilterFromGeometry +------------------------------------ +- +-#### NAME {#name} +- +- rtcInvokeOccludedFilterFromGeometry - invokes the occlusion +- filter function from the geometry +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcInvokeOccludedFilterFromGeometry( +- const struct RTCOccludedFunctionNArguments* args, +- const struct RTCFilterFunctionNArguments* filterArgs +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcInvokeOccludedFilterFromGeometry` function can be called inside +-an `RTCOccludedFunctionN` user geometry callback function to invoke the +-occlusion filter registered to the geometry. For this an +-`RTCFilterFunctionNArguments` structure must be created (see +-`rtcSetGeometryIntersectFilterFunction`) which basically consists of a +-valid mask, a hit packet to filter, the corresponding ray packet, and +-the packet size. After the invocation of +-`rtcInvokeOccludedFilterFromGeometry` only rays that are still valid +-(valid mask set to -1) should signal an occlusion. +- +-#### EXIT STATUS {#exit-status} +- +-For performance reasons this function does not do any error checks, +-thus will not set any error flags on failure. +- +-#### SEE ALSO {#see-also} +- +-[rtcInvokeIntersectFilterFromGeometry], +-[rtcSetGeometryOccludedFunction] +- +-```{=tex} +- +-``` +-rtcSetGeometryUserData +----------------------- +- +-#### NAME {#name} +- +- rtcSetGeometryUserData - sets the user-defined data pointer of the +- geometry +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcSetGeometryUserData(RTCGeometry geometry, void* userPtr); +- +-#### DESCRIPTION {#description} +- +-The `rtcSetGeometryUserData` function sets the user-defined data +-pointer (`userPtr` argument) for a geometry (`geometry` argument). This +-user data pointer is intended to be pointing to the application's +-representation of the geometry, and is passed to various callback +-functions. The application can use this pointer inside the callback +-functions to access its geometry representation. +- +-The `rtcGetGeometryUserData` function can be used to query an already +-set user data pointer of a geometry. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcGetGeometryUserData] +- +-```{=tex} +- +-``` +-rtcGetGeometryUserData +----------------------- +- +-#### NAME {#name} +- +- rtcGetGeometryUserData - returns the user data pointer +- of the geometry +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void* rtcGetGeometryUserData(RTCGeometry geometry); +- +-#### DESCRIPTION {#description} +- +-The `rtcGetGeometryUserData` function queries the user data pointer +-previously set with `rtcSetGeometryUserData`. When +-`rtcSetGeometryUserData` was not called yet, `NULL` is returned. +- +-This function is supposed to be used during rendering, but only +-supported on the CPU and not inside SYCL kernels on the GPU. Inside a +-SYCL kernel the `rtcGetGeometryUserDataFromScene` function has to get +-used. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcSetGeometryUserData], [rtcGetGeometryUserDataFromScene] +- +-```{=tex} +- +-``` +-rtcGetGeometryUserDataFromScene +-------------------------------- +- +-#### NAME {#name} +- +- rtcGetGeometryUserDataFromScene - returns the user data pointer +- of the geometry through the scene object +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void* rtcGetGeometryUserDataFromScene(RTCScene scene, unsigned int geomID); +- +-#### DESCRIPTION {#description} +- +-The `rtcGetGeometryUserDataFromScene` function queries the user data +-pointer previously set with `rtcSetGeometryUserData` from the geometry +-with index `geomID` from the specified scene `scene`. When +-`rtcSetGeometryUserData` was not called yet, `NULL` is returned. +- +-In contrast to the `rtcGetGeometryUserData` function, the +-`rtcGetGeometryUserDataFromScene` function an get used during rendering +-inside a SYCL kernel. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcSetGeometryUserData], [rtcGetGeometryUserData] +- +-```{=tex} +- +-``` +-rtcSetGeometryUserPrimitiveCount +--------------------------------- +- +-#### NAME {#name} +- +- rtcSetGeometryUserPrimitiveCount - sets the number of primitives +- of a user-defined geometry +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcSetGeometryUserPrimitiveCount( +- RTCGeometry geometry, +- unsigned int userPrimitiveCount +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcSetGeometryUserPrimitiveCount` function sets the number of +-user-defined primitives (`userPrimitiveCount` parameter) of the +-specified user-defined geometry (`geometry` parameter). +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[RTC\_GEOMETRY\_TYPE\_USER] +- +-```{=tex} +- +-``` +-rtcSetGeometryBoundsFunction +----------------------------- +- +-#### NAME {#name} +- +- rtcSetGeometryBoundsFunction - sets a callback to query the +- bounding box of user-defined primitives +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- struct RTCBoundsFunctionArguments +- { +- void* geometryUserPtr; +- unsigned int primID; +- unsigned int timeStep; +- struct RTCBounds* bounds_o; +- }; +- +- typedef void (*RTCBoundsFunction)( +- const struct RTCBoundsFunctionArguments* args +- ); +- +- void rtcSetGeometryBoundsFunction( +- RTCGeometry geometry, +- RTCBoundsFunction bounds, +- void* userPtr +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcSetGeometryBoundsFunction` function registers a bounding box +-callback function (`bounds` argument) with payload (`userPtr` argument) +-for the specified user geometry (`geometry` argument). +- +-Only a single callback function can be registered per geometry, and +-further invocations overwrite the previously set callback function. +-Passing `NULL` as function pointer disables the registered callback +-function. +- +-In SYCL mode the BVH construction is done on the host and the passed +-function pointer must be a host-side function pointer. +- +-The registered bounding box callback function is invoked to calculate +-axis-aligned bounding boxes of the primitives of the user-defined +-geometry during spatial acceleration structure construction. The +-bounding box callback of `RTCBoundsFunction` type is invoked with a +-pointer to a structure of type `RTCBoundsFunctionArguments` which +-contains various arguments, such as: the user data of the geometry +-(`geometryUserPtr` member), the ID of the primitive to calculate the +-bounds for (`primID` member), the time step at which to calculate the +-bounds (`timeStep` member), and a memory location to write the +-calculated bound to (`bounds_o` member). +- +-In a typical usage scenario one would store a pointer to the internal +-representation of the user geometry object using +-`rtcSetGeometryUserData`. The callback function can then read that +-pointer from the `geometryUserPtr` field and calculate the proper +-bounding box for the requested primitive and time, and store that +-bounding box to the destination structure (`bounds_o` member). +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[RTC\_GEOMETRY\_TYPE\_USER] +- +-```{=tex} +- +-``` +-rtcSetGeometryIntersectFunction +-------------------------------- +- +-#### NAME {#name} +- +- rtcSetGeometryIntersectFunction - sets the callback function to +- intersect a user geometry +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- struct RTCIntersectFunctionNArguments +- { +- int* valid; +- void* geometryUserPtr; +- unsigned int primID; +- struct RTCRayQueryContext* context; +- struct RTCRayHitN* rayhit; +- unsigned int N; +- unsigned int geomID; +- }; +- +- typedef void (*RTCIntersectFunctionN)( +- const struct RTCIntersectFunctionNArguments* args +- ); +- +- void rtcSetGeometryIntersectFunction( +- RTCGeometry geometry, +- RTCIntersectFunctionN intersect +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcSetGeometryIntersectFunction` function registers a +-ray/primitive intersection callback function (`intersect` argument) for +-the specified user geometry (`geometry` argument). +- +-Only a single callback function can be registered per geometry and +-further invocations overwrite the previously set callback function. +-Passing `NULL` as function pointer disables the registered callback +-function. +- +-The registered callback function is invoked by `rtcIntersect`-type ray +-queries to calculate the intersection of a ray packet of variable size +-with one user-defined primitive. The callback function of type +-`RTCIntersectFunctionN` gets passed a number of arguments through the +-`RTCIntersectFunctionNArguments` structure. The value `N` specifies the +-ray packet size, `valid` points to an array of integers that specify +-whether the corresponding ray is valid (-1) or invalid (0), the +-`geometryUserPtr` member points to the geometry user data previously +-set through `rtcSetGeometryUserData`, the `context` member points to +-the ray query context passed to the ray query, the `rayhit` member +-points to a ray and hit packet of variable size `N`, and the `geomID` +-and `primID` member identifies the geometry ID and primitive ID of the +-primitive to intersect. +- +-The `ray` component of the `rayhit` structure contains valid data, in +-particular the `tfar` value is the current closest hit distance found. +-All data inside the `hit` component of the `rayhit` structure are +-undefined and should not be read by the function. +- +-The task of the callback function is to intersect each active ray from +-the ray packet with the specified user primitive. If the user-defined +-primitive is missed by a ray of the ray packet, the function should +-return without modifying the ray or hit. If an intersection of the +-user-defined primitive with the ray was found in the valid range (from +-`tnear` to `tfar`), it should update the hit distance of the ray +-(`tfar` member) and the hit (`u`, `v`, `Ng`, `instID`, `geomID`, +-`primID` members). In particular, the currently intersected instance is +-stored in the `instID` field of the ray query context, which must be +-deep copied into the `instID` member of the hit. +- +-As a primitive might have multiple intersections with a ray, the +-intersection filter function needs to be invoked by the user geometry +-intersection callback for each encountered intersection, if filtering +-of intersections is desired. This can be achieved through the +-`rtcInvokeIntersectFilterFromGeometry` call. +- +-Within the user geometry intersect function, it is safe to trace new +-rays and create new scenes and geometries. +- +-When performing ray queries using `rtcIntersect1`, it is guaranteed +-that the packet size is 1 when the callback is invoked. When performing +-ray queries using the `rtcIntersect4/8/16` functions, it is not +-generally guaranteed that the ray packet size (and order of rays inside +-the packet) passed to the callback matches the initial ray packet. +-However, under some circumstances these properties are guaranteed, and +-whether this is the case can be queried using `rtcGetDeviceProperty`. +- +-For many usage scenarios, repacking and re-ordering of rays does not +-cause difficulties in implementing the callback function. However, +-algorithms that need to extend the ray with additional data must use +-the `rayID` component of the ray to identify the original ray to access +-the per-ray data. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcSetGeometryOccludedFunction], [rtcSetGeometryUserData], +-[rtcInvokeIntersectFilterFromGeometry] +- +-```{=tex} +- +-``` +-rtcSetGeometryOccludedFunction +------------------------------- +- +-#### NAME {#name} +- +- rtcSetGeometryOccludedFunction - sets the callback function to +- test a user geometry for occlusion +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- struct RTCOccludedFunctionNArguments +- { +- int* valid; +- void* geometryUserPtr; +- unsigned int primID; +- struct RTCRayQueryContext* context; +- struct RTCRayN* ray; +- unsigned int N; +- unsigned int geomID; +- }; +- +- typedef void (*RTCOccludedFunctionN)( +- const struct RTCOccludedFunctionNArguments* args +- ); +- +- void rtcSetGeometryOccludedFunction( +- RTCGeometry geometry, +- RTCOccludedFunctionN filter +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcSetGeometryOccludedFunction` function registers a ray/primitive +-occlusion callback function (`filter` argument) for the specified user +-geometry (`geometry` argument). +- +-Only a single callback function can be registered per geometry, and +-further invocations overwrite the previously set callback function. +-Passing `NULL` as function pointer disables the registered callback +-function. +- +-The registered callback function is invoked by `rtcOccluded`-type ray +-queries to test whether the rays of a packet of variable size are +-occluded by a user-defined primitive. The callback function of type +-`RTCOccludedFunctionN` gets passed a number of arguments through the +-`RTCOccludedFunctionNArguments` structure. The value `N` specifies the +-ray packet size, `valid` points to an array of integers which specify +-whether the corresponding ray is valid (-1) or invalid (0), the +-`geometryUserPtr` member points to the geometry user data previously +-set through `rtcSetGeometryUserData`, the `context` member points to +-the ray query context passed to the ray query, the `ray` member points +-to a ray packet of variable size `N`, and the `geomID` and `primID` +-member identifies the geometry ID and primitive ID of the primitive to +-intersect. +- +-The task of the callback function is to intersect each active ray from +-the ray packet with the specified user primitive. If the user-defined +-primitive is missed by a ray of the ray packet, the function should +-return without modifying the ray. If an intersection of the +-user-defined primitive with the ray was found in the valid range (from +-`tnear` to `tfar`), it should set the `tfar` member of the ray to +-`-inf`. +- +-As a primitive might have multiple intersections with a ray, the +-occlusion filter function needs to be invoked by the user geometry +-occlusion callback for each encountered intersection, if filtering of +-intersections is desired. This can be achieved through the +-`rtcInvokeOccludedFilterFromGeometry` call. +- +-Within the user geometry occlusion function, it is safe to trace new +-rays and create new scenes and geometries. +- +-When performing ray queries using `rtcOccluded1`, it is guaranteed that +-the packet size is 1 when the callback is invoked. When performing ray +-queries using the `rtcOccluded4/8/16` functions, it is not generally +-guaranteed that the ray packet size (and order of rays inside the +-packet) passed to the callback matches the initial ray packet. However, +-under some circumstances these properties are guaranteed, and whether +-this is the case can be queried using `rtcGetDeviceProperty`. +- +-For many usage scenarios, repacking and re-ordering of rays does not +-cause difficulties in implementing the callback function. However, +-algorithms that need to extend the ray with additional data must use +-the `rayID` component of the ray to identify the original ray to access +-the per-ray data. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcSetGeometryIntersectFunction], [rtcSetGeometryUserData], +-[rtcInvokeOccludedFilterFromGeometry] +- +-```{=tex} +- +-``` +-rtcSetGeometryPointQueryFunction +--------------------------------- +- +-#### NAME {#name} +- +- rtcSetGeometryPointQueryFunction - sets the point query callback function +- for a geometry +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- struct RTCPointQueryFunctionArguments +- { +- // the (world space) query object that was passed as an argument of rtcPointQuery. +- struct RTCPointQuery* query; +- +- // used for user input/output data. Will not be read or modified internally. +- void* userPtr; +- +- // primitive and geometry ID of primitive +- unsigned int primID; +- unsigned int geomID; +- +- // the context with transformation and instance ID stack +- struct RTCPointQueryContext* context; +- +- // scaling factor indicating whether the current instance transformation +- // is a similarity transformation. +- float similarityScale; +- }; +- +- typedef bool (*RTCPointQueryFunction)( +- struct RTCPointQueryFunctionArguments* args +- ); +- +- void rtcSetGeometryPointQueryFunction( +- RTCGeometry geometry, +- RTCPointQueryFunction queryFunc +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcSetGeometryPointQueryFunction` function registers a point query +-callback function (`queryFunc` argument) for the specified geometry +-(`geometry` argument). +- +-Only a single callback function can be registered per geometry and +-further invocations overwrite the previously set callback function. +-Passing `NULL` as function pointer disables the registered callback +-function. +- +-The registered callback function is invoked by [rtcPointQuery] for +-every primitive of the geometry that intersects the corresponding point +-query domain. The callback function of type `RTCPointQueryFunction` +-gets passed a number of arguments through the +-`RTCPointQueryFunctionArguments` structure. The `query` object is the +-original point query object passed into [rtcPointQuery], `usrPtr` is +-an arbitrary pointer to pass input into and store results of the +-callback function. The `primID`, `geomID` and `context` (see +-[rtcInitPointQueryContext] for details) can be used to identify the +-geometry data of the primitive. +- +-A `RTCPointQueryFunction` can also be passed directly as an argument to +-[rtcPointQuery]. In this case the callback is invoked for all +-primitives in the scene that intersect the query domain. If a callback +-function is passed as an argument to [rtcPointQuery] and (a +-potentially different) callback function is set for a geometry with +-[rtcSetGeometryPointQueryFunction] both callback functions are +-invoked and the callback function passed to [rtcPointQuery] will be +-called before the geometry specific callback function. +- +-If instancing is used, the parameter `simliarityScale` indicates +-whether the current instance transform (top element of the stack in +-`context`) is a similarity transformation or not. Similarity +-transformations are composed of translation, rotation and uniform +-scaling and if a matrix M defines a similarity transformation, there is +-a scaling factor D such that for all x,y: dist(Mx, My) = D \* dist(x, +-y). In this case the parameter `scalingFactor` is this scaling factor D +-and otherwise it is 0. A valid similarity scale (`similarityScale` \> +-0) allows to compute distance information in instance space and scale +-the distances into world space (for example, to update the query +-radius, see below) by dividing the instance space distance with the +-similarity scale. If the current instance transform is not a similarity +-transform (`similarityScale` is 0), the distance computation has to be +-performed in world space to ensure correctness. In this case the +-instance to world transformations given with the `context` should be +-used to transform the primitive data into world space. Otherwise, the +-query location can be transformed into instance space which can be more +-efficient. If there is no instance transform, the similarity scale is +-1. +- +-The callback function will potentially be called for primitives outside +-the query domain for two reasons: First, the callback is invoked for +-all primitives inside a BVH leaf node since no geometry data of +-primitives is determined internally and therefore individual primitives +-are not culled (only their (aggregated) bounding boxes). Second, in +-case non similarity transformations are used, the resulting ellipsoidal +-query domain (in instance space) is approximated by its axis aligned +-bounding box internally and therefore inner nodes that do not intersect +-the original domain might intersect the approximative bounding box +-which results in unnecessary callbacks. In any case, the callbacks are +-conservative, i.e. if a primitive is inside the query domain a callback +-will be invoked but the reverse is not necessarily true. +- +-For efficiency, the radius of the `query` object can be decreased (in +-world space) inside the callback function to improve culling of +-geometry during BVH traversal. If the query radius was updated, the +-callback function should return `true` to issue an update of internal +-traversal information. Increasing the radius or modifying the time or +-position of the query results in undefined behaviour. +- +-Within the callback function, it is safe to call [rtcPointQuery] +-again, for example when implementing instancing manually. In this case +-the instance transformation should be pushed onto the stack in +-`context`. Embree will internally compute the point query information +-in instance space using the top element of the stack in `context` when +-[rtcPointQuery] is called. +- +-For a reference implementation of a closest point traversal of triangle +-meshes using instancing and user defined instancing see the tutorial +-[ClosestPoint]. +- +-#### SEE ALSO {#see-also} +- +-[rtcPointQuery], [rtcInitPointQueryContext] +- +-```{=tex} +- +-``` +-rtcGetSYCLDeviceFunctionPointer +-------------------------------- +- +-#### NAME {#name} +- +- rtcGetSYCLDeviceFunctionPointer - obtains a device side +- function pointer for some SYCL function +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- template +- inline decltype(F) rtcGetSYCLDeviceFunctionPointer(sycl::queue& queue); +- +-#### DESCRIPTION {#description} +- +-This function returns a device side function pointer for some function +-F. This function F must be defined using the +-`RTC_SYCL_INDIRECTLY_CALLABLE` attribute, e.g.: +- +- RTC_SYCL_INDIRECTLY_CALLABLE void filter( +- const RTCFilterFunctionNArguments* args) { ... } +- +- RTCFilterFunctionN fptr = rtcGetSYCLDeviceFunctionPointer(queue); +- +-Such a device side function pointers of some filter callbacks can get +-assigned to a geometry using the +-`rtcSetGeometryIntersectFilterFunction` and +-`rtcSetGeometryOccludedFilterFunction` API functions. +- +-Further, device side function pointers for user geometry callbacks can +-be assigned to geometries using the `rtcSetGeometryIntersectFunction` +-and `rtcSetGeometryOccludedFunction` API calls. +- +-These geometry versions of the callback functions are disabled in SYCL +-by default, and we recommend not using them for performance reasons. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcSetGeometryIntersectFunction], +-[rtcSetGeometryOccludedFunction], +-[rtcSetGeometryIntersectFilterFunction], +-[rtcSetGeometryOccludedFilterFunction] +- +-```{=tex} +- +-``` +-rtcSetGeometryInstancedScene +----------------------------- +- +-#### NAME {#name} +- +- rtcSetGeometryInstancedScene - sets the instanced scene of +- an instance geometry +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcSetGeometryInstancedScene( +- RTCGeometry geometry, +- RTCScene scene +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcSetGeometryInstancedScene` function sets the instanced scene +-(`scene` argument) of the specified instance geometry (`geometry` +-argument). +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[RTC\_GEOMETRY\_TYPE\_INSTANCE], [rtcSetGeometryTransform] +- +-```{=tex} +- +-``` +-rtcSetGeometryInstancedScenes +------------------------------ +- +-#### NAME {#name} +- +- rtcSetGeometryInstancedScenes - sets an array of scenes that can be +- instanced by an instance array geometry +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcSetGeometryInstancedScenes( +- RTCGeometry geometry, +- RTCScene* scene, +- size_t numScenes +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcSetGeometryInstancedScenes` function sets an array of type +-`RTCScene` with `numScenes` elements that the specified instance +-geometry (`geometry` argument) can instance. This call also requires +-setting an index buffer using either `rtcSetSharedGeometryBuffer` or +-`rtcSetNewGeometryBuffer` (similar to index buffers for triangle +-meshes), that specifies which instance of the instance array instances +-which scene in the scene array. If only one scene should be instanced +-the call `rtcSetGeometryInstancedScene` should be preferred. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[RTC\_GEOMETRY\_TYPE\_INSTANCE\_ARRAY], [rtcSetNewGeometryBuffer], +-[rtcSetSharedGeometryBuffer], [rtcSetGeometryInstancedScene] +- +-```{=tex} +- +-``` +-rtcSetGeometryTransform +------------------------ +- +-#### NAME {#name} +- +- rtcSetGeometryTransform - sets the transformation for a particular +- time step of an instance geometry +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcSetGeometryTransform( +- RTCGeometry geometry, +- unsigned int timeStep, +- enum RTCFormat format, +- const float* xfm +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcSetGeometryTransform` function sets the local-to-world affine +-transformation (`xfm` parameter) of an instance geometry (`geometry` +-parameter) for a particular time step (`timeStep` parameter). The +-transformation is specified as a 3×4 matrix (3×3 linear transformation +-plus translation), for which the following formats (`format` parameter) +-are supported: +- +-- `RTC_FORMAT_FLOAT3X4_ROW_MAJOR`: The 3×4 float matrix is laid out +- in row-major form. +- +-- `RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR`: The 3×4 float matrix is laid +- out in column-major form. +- +-- `RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR`: The 3×4 float matrix is laid +- out in column-major form as a 4×4 homogeneous matrix with the last +- row being equal to (0, 0, 0, 1). +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[RTC\_GEOMETRY\_TYPE\_INSTANCE] +- +-```{=tex} +- +-``` +-rtcSetGeometryTransformQuaternion +---------------------------------- +- +-#### NAME {#name} +- +- rtcSetGeometryTransformQuaternion - sets the transformation for a particular +- time step of an instance geometry as a decomposition of the +- transformation matrix using quaternions to represent the rotation. +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcSetGeometryTransformQuaternion( +- RTCGeometry geometry, +- unsigned int timeStep, +- const struct RTCQuaternionDecomposition* qd +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcSetGeometryTransformQuaternion` function sets the +-local-to-world affine transformation (`qd` parameter) of an instance +-geometry (`geometry` parameter) for a particular time step (`timeStep` +-parameter). The transformation is specified as a +-[RTCQuaternionDecomposition], which is a decomposition of an affine +-transformation that represents the rotational component of an affine +-transformation as a quaternion. This allows interpolating rotational +-transformations exactly using spherical linear interpolation (such as a +-turning wheel). +- +-For more information about the decomposition see +-[RTCQuaternionDecomposition]. The quaternion given in the +-`RTCQuaternionDecomposition` struct will be normalized internally. +- +-For correct results, the transformation matrices for all time steps +-must be set either using `rtcSetGeometryTransform` or +-`rtcSetGeometryTransformQuaternion`. Mixing both representations is not +-allowed. Spherical linear interpolation will be used, iff the +-transformation matizes are set with +-`rtcSetGeometryTransformQuaternion`. +- +-For an example of this feature see the tutorial [Quaternion Motion +-Blur]. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcInitQuaternionDecomposition], [rtcSetGeometryTransform] +- +-```{=tex} +- +-``` +-rtcGetGeometryTransform +------------------------ +- +-#### NAME {#name} +- +- rtcGetGeometryTransform - returns the interpolated instance +- transformation for the specified time +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcGetGeometryTransform( +- RTCGeometry geometry, +- float time, +- enum RTCFormat format, +- void* xfm +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcGetGeometryTransform` function returns the interpolated local +-to world transformation (`xfm` parameter) of an instance geometry +-(`geometry` parameter) for a particular time (`time` parameter in range +-$[0,1]$) in the specified format (`format` parameter). +- +-Possible formats for the returned matrix are: +- +-- `RTC_FORMAT_FLOAT3X4_ROW_MAJOR`: The 3×4 float matrix is laid out +- in row-major form. +- +-- `RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR`: The 3×4 float matrix is laid +- out in column-major form. +- +-- `RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR`: The 3×4 float matrix is laid +- out in column-major form as a 4×4 homogeneous matrix with last row +- equal to (0, 0, 0, 1). +- +-This function is supposed to be used during rendering, but only +-supported on the CPU and not inside SYCL kernels on the GPU. Inside a +-SYCL kernel the `rtcGetGeometryTransformFromScene` function has to get +-used. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[RTC\_GEOMETRY\_TYPE\_INSTANCE], [rtcSetGeometryTransform], +-[rtcGetGeometryTransformFromScene] +- +-```{=tex} +- +-``` +-rtcGetGeometryTransformEx +-------------------------- +- +-#### NAME {#name} +- +- rtcGetGeometryTransformEx - returns the interpolated instance +- transformation for an instance of an instance array geometry for the +- specified time. +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcGetGeometryTransformEx( +- RTCGeometry geometry, +- unsigned int instPrimID, +- float time, +- enum RTCFormat format, +- void* xfm +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcGetGeometryTransformEx` function returns the interpolated local +-to world transformation (`xfm` parameter) of the `instPrimID`-th +-instance of an instance array geometry (`geometry` parameter) for a +-particular time (`time` parameter in range $[0,1]$) in the specified +-format (`format` parameter). The function can also be used when +-`geometry` refers to a regular instance, but then the `instPrimID` has +-to be $0$. +- +-Possible formats for the returned matrix are: +- +-- `RTC_FORMAT_FLOAT3X4_ROW_MAJOR`: The 3×4 float matrix is laid out +- in row-major form. +- +-- `RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR`: The 3×4 float matrix is laid +- out in column-major form. +- +-- `RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR`: The 3×4 float matrix is laid +- out in column-major form as a 4×4 homogeneous matrix with last row +- equal to (0, 0, 0, 1). +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[RTC\_GEOMETRY\_TYPE\_INSTANCE\_ARRAY] +- +-```{=tex} +- +-``` +-rtcGetGeometryTransformFromScene +--------------------------------- +- +-#### NAME {#name} +- +- rtcGetGeometryTransformFromScene - returns the interpolated instance +- transformation for the specified time +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcGetGeometryTransformFromScene( +- RTCScene scene, +- unsigned int geomID, +- float time, +- enum RTCFormat format, +- void* xfm +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcGetGeometryTransformFromScene` function returns the +-interpolated local to world transformation (`xfm` output parameter) of +-an instance geometry specified by its geometry ID (`geomID` parameter) +-of a scene (`scene` parameter) for a particular time (`time` parameter +-in range $[0,1]$) in the specified format (`format` parameter). +- +-Possible formats for the returned matrix are: +- +-- `RTC_FORMAT_FLOAT3X4_ROW_MAJOR`: The 3×4 float matrix is laid out +- in row-major form. +- +-- `RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR`: The 3×4 float matrix is laid +- out in column-major form. +- +-- `RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR`: The 3×4 float matrix is laid +- out in column-major form as a 4×4 homogeneous matrix with last row +- equal to (0, 0, 0, 1). +- +-In contrast to the `rtcGetGeometryTransform` function, the +-`rtcGetGeometryTransformFromScene` function can get used during +-rendering inside a SYCL kernel. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[RTC\_GEOMETRY\_TYPE\_INSTANCE], [rtcSetGeometryTransform], +-[rtcGetGeometryTransform] +- +-```{=tex} +- +-``` +-rtcSetGeometryTessellationRate +------------------------------- +- +-#### NAME {#name} +- +- rtcSetGeometryTessellationRate - sets the tessellation rate of the +- geometry +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcSetGeometryTessellationRate( +- RTCGeometry geometry, +- float tessellationRate +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcSetGeometryTessellationRate` function sets the tessellation +-rate (`tessellationRate` argument) for the specified geometry +-(`geometry` argument). The tessellation rate can only be set for flat +-curves and subdivision geometries. For curves, the tessellation rate +-specifies the number of ray-facing quads per curve segment. For +-subdivision surfaces, the tessellation rate specifies the number of +-quads along each edge. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[RTC\_GEOMETRY\_TYPE\_CURVE], [RTC\_GEOMETRY\_TYPE\_SUBDIVISION] +- +-```{=tex} +- +-``` +-rtcSetGeometryTopologyCount +---------------------------- +- +-#### NAME {#name} +- +- rtcSetGeometryTopologyCount - sets the number of topologies of +- a subdivision geometry +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcSetGeometryTopologyCount( +- RTCGeometry geometry, +- unsigned int topologyCount +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcSetGeometryTopologyCount` function sets the number of +-topologies (`topologyCount` parameter) for the specified subdivision +-geometry (`geometry` parameter). The number of topologies of a +-subdivision geometry must be greater or equal to 1. +- +-To use multiple topologies, first the number of topologies must be +-specified, then the individual topologies can be configured using +-`rtcSetGeometrySubdivisionMode` and by setting an index buffer +-(`RTC_BUFFER_TYPE_INDEX`) using the topology ID as the buffer slot. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[RTC\_GEOMETRY\_TYPE\_SUBDIVISION], [rtcSetGeometrySubdivisionMode] +- +-```{=tex} +- +-``` +-rtcSetGeometrySubdivisionMode +------------------------------ +- +-#### NAME {#name} +- +- rtcSetGeometrySubdivisionMode - sets the subdivision mode +- of a subdivision geometry +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcSetGeometrySubdivisionMode( +- RTCGeometry geometry, +- unsigned int topologyID, +- enum RTCSubdivisionMode mode +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcSetGeometrySubdivisionMode` function sets the subdivision mode +-(`mode` parameter) for the topology (`topologyID` parameter) of the +-specified subdivision geometry (`geometry` parameter). +- +-The subdivision modes can be used to force linear interpolation for +-certain parts of the subdivision mesh: +- +-- `RTC_SUBDIVISION_MODE_NO_BOUNDARY`: Boundary patches are ignored. +- This way each rendered patch has a full set of control vertices. +- +-- `RTC_SUBDIVISION_MODE_SMOOTH_BOUNDARY`: The sequence of boundary +- control points are used to generate a smooth B-spline boundary +- curve (default mode). +- +-- `RTC_SUBDIVISION_MODE_PIN_CORNERS`: Corner vertices are pinned to +- their location during subdivision. +- +-- `RTC_SUBDIVISION_MODE_PIN_BOUNDARY`: All vertices at the border are +- pinned to their location during subdivision. This way the boundary +- is interpolated linearly. This mode is typically used for texturing +- to also map texels at the border of the texture to the mesh. +- +-- `RTC_SUBDIVISION_MODE_PIN_ALL`: All vertices at the border are +- pinned to their location during subdivision. This way all patches +- are linearly interpolated. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[RTC\_GEOMETRY\_TYPE\_SUBDIVISION] +- +-```{=tex} +- +-``` +-rtcSetGeometryVertexAttributeTopology +-------------------------------------- +- +-#### NAME {#name} +- +- rtcSetGeometryVertexAttributeTopology - binds a vertex +- attribute to a topology of the geometry +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcSetGeometryVertexAttributeTopology( +- RTCGeometry geometry, +- unsigned int vertexAttributeID, +- unsigned int topologyID +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcSetGeometryVertexAttributeTopology` function binds a vertex +-attribute buffer slot (`vertexAttributeID` argument) to a topology +-(`topologyID` argument) for the specified subdivision geometry +-(`geometry` argument). Standard vertex buffers are always bound to the +-default topology (topology 0) and cannot be bound differently. A vertex +-attribute buffer always uses the topology it is bound to when used in +-the `rtcInterpolate` and `rtcInterpolateN` calls. +- +-A topology with ID `i` consists of a subdivision mode set through +-`rtcSetGeometrySubdivisionMode` and the index buffer bound to the index +-buffer slot `i`. This index buffer can assign indices for each face of +-the subdivision geometry that are different to the indices of the +-default topology. These new indices can for example be used to +-introduce additional borders into the subdivision mesh to map multiple +-textures onto one subdivision geometry. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcSetGeometrySubdivisionMode], [rtcInterpolate], +-[rtcInterpolateN] +- +-```{=tex} +- +-``` +-rtcSetGeometryDisplacementFunction +----------------------------------- +- +-#### NAME {#name} +- +- rtcSetGeometryDisplacementFunction - sets the displacement function +- for a subdivision geometry +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- struct RTCDisplacementFunctionNArguments +- { +- void* geometryUserPtr; +- RTCGeometry geometry; +- unsigned int primID; +- unsigned int timeStep; +- const float* u; +- const float* v; +- const float* Ng_x; +- const float* Ng_y; +- const float* Ng_z; +- float* P_x; +- float* P_y; +- float* P_z; +- unsigned int N; +- }; +- +- typedef void (*RTCDisplacementFunctionN)( +- const struct RTCDisplacementFunctionNArguments* args +- ); +- +- void rtcSetGeometryDisplacementFunction( +- RTCGeometry geometry, +- RTCDisplacementFunctionN displacement +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcSetGeometryDisplacementFunction` function registers a +-displacement callback function (`displacement` argument) for the +-specified subdivision geometry (`geometry` argument). +- +-Only a single callback function can be registered per geometry, and +-further invocations overwrite the previously set callback function. +-Passing `NULL` as function pointer disables the registered callback +-function. +- +-The registered displacement callback function is invoked to displace +-points on the subdivision geometry during spatial acceleration +-structure construction, during the `rtcCommitScene` call. +- +-The callback function of type `RTCDisplacementFunctionN` is invoked +-with a number of arguments stored inside the +-`RTCDisplacementFunctionNArguments` structure. The provided user data +-pointer of the geometry (`geometryUserPtr` member) can be used to point +-to the application's representation of the subdivision mesh. A number +-`N` of points to displace are specified in a structure of array layout. +-For each point to displace, the local patch UV coordinates (`u` and `v` +-arrays), the normalized geometry normal (`Ng_x`, `Ng_y`, and `Ng_z` +-arrays), and the position (`P_x`, `P_y`, and `P_z` arrays) are +-provided. The task of the displacement function is to use this +-information and change the position data. +- +-The geometry handle (`geometry` member) and primitive ID (`primID` +-member) of the patch to displace are additionally provided as well as +-the time step `timeStep`, which can be important if the displacement is +-time-dependent and motion blur is used. +- +-All passed arrays must be aligned to 64 bytes and properly padded to +-make wide vector processing inside the displacement function easily +-possible. +- +-Also see tutorial [Displacement Geometry] for an example of how to +-use the displacement mapping functions. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[RTC\_GEOMETRY\_TYPE\_SUBDIVISION] +- +-```{=tex} +- +-``` +-rtcGetGeometryFirstHalfEdge +---------------------------- +- +-#### NAME {#name} +- +- rtcGetGeometryFirstHalfEdge - returns the first half edge of a face +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- unsigned int rtcGetGeometryFirstHalfEdge( +- RTCGeometry geometry, +- unsigned int faceID +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcGetGeometryFirstHalfEdge` function returns the ID of the first +-half edge belonging to the specified face (`faceID` argument). For +-instance in the following example the first half edge of face `f1` is +-`e4`. +- +-![][imgHalfEdges] +- +-This function can only be used for subdivision geometries. As all +-topologies of a subdivision geometry share the same face buffer the +-function does not depend on the topology ID. +- +-Here f0 to f7 are 8 quadrilateral faces with 4 vertices each. The edges +-e0 to e23 of these faces are shown with their orientation. For each +-face the ID of the edges corresponds to the slots the face occupies in +-the index array of the geometry. E.g. as the indices of face f1 start +-at location 4 of the index array, the first edge is edge e4, the next +-edge e5, etc. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcGetGeometryFirstHalfEdge], [rtcGetGeometryFace], +-[rtcGetGeometryOppositeHalfEdge], [rtcGetGeometryNextHalfEdge], +-[rtcGetGeometryPreviousHalfEdge] +- +-```{=tex} +- +-``` +-rtcGetGeometryFace +------------------- +- +-#### NAME {#name} +- +- rtcGetGeometryFace - returns the face of some half edge +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- unsigned int rtcGetGeometryFace( +- RTCGeometry geometry, +- unsigned int edgeID +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcGetGeometryFace` function returns the ID of the face the +-specified half edge (`edgeID` argument) belongs to. For instance in the +-following example the face `f1` is returned for edges `e4`, `e5`, `e6`, +-and `e7`. +- +-![][imgHalfEdges] +- +-This function can only be used for subdivision geometries. As all +-topologies of a subdivision geometry share the same face buffer the +-function does not depend on the topology ID. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcGetGeometryFirstHalfEdge], [rtcGetGeometryFace], +-[rtcGetGeometryOppositeHalfEdge], [rtcGetGeometryNextHalfEdge], +-[rtcGetGeometryPreviousHalfEdge] +- +-```{=tex} +- +-``` +-rtcGetGeometryNextHalfEdge +--------------------------- +- +-#### NAME {#name} +- +- rtcGetGeometryNextHalfEdge - returns the next half edge +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- unsigned int rtcGetGeometryNextHalfEdge( +- RTCGeometry geometry, +- unsigned int edgeID +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcGetGeometryNextHalfEdge` function returns the ID of the next +-half edge of the specified half edge (`edgeID` argument). For instance +-in the following example the next half edge of `e10` is `e11`. +- +-![][imgHalfEdges] +- +-This function can only be used for subdivision geometries. As all +-topologies of a subdivision geometry share the same face buffer the +-function does not depend on the topology ID. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcGetGeometryFirstHalfEdge], [rtcGetGeometryFace], +-[rtcGetGeometryOppositeHalfEdge], [rtcGetGeometryNextHalfEdge], +-[rtcGetGeometryPreviousHalfEdge] +- +-```{=tex} +- +-``` +-rtcGetGeometryPreviousHalfEdge +------------------------------- +- +-#### NAME {#name} +- +- rtcGetGeometryPreviousHalfEdge - returns the previous half edge +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- unsigned int rtcGetGeometryPreviousHalfEdge( +- RTCGeometry geometry, +- unsigned int edgeID +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcGetGeometryPreviousHalfEdge` function returns the ID of the +-previous half edge of the specified half edge (`edgeID` argument). For +-instance in the following example the previous half edge of `e6` is +-`e5`. +- +-![][imgHalfEdges] +- +-This function can only be used for subdivision geometries. As all +-topologies of a subdivision geometry share the same face buffer the +-function does not depend on the topology ID. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcGetGeometryFirstHalfEdge], [rtcGetGeometryFace], +-[rtcGetGeometryOppositeHalfEdge], [rtcGetGeometryNextHalfEdge], +-[rtcGetGeometryPreviousHalfEdge] +- +-```{=tex} +- +-``` +-rtcGetGeometryOppositeHalfEdge +------------------------------- +- +-#### NAME {#name} +- +- rtcGetGeometryOppositeHalfEdge - returns the opposite half edge +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- unsigned int rtcGetGeometryOppositeHalfEdge( +- RTCGeometry geometry, +- unsigned int topologyID, +- unsigned int edgeID +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcGetGeometryOppositeHalfEdge` function returns the ID of the +-opposite half edge of the specified half edge (`edgeID` argument) in +-the specified topology (`topologyID` argument). For instance in the +-following example the opposite half edge of `e6` is `e16`. +- +-![][imgHalfEdges] +- +-An opposite half edge does not exist if the specified half edge has +-either no neighboring face, or more than 2 neighboring faces. In these +-cases the function just returns the same edge `edgeID` again. +- +-This function can only be used for subdivision geometries. The function +-depends on the topology as the topologies of a subdivision geometry +-have different index buffers assigned. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcGetGeometryFirstHalfEdge], [rtcGetGeometryFace], +-[rtcGetGeometryOppositeHalfEdge], [rtcGetGeometryNextHalfEdge], +-[rtcGetGeometryPreviousHalfEdge] +- +-```{=tex} +- +-``` +-rtcInterpolate +--------------- +- +-#### NAME {#name} +- +- rtcInterpolate - interpolates vertex attributes +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- struct RTCInterpolateArguments +- { +- RTCGeometry geometry; +- unsigned int primID; +- float u; +- float v; +- enum RTCBufferType bufferType; +- unsigned int bufferSlot; +- float* P; +- float* dPdu; +- float* dPdv; +- float* ddPdudu; +- float* ddPdvdv; +- float* ddPdudv; +- unsigned int valueCount; +- }; +- +- void rtcInterpolate( +- const struct RTCInterpolateArguments* args +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcInterpolate` function smoothly interpolates per-vertex data +-over the geometry. This interpolation is supported for triangle meshes, +-quad meshes, curve geometries, and subdivision geometries. Apart from +-interpolating the vertex attribute itself, it is also possible to get +-the first and second order derivatives of that value. This +-interpolation ignores displacements of subdivision surfaces and always +-interpolates the underlying base surface. +- +-The `rtcInterpolate` call gets passed a number of arguments inside a +-structure of type `RTCInterpolateArguments`. For some geometry +-(`geometry` parameter) this function smoothly interpolates the +-per-vertex data stored inside the specified geometry buffer +-(`bufferType` and `bufferSlot` parameters) to the u/v location (`u` and +-`v` parameters) of the primitive (`primID` parameter). The number of +-floating point values to interpolate and store to the destination +-arrays can be specified using the `valueCount` parameter. As +-interpolation buffer, one can specify vertex buffers +-(`RTC_BUFFER_TYPE_VERTEX`) and vertex attribute buffers +-(`RTC_BUFFER_TYPE_VERTEX_ATTRIBUTE`) as well. +- +-The `rtcInterpolate` call stores `valueCount` number of interpolated +-floating point values to the memory location pointed to by `P`. One can +-avoid storing the interpolated value by setting `P` to `NULL`. +- +-The first order derivative of the interpolation by u and v are stored +-at the `dPdu` and `dPdv` memory locations. One can avoid storing first +-order derivatives by setting both `dPdu` and `dPdv` to `NULL`. +- +-The second order derivatives are stored at the `ddPdudu`, `ddPdvdv`, +-and `ddPdudv` memory locations. One can avoid storing second order +-derivatives by setting these three pointers to `NULL`. +- +-To use `rtcInterpolate` for a geometry, all changes to that geometry +-must be properly committed using `rtcCommitGeometry`. +- +-All input buffers and output arrays must be padded to 16 bytes, as the +-implementation uses 16-byte SSE instructions to read and write into +-these buffers. +- +-See tutorial [Interpolation] for an example of using the +-`rtcInterpolate` function. +- +-#### EXIT STATUS {#exit-status} +- +-For performance reasons this function does not do any error checks, +-thus will not set any error flags on failure. +- +-#### SEE ALSO {#see-also} +- +-[rtcInterpolateN] +- +-```{=tex} +- +-``` +-rtcInterpolateN +---------------- +- +-#### NAME {#name} +- +- rtcInterpolateN - performs N interpolations of vertex attribute data +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- struct RTCInterpolateNArguments +- { +- RTCGeometry geometry; +- const void* valid; +- const unsigned int* primIDs; +- const float* u; +- const float* v; +- unsigned int N; +- enum RTCBufferType bufferType; +- unsigned int bufferSlot; +- float* P; +- float* dPdu; +- float* dPdv; +- float* ddPdudu; +- float* ddPdvdv; +- float* ddPdudv; +- unsigned int valueCount; +- }; +- +- void rtcInterpolateN( +- const struct RTCInterpolateNArguments* args +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcInterpolateN` is similar to `rtcInterpolate`, but performs `N` +-many interpolations at once. It additionally gets an array of u/v +-coordinates and a valid mask (`valid` parameter) that specifies which +-of these coordinates are valid. The valid mask points to `N` integers, +-and a value of -1 denotes valid and 0 invalid. If the valid pointer is +-`NULL` all elements are considers valid. The destination arrays are +-filled in structure of array (SOA) layout. The value `N` must be +-divisible by 4. +- +-To use `rtcInterpolateN` for a geometry, all changes to that geometry +-must be properly committed using `rtcCommitGeometry`. +- +-#### EXIT STATUS {#exit-status} +- +-For performance reasons this function does not do any error checks, +-thus will not set any error flags on failure. +- +-#### SEE ALSO {#see-also} +- +-[rtcInterpolate] +- +-```{=tex} +- +-``` +-rtcNewBuffer +------------- +- +-#### NAME {#name} +- +- rtcNewBuffer - creates a new data buffer +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- RTCBuffer rtcNewBuffer( +- RTCDevice device, +- size_t byteSize +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcNewBuffer` function creates a new data buffer object of +-specified size in bytes (`byteSize` argument) that is bound to the +-specified device (`device` argument). The buffer object is reference +-counted with an initial reference count of 1. The returned buffer +-object can be released using the `rtcReleaseBuffer` API call. The +-specified number of bytes are allocated at buffer construction time and +-deallocated when the buffer is destroyed. +- +-When the buffer will be used as a vertex buffer +-(`RTC_BUFFER_TYPE_VERTEX` and `RTC_BUFFER_TYPE_VERTEX_ATTRIBUTE`), the +-last buffer element must be readable using 16-byte SSE load +-instructions, thus padding the last element is required for certain +-layouts. E.g. a standard `float3` vertex buffer layout should add +-storage for at least one more float to the end of the buffer. +- +-#### EXIT STATUS {#exit-status} +- +-On failure `NULL` is returned and an error code is set that can be +-queried using `rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcRetainBuffer], [rtcReleaseBuffer] +- +-```{=tex} +- +-``` +-rtcNewSharedBuffer +------------------- +- +-#### NAME {#name} +- +- rtcNewSharedBuffer - creates a new shared data buffer +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- RTCBuffer rtcNewSharedBuffer( +- RTCDevice device, +- void* ptr, +- size_t byteSize +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcNewSharedBuffer` function creates a new shared data buffer +-object bound to the specified device (`device` argument). The buffer +-object is reference counted with an initial reference count of 1. The +-buffer can be released using the `rtcReleaseBuffer` function. +- +-At construction time, the pointer to the user-managed buffer data +-(`ptr` argument) including its size in bytes (`byteSize` argument) is +-provided to create the buffer. At buffer construction time no buffer +-data is allocated, but the buffer data provided by the application is +-used. The buffer data must remain valid for as long as the buffer may +-be used, and the user is responsible to free the buffer data when no +-longer required. +- +-When the buffer will be used as a vertex buffer +-(`RTC_BUFFER_TYPE_VERTEX` and `RTC_BUFFER_TYPE_VERTEX_ATTRIBUTE`), the +-last buffer element must be readable using 16-byte SSE load +-instructions, thus padding the last element is required for certain +-layouts. E.g. a standard `float3` vertex buffer layout should add +-storage for at least one more float to the end of the buffer. +- +-The data pointer (`ptr` argument) must be aligned to 4 bytes; otherwise +-the `rtcNewSharedBuffer` function will fail. +- +-#### EXIT STATUS {#exit-status} +- +-On failure `NULL` is returned and an error code is set that can be +-queried using `rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcRetainBuffer], [rtcReleaseBuffer] +- +-```{=tex} +- +-``` +-rtcRetainBuffer +---------------- +- +-#### NAME {#name} +- +- rtcRetainBuffer - increments the buffer reference count +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcRetainBuffer(RTCBuffer buffer); +- +-#### DESCRIPTION {#description} +- +-Buffer objects are reference counted. The `rtcRetainBuffer` function +-increments the reference count of the passed buffer object (`buffer` +-argument). This function together with `rtcReleaseBuffer` allows to use +-the internal reference counting in a C++ wrapper class to handle the +-ownership of the object. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewBuffer], [rtcReleaseBuffer] +- +-```{=tex} +- +-``` +-rtcReleaseBuffer +----------------- +- +-#### NAME {#name} +- +- rtcReleaseBuffer - decrements the buffer reference count +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcReleaseBuffer(RTCBuffer buffer); +- +-#### DESCRIPTION {#description} +- +-Buffer objects are reference counted. The `rtcReleaseBuffer` function +-decrements the reference count of the passed buffer object (`buffer` +-argument). When the reference count falls to 0, the buffer gets +-destroyed. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewBuffer], [rtcRetainBuffer] +- +-```{=tex} +- +-``` +-rtcGetBufferData +----------------- +- +-#### NAME {#name} +- +- rtcGetBufferData - gets a pointer to the buffer data +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void* rtcGetBufferData(RTCBuffer buffer); +- +-#### DESCRIPTION {#description} +- +-The `rtcGetBufferData` function returns a pointer to the buffer data of +-the specified buffer object (`buffer` argument). +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewBuffer] +- +-```{=tex} +- +-``` +-RTCRay +------- +- +-#### NAME {#name} +- +- RTCRay - single ray structure +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- struct RTC_ALIGN(16) RTCRay +- { +- float org_x; // x coordinate of ray origin +- float org_y; // y coordinate of ray origin +- float org_z; // z coordinate of ray origin +- float tnear; // start of ray segment +- +- float dir_x; // x coordinate of ray direction +- float dir_y; // y coordinate of ray direction +- float dir_z; // z coordinate of ray direction +- float time; // time of this ray for motion blur +- +- float tfar; // end of ray segment (set to hit distance) +- unsigned int mask; // ray mask +- unsigned int id; // ray ID +- unsigned int flags; // ray flags +- }; +- +-#### DESCRIPTION {#description} +- +-The `RTCRay` structure defines the ray layout for a single ray. The ray +-contains the origin (`org_x`, `org_y`, `org_z` members), direction +-vector (`dir_x`, `dir_y`, `dir_z` members), and ray segment (`tnear` +-and `tfar` members). The ray direction does not have to be normalized, +-and only the parameter range specified by the `tnear`/`tfar` interval +-is considered valid. +- +-The ray segment must be in the range $[0, \infty]$, thus ranges that +-start behind the ray origin are not allowed, but ranges can reach to +-infinity. +- +-The ray further contains a motion blur time in the range $[0, 1]$ +-(`time` member), a ray mask (`mask` member), a ray ID (`id` member), +-and ray flags (`flags` member). The ray mask can be used to mask out +-some geometries for some rays (see `rtcSetGeometryMask` for more +-details). The ray ID can be used to identify a ray inside a callback +-function, even if the order of rays inside a ray packet has changed. +- +-The `embree4/rtcore_ray.h` header additionally defines the same ray +-structure in structure of array (SOA) layout for API functions +-accepting ray packets of size 4 (`RTCRay4` type), size 8 (`RTCRay8` +-type), and size 16 (`RTCRay16` type). The header additionally defines +-an `RTCRayNt` template for ray packets of an arbitrary compile-time +-size. +- +-#### EXIT STATUS {#exit-status} +- +-#### SEE ALSO {#see-also} +- +-[RTCHit] +- +-```{=tex} +- +-``` +-RTCHit +------- +- +-#### NAME {#name} +- +- RTCHit - single hit structure +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- struct RTCHit +- { +- float Ng_x; // x coordinate of geometry normal +- float Ng_y; // y coordinate of geometry normal +- float Ng_z; // z coordinate of geometry normal +- +- float u; // barycentric u coordinate of hit +- float v; // barycentric v coordinate of hit +- +- unsigned int primID; // geometry ID +- unsigned int geomID; // primitive ID +- unsigned int instID[RTC_MAX_INSTANCE_LEVEL_COUNT]; // instance ID +- }; +- +-#### DESCRIPTION {#description} +- +-The `RTCHit` type defines the type of a ray/primitive intersection +-result. The hit contains the unnormalized geometric normal in object +-space at the hit location (`Ng_x`, `Ng_y`, `Ng_z` members), the +-barycentric u/v coordinates of the hit (`u` and `v` members), as well +-as the primitive ID (`primID` member), geometry ID (`geomID` member), +-and instance ID stack (`instID` member) of the hit. The parametric +-intersection distance is not stored inside the hit, but stored inside +-the `tfar` member of the ray. +- +-The `embree4/rtcore_ray.h` header additionally defines the same hit +-structure in structure of array (SOA) layout for hit packets of size 4 +-(`RTCHit4` type), size 8 (`RTCHit8` type), and size 16 (`RTCHit16` +-type). The header additionally defines an `RTCHitNt` template for hit +-packets of an arbitrary compile-time size. +- +-#### EXIT STATUS {#exit-status} +- +-#### SEE ALSO {#see-also} +- +-[RTCRay], [Multi-Level Instancing] +- +-```{=tex} +- +-``` +-RTCRayHit +---------- +- +-#### NAME {#name} +- +- RTCRayHit - combined single ray/hit structure +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- struct RTCORE_ALIGN(16) RTCRayHit +- { +- struct RTCRay ray; +- struct RTCHit hit; +- }; +- +-#### DESCRIPTION {#description} +- +-The `RTCRayHit` structure is used as input for the `rtcIntersect`-type +-functions and stores the ray to intersect and some hit fields that hold +-the intersection result afterwards. +- +-The `embree4/rtcore_ray.h` header additionally defines the same ray/hit +-structure in structure of array (SOA) layout for API functions +-accepting ray packets of size 4 (`RTCRayHit4` type), size 8 +-(`RTCRayHit8` type), and size 16 (`RTCRayHit16` type). The header +-additionally defines an `RTCRayHitNt` template to generate ray/hit +-packets of an arbitrary compile-time size. +- +-#### EXIT STATUS {#exit-status} +- +-#### SEE ALSO {#see-also} +- +-[RTCRay], [RTCHit] +- +-```{=tex} +- +-``` +-RTCRayN +-------- +- +-#### NAME {#name} +- +- RTCRayN - ray packet of runtime size +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- struct RTCRayN; +- +- float& RTCRayN_org_x(RTCRayN* ray, unsigned int N, unsigned int i); +- float& RTCRayN_org_y(RTCRayN* ray, unsigned int N, unsigned int i); +- float& RTCRayN_org_z(RTCRayN* ray, unsigned int N, unsigned int i); +- float& RTCRayN_tnear(RTCRayN* ray, unsigned int N, unsigned int i); +- +- float& RTCRayN_dir_x(RTCRayN* ray, unsigned int N, unsigned int i); +- float& RTCRayN_dir_y(RTCRayN* ray, unsigned int N, unsigned int i); +- float& RTCRayN_dir_z(RTCRayN* ray, unsigned int N, unsigned int i); +- float& RTCRayN_time (RTCRayN* ray, unsigned int N, unsigned int i); +- +- float& RTCRayN_tfar (RTCRayN* ray, unsigned int N, unsigned int i); +- unsigned int& RTCRayN_mask (RTCRayN* ray, unsigned int N, unsigned int i); +- unsigned int& RTCRayN_id (RTCRayN* ray, unsigned int N, unsigned int i); +- unsigned int& RTCRayN_flags(RTCRayN* ray, unsigned int N, unsigned int i); +- +-#### DESCRIPTION {#description} +- +-When the ray packet size is not known at compile time (e.g. when Embree +-returns a ray packet in the `RTCFilterFuncN` callback function), Embree +-uses the `RTCRayN` type for ray packets. These ray packets can only +-have sizes of 1, 4, 8, or 16. No other packet size will be used. +- +-You can either implement different special code paths for each of these +-possible packet sizes and cast the ray to the appropriate ray packet +-type, or implement one general code path that uses the `RTCRayN_XXX` +-helper functions to access the ray packet components. +- +-These helper functions get a pointer to the ray packet (`ray` +-argument), the packet size (`N` argument), and returns a reference to a +-component (e.g. x-component of origin) of the the i-th ray of the +-packet (`i` argument). +- +-#### EXIT STATUS {#exit-status} +- +-#### SEE ALSO {#see-also} +- +-[RTCHitN] +- +-```{=tex} +- +-``` +-RTCHitN +-------- +- +-#### NAME {#name} +- +- RTCHitN - hit packet of runtime size +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- struct HitN; +- +- float& RTCHitN_Ng_x(RTCHitN* hit, unsigned int N, unsigned int i); +- float& RTCHitN_Ng_y(RTCHitN* hit, unsigned int N, unsigned int i); +- float& RTCHitN_Ng_z(RTCHitN* hit, unsigned int N, unsigned int i); +- +- float& RTCHitN_u(RTCHitN* hit, unsigned int N, unsigned int i); +- float& RTCHitN_v(RTCHitN* hit, unsigned int N, unsigned int i); +- +- unsigned& RTCHitN_primID(RTCHitN* hit, unsigned int N, unsigned int i); +- unsigned& RTCHitN_geomID(RTCHitN* hit, unsigned int N, unsigned int i); +- unsigned& RTCHitN_instID(RTCHitN* hit, unsigned int N, unsigned int i, unsigned int level); +- +-#### DESCRIPTION {#description} +- +-When the hit packet size is not known at compile time (e.g. when Embree +-returns a hit packet in the `RTCFilterFuncN` callback function), Embree +-uses the `RTCHitN` type for hit packets. These hit packets can only +-have sizes of 1, 4, 8, or 16. No other packet size will be used. +- +-You can either implement different special code paths for each of these +-possible packet sizes and cast the hit to the appropriate hit packet +-type, or implement one general code path that uses the `RTCHitN_XXX` +-helper functions to access hit packet components. +- +-These helper functions get a pointer to the hit packet (`hit` +-argument), the packet size (`N` argument), and returns a reference to a +-component (e.g. x component of `Ng`) of the the i-th hit of the packet +-(`i` argument). +- +-#### EXIT STATUS {#exit-status} +- +-#### SEE ALSO {#see-also} +- +-[RTCRayN] +- +-```{=tex} +- +-``` +-RTCRayHitN +----------- +- +-#### NAME {#name} +- +- RTCRayHitN - combined ray/hit packet of runtime size +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- struct RTCRayHitN; +- +- struct RTCRayN* RTCRayHitN_RayN(struct RTCRayHitN* rayhit, unsigned int N); +- struct RTCHitN* RTCRayHitN_HitN(struct RTCRayHitN* rayhit, unsigned int N); +- +-#### DESCRIPTION {#description} +- +-When the packet size of a ray/hit structure is not known at compile +-time (e.g. when Embree returns a ray/hit packet in the +-`RTCIntersectFunctionN` callback function), Embree uses the +-`RTCRayHitN` type for ray packets. These ray/hit packets can only have +-sizes of 1, 4, 8, or 16. No other packet size will be used. +- +-You can either implement different special code paths for each of these +-possible packet sizes and cast the ray/hit to the appropriate ray/hit +-packet type, or extract the `RTCRayN` and `RTCHitN` components using +-the `rtcGetRayN` and `rtcGetHitN` helper functions and use the +-`RTCRayN_XXX` and `RTCHitN_XXX` functions to access the ray and hit +-parts of the structure. +- +-#### EXIT STATUS {#exit-status} +- +-#### SEE ALSO {#see-also} +- +-[RTCHitN] +- +-```{=tex} +- +-``` +-RTCFeatureFlags +---------------- +- +-#### NAME {#name} +- +- RTCFeatureFlags - specifies features to enable +- for ray queries +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- enum RTCFeatureFlags +- { +- RTC_FEATURE_FLAG_NONE = 0, +- +- RTC_FEATURE_FLAG_MOTION_BLUR = 1 << 0, +- +- RTC_FEATURE_FLAG_TRIANGLE = 1 << 1, +- RTC_FEATURE_FLAG_QUAD = 1 << 2, +- RTC_FEATURE_FLAG_GRID = 1 << 3, +- RTC_FEATURE_FLAG_SUBDIVISION = 1 << 4, +- RTC_FEATURE_FLAG_POINT = ... , +- RTC_FEATURE_FLAG_CURVES = ... , +- +- RTC_FEATURE_FLAG_CONE_LINEAR_CURVE = 1 << 5, +- RTC_FEATURE_FLAG_ROUND_LINEAR_CURVE = 1 << 6, +- RTC_FEATURE_FLAG_FLAT_LINEAR_CURVE = 1 << 7, +- +- RTC_FEATURE_FLAG_ROUND_BEZIER_CURVE = 1 << 8, +- RTC_FEATURE_FLAG_FLAT_BEZIER_CURVE = 1 << 9, +- RTC_FEATURE_FLAG_NORMAL_ORIENTED_BEZIER_CURVE = 1 << 10, +- +- RTC_FEATURE_FLAG_ROUND_BSPLINE_CURVE = 1 << 11, +- RTC_FEATURE_FLAG_FLAT_BSPLINE_CURVE = 1 << 12, +- RTC_FEATURE_FLAG_NORMAL_ORIENTED_BSPLINE_CURVE = 1 << 13, +- +- RTC_FEATURE_FLAG_ROUND_HERMITE_CURVE = 1 << 14, +- RTC_FEATURE_FLAG_FLAT_HERMITE_CURVE = 1 << 15, +- RTC_FEATURE_FLAG_NORMAL_ORIENTED_HERMITE_CURVE = 1 << 16, +- +- RTC_FEATURE_FLAG_ROUND_CATMULL_ROM_CURVE = 1 << 17, +- RTC_FEATURE_FLAG_FLAT_CATMULL_ROM_CURVE = 1 << 18, +- RTC_FEATURE_FLAG_NORMAL_ORIENTED_CATMULL_ROM_CURVE = 1 << 19, +- +- RTC_FEATURE_FLAG_SPHERE_POINT = 1 << 20, +- RTC_FEATURE_FLAG_DISC_POINT = 1 << 21, +- RTC_FEATURE_FLAG_ORIENTED_DISC_POINT = 1 << 22, +- +- RTC_FEATURE_FLAG_ROUND_CURVES = ... , +- RTC_FEATURE_FLAG_FLAT_CURVES = ... , +- RTC_FEATURE_FLAG_NORMAL_ORIENTED_CURVES = ... , +- +- RTC_FEATURE_FLAG_LINEAR_CURVES = ... , +- RTC_FEATURE_FLAG_BEZIER_CURVES = ... , +- RTC_FEATURE_FLAG_BSPLINE_CURVES = ... , +- RTC_FEATURE_FLAG_HERMITE_CURVES = ... , +- +- RTC_FEATURE_FLAG_INSTANCE = 1 << 23, +- +- RTC_FEATURE_FLAG_FILTER_FUNCTION_IN_ARGUMENTS = 1 << 24, +- RTC_FEATURE_FLAG_FILTER_FUNCTION_IN_GEOMETRY = 1 << 25, +- RTC_FEATURE_FLAG_FILTER_FUNCTION = ... , +- +- RTC_FEATURE_FLAG_USER_GEOMETRY_CALLBACK_IN_ARGUMENTS = 1 << 26, +- RTC_FEATURE_FLAG_USER_GEOMETRY_CALLBACK_IN_GEOMETRY = 1 << 27, +- RTC_FEATURE_FLAG_USER_GEOMETRY = ... , +- +- RTC_FEATURE_FLAG_32_BIT_RAY_MASK = 1 << 28, +- +- RTC_FEATURE_FLAG_ALL = 0xffffffff +- }; +- +-#### DESCRIPTION {#description} +- +-The `RTCFeatureFlags` enum specify a bit mask to enable specific ray +-tracing features for ray query operations. The feature flags are passed +-to the `rtcIntersect1/4/8/16` and `rtcOccluded1/4/8/16` functions +-through the `RTCIntersectArguments` and `RTCOccludedArguments` +-structures. Only a ray tracing feature whose bit is enabled in the +-feature mask can get used. If a feature bit is not set, the behaviour +-is undefined, thus the feature may work or not. To enable multiple +-features the respective features have to get combined using a bitwise +-`OR` operation. +- +-The purpose of feature flags is to reduce code size on the GPU by +-enabling just the features required to render the scene. On the CPU +-there is no need to use feature flags, and the default of all features +-enabled (`RTC_FEATURE_FLAG_ALL`) can just be kept. +- +-The following features can get enabled using feature flags: +- +-- RTC\_FEATURE\_FLAG\_MOTION\_BLUR: Enables motion blur for all +- geometry types. +- +-- RTC\_FEATURE\_FLAG\_TRIANGLE: Enables triangle geometries +- (RTC\_GEOMETRY\_TYPE\_TRIANGLE). +- +-- RTC\_FEATURE\_FLAG\_QUAD: Enables quad geometries +- (RTC\_GEOMETRY\_TYPE\_QUAD). +- +-- RTC\_FEATURE\_FLAG\_GRID: Enables grid geometries +- (RTC\_GEOMETRY\_TYPE\_GRID). +- +-- RTC\_FEATURE\_FLAG\_SUBDIVISION: Enables subdivision geometries +- (RTC\_GEOMETRY\_TYPE\_SUBDIVISION). +- +-- RTC\_FEATURE\_FLAG\_POINT: Enables all point geometry types +- (RTC\_GEOMETRY\_TYPE\_XXX\_POINT) +- +-- RTC\_FEATURE\_FLAG\_CURVES: Enables all curve geometry types +- (RTC\_GEOMETRY\_TYPE\_XXX\_YYY\_CURVE) +- +-- RTC\_FEATURE\_FLAG\_ROUND\_CURVES: Enables all round curves +- (RTC\_GEOMETRY\_TYPE\_ROUND\_XXX\_CURVE). +- +-- RTC\_FEATURE\_FLAG\_FLAT\_CURVES: Enables all flat curves +- (RTC\_GEOMETRY\_TYPE\_FLAT\_XXX\_CURVE). +- +-- RTC\_FEATURE\_FLAG\_NORMAL\_ORIENTED\_CURVES: Enables all normal +- oriented curves +- (RTC\_GEOMETRY\_TYPE\_NORMAL\_ORIENTED\_XXX\_CURVE). +- +-- RTC\_FEATURE\_FLAG\_LINEAR\_CURVES: Enables all linear curves +- (RTC\_GEOMETRY\_TYPE\_XXX\_LINEAR\_CURVE). +- +-- RTC\_FEATURE\_FLAG\_BEZIER\_CURVES: Enables all Bézier curves +- (RTC\_GEOMETRY\_TYPE\_XXX\_BEZIER\_CURVE). +- +-- RTC\_FEATURE\_FLAG\_BSPLINE\_CURVES: Enables all B-spline curves +- (RTC\_GEOMETRY\_TYPE\_XXX\_BSPLINE\_CURVE). +- +-- RTC\_FEATURE\_FLAG\_HERMITE\_CURVES: Enables all Hermite curves +- (RTC\_GEOMETRY\_TYPE\_XXX\_HERMITE\_CURVE). +- +-- RTC\_FEATURE\_FLAG\_CONE\_LINEAR\_CURVE: Enables cone geometry type +- (RTC\_GEOMETRY\_TYPE\_CONE\_LINEAR\_CURVE). +- +-- RTC\_FEATURE\_FLAG\_ROUND\_LINEAR\_CURVE: Enables round linear +- curves (RTC\_GEOMETRY\_TYPE\_ROUND\_LINEAR\_CURVE). +- +-- RTC\_FEATURE\_FLAG\_FLAT\_LINEAR\_CURVE: Enables flat linear curves +- (RTC\_GEOMETRY\_TYPE\_FLAT\_LINEAR\_CURVE). +- +-- RTC\_FEATURE\_FLAG\_ROUND\_BEZIER\_CURVE: Enables round Bézier +- curves (RTC\_GEOMETRY\_TYPE\_ROUND\_BEZIER\_CURVE). +- +-- RTC\_FEATURE\_FLAG\_FLAT\_BEZIER\_CURVE: Enables flat Bézier curves +- (RTC\_GEOMETRY\_TYPE\_FLAT\_BEZIER\_CURVE). +- +-- RTC\_FEATURE\_FLAG\_NORMAL\_ORIENTED\_BEZIER\_CURVE: Enables normal +- oriented Bézier curves +- (RTC\_GEOMETRY\_TYPE\_NORMAL\_ORIENTED\_BEZIER\_CURVE). +- +-- RTC\_FEATURE\_FLAG\_ROUND\_BSPLINE\_CURVE: Enables round B-spline +- curves (RTC\_GEOMETRY\_TYPE\_ROUND\_BSPLINE\_CURVE). +- +-- RTC\_FEATURE\_FLAG\_FLAT\_BSPLINE\_CURVE: Enables flat B-spline +- curves (RTC\_GEOMETRY\_TYPE\_FLAT\_BSPLINE\_CURVE). +- +-- RTC\_FEATURE\_FLAG\_NORMAL\_ORIENTED\_BSPLINE\_CURVE: Enables +- normal oriented B-spline curves +- (RTC\_GEOMETRY\_TYPE\_NORMAL\_ORIENTED\_BSPLINE\_CURVE). +- +-- RTC\_FEATURE\_FLAG\_ROUND\_HERMITE\_CURVE: Enables round Hermite +- curves (RTC\_GEOMETRY\_TYPE\_ROUND\_HERMITE\_CURVE). +- +-- RTC\_FEATURE\_FLAG\_FLAT\_HERMITE\_CURVE: Enables flat Hermite +- curves (RTC\_GEOMETRY\_TYPE\_FLAT\_HERMITE\_CURVE). +- +-- RTC\_FEATURE\_FLAG\_NORMAL\_ORIENTED\_HERMITE\_CURVE: Enables +- normal oriented Hermite curves +- (RTC\_GEOMETRY\_TYPE\_NORMAL\_ORIENTED\_HERMITE\_CURVE). +- +-- RTC\_FEATURE\_FLAG\_ROUND\_CATMULL\_ROM\_CURVE: Enables round +- Catmull Rom curves +- (RTC\_GEOMETRY\_TYPE\_ROUND\_CATMULL\_ROM\_CURVE). +- +-- RTC\_FEATURE\_FLAG\_FLAT\_CATMULL\_ROM\_CURVE: Enables flat Catmull +- Rom curves (RTC\_GEOMETRY\_TYPE\_FLAT\_CATMULL\_ROM\_CURVE). +- +-- RTC\_FEATURE\_FLAG\_NORMAL\_ORIENTED\_CATMULL\_ROM\_CURVE: Enables +- normal oriented Catmull Rom curves +- (RTC\_GEOMETRY\_TYPE\_NORMAL\_ORIENTED\_CATMULL\_ROM\_CURVE). +- +-- RTC\_FEATURE\_FLAG\_SPHERE\_POINT: Enables sphere geometry type +- (RTC\_GEOMETRY\_TYPE\_SPHERE\_POINT). +- +-- RTC\_FEATURE\_FLAG\_DISC\_POINT: Enables disc geometry type +- (RTC\_GEOMETRY\_TYPE\_DISC\_POINT). +- +-- RTC\_FEATURE\_FLAG\_ORIENTED\_DISC\_POINT: Enables oriented disc +- geometry types (RTC\_GEOMETRY\_TYPE\_ORIENTED\_DISC\_POINT). +- +-- RTC\_FEATURE\_FLAG\_INSTANCE: Enables instance geometries +- (RTC\_GEOMETRY\_TYPE\_INSTANCE). +- +-- RTC\_FEATURE\_FLAG\_FILTER\_FUNCTION\_IN\_ARGUMENTS: Enables filter +- functions passed through intersect arguments. +- +-- RTC\_FEATURE\_FLAG\_FILTER\_FUNCTION\_IN\_GEOMETRY: Enable filter +- functions passed through geometry. +- +-- RTC\_FEATURE\_FLAG\_FILTER\_FUNCTION: Enables filter functions +- (argument and geometry version). +- +-- RTC\_FEATURE\_FLAG\_USER\_GEOMETRY\_CALLBACK\_IN\_ARGUMENTS: +- Enables RTC\_GEOMETRY\_TYPE\_USER with function pointer passed +- through intersect arguments. +- +-- RTC\_FEATURE\_FLAG\_USER\_GEOMETRY\_CALLBACK\_IN\_GEOMETRY: Enables +- RTC\_GEOMETRY\_TYPE\_USER with function pointer passed through +- geometry object. +- +-- RTC\_FEATURE\_FLAG\_USER\_GEOMETRY: Enables +- RTC\_GEOMETRY\_TYPE\_USER geometries (both argument and geometry +- callback versions). +- +-- RTC\_FEATURE\_FLAG\_32\_BIT\_RAY\_MASK: Enables full 32 bit ray +- masks. If not used, only the lower 7 bits in the ray mask are +- handled correctly. +- +-- RTC\_FEATURE\_FLAG\_ALL: Enables all features (default). +- +-#### EXIT STATUS {#exit-status} +- +-#### SEE ALSO {#see-also} +- +-[rtcIntersect1], [rtcIntersect4/8/16], [rtcOccluded1], +-[rtcOccluded4/8/16], +- +-```{=tex} +- +-``` +-rtcInitIntersectArguments +-------------------------- +- +-#### NAME {#name} +- +- rtcInitIntersectArguments - initializes the intersect arguments struct +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- enum RTCRayQueryFlags +- { +- RTC_RAY_QUERY_FLAG_NONE, +- RTC_RAY_QUERY_FLAG_INCOHERENT, +- RTC_RAY_QUERY_FLAG_COHERENT, +- RTC_RAY_QUERY_FLAG_INVOKE_ARGUMENT_FILTER +- }; +- +- struct RTCIntersectArguments +- { +- enum RTCRayQueryFlags flags; +- enum RTCFeatureFlags feature_mask; +- struct RTCRayQueryContext* context; +- RTCFilterFunctionN filter; +- RTCIntersectFunctionN intersect; +- #if RTC_MIN_WIDTH +- float minWidthDistanceFactor; +- #endif +- }; +- +- void rtcInitIntersectArguments( +- struct RTCIntersectArguments* args +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcInitIntersectArguments` function initializes the optional +-argument struct that can get passed to the `rtcIntersect1/4/8/16` +-functions to default values. The arguments struct needs to get used for +-more advanced Embree features as described here. +- +-The `flags` member can get used to enable special traversal mode. Using +-the `RTC_RAY_QUERY_FLAG_INCOHERENT` flag uses an optimized traversal +-algorithm for incoherent rays (default), while +-`RTC_RAY_QUERY_FLAG_COHERENT` uses an optimized traversal algorithm for +-coherent rays (e.g. primary camera rays). +- +-The `feature_mask` member should get used in SYCL to just enable ray +-tracing features required to render a given scene. Please see section +-[RTCFeatureFlags] for a more detailed description. +- +-The `context` member can get used to pass an optional intersection +-context. It is guaranteed that the pointer to the context passed to a +-ray query is directly passed to all callback functions. This way it is +-possible to attach arbitrary data to the end of the context, such as a +-per-ray payload. Please note that the ray pointer is not guaranteed to +-be passed to the callback functions, thus reading additional data from +-the ray pointer passed to callbacks is not possible. See section +-[rtcInitRayQueryContext] for more details. +- +-The `filter` member specifies a filter function to invoke for each +-encountered hit. The support for the argument filter function must be +-enabled for a scene by using the +-`RTC_SCENE_FLAG_FILTER_FUNCTION_IN_ARGUMENTS` scene flag. In case of +-instancing this feature has to get enabled also for each instantiated +-scene. +- +-The argument filter function is invoked for each geometry for which it +-got explicitely enabled using the +-`rtcSetGeometryEnableFilterFunctionFromArguments` function. The +-invokation of the argument filter function can also get enfored for +-each geometry using the `RTC_RAY_QUERY_FLAG_INVOKE_ARGUMENT_FILTER` ray +-query flag. This argument filter function is invoked as a second filter +-stage after the per-geometry filter function is invoked. Only rays that +-passed the first filter stage are valid in this second filter stage. +-Having such a per ray-query filter function can be useful to implement +-modifications of the behavior of the query, such as collecting all hits +-or accumulating transparencies. +- +-The `intersect` member specifies the user geometry callback to get +-invoked for each user geometry encountered during traversal. The user +-geometry callback specified this way has preference over the one +-specified inside the geometry. +- +-The `minWidthDistanceFactor` value controls the target size of the +-curve radii when the min-width feature is enabled. Please see the +-[rtcSetGeometryMaxRadiusScale] function for more details on the +-min-width feature. +- +-#### EXIT STATUS {#exit-status} +- +-No error code is set by this function. +- +-#### SEE ALSO {#see-also} +- +-[rtcIntersect1], [rtcIntersect4/8/16], [RTCFeatureFlags], +-[rtcInitRayQueryContext], [RTC\_GEOMETRY\_TYPE\_USER], +-[rtcSetGeometryMaxRadiusScale] +- +-```{=tex} +- +-``` +-rtcInitOccludedArguments +------------------------- +- +-#### NAME {#name} +- +- rtcInitOccludedArguments - initializes the occluded arguments struct +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- enum RTCRayQueryFlags +- { +- RTC_RAY_QUERY_FLAG_NONE, +- RTC_RAY_QUERY_FLAG_INCOHERENT, +- RTC_RAY_QUERY_FLAG_COHERENT, +- RTC_RAY_QUERY_FLAG_INVOKE_ARGUMENT_FILTER +- }; +- +- struct RTCOccludedArguments +- { +- enum RTCRayQueryFlags flags; +- enum RTCFeatureFlags feature_mask; +- struct RTCRayQueryContext* context; +- RTCFilterFunctionN filter; +- RTCOccludedFunctionN intersect; +- #if RTC_MIN_WIDTH +- float minWidthDistanceFactor; +- #endif +- }; +- +- void rtcInitOccludedArguments( +- struct RTCOccludedArguments* args +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcInitOccludedArguments` function initializes the optional +-argument struct that can get passed to the `rtcOccluded1/4/8/16` +-functions to default values. The arguments struct needs to get used for +-more advanced Embree features as described here. +- +-The `flags` member can get used to enable special traversal mode. Using +-the `RTC_RAY_QUERY_FLAG_INCOHERENT` flag uses an optimized traversal +-algorithm for incoherent rays (default), while +-`RTC_RAY_QUERY_FLAG_COHERENT` uses an optimized traversal algorithm for +-coherent rays (e.g. primary camera rays). +- +-The `feature_mask` member should get used in SYCL to just enable ray +-tracing features required to render a given scene. Please see section +-[RTCFeatureFlags] for a more detailed description. +- +-The `context` member can get used to pass an optional intersection +-context. It is guaranteed that the pointer to the context passed to a +-ray query is directly passed to all callback functions. This way it is +-possible to attach arbitrary data to the end of the context, such as a +-per-ray payload. Please note that the ray pointer is not guaranteed to +-be passed to the callback functions, thus reading additional data from +-the ray pointer passed to callbacks is not possible. See section +-[rtcInitRayQueryContext] for more details. +- +-The `filter` member specifies a filter function to invoked for each +-encountered hit. The support for the argument filter function must be +-enabled for a scene by using the +-`RTC_SCENE_FLAG_FILTER_FUNCTION_IN_ARGUMENTS` scene flag. In case of +-instancing this feature has to get enabled also for each instantiated +-scene. +- +-The argument filter function is invoked for each geometry for which it +-got explicitely enabled using the +-`rtcSetGeometryEnableFilterFunctionFromArguments` function. The +-invokation of the argument filter function can also get enfored for +-each geometry using the `RTC_RAY_QUERY_FLAG_INVOKE_ARGUMENT_FILTER` ray +-query flag. This argument filter function is invoked as a second filter +-stage after the per-geometry filter function is invoked. Only rays that +-passed the first filter stage are valid in this second filter stage. +-Having such a per ray-query filter function can be useful to implement +-modifications of the behavior of the query, such as collecting all hits +-or accumulating transparencies. +- +-The `intersect` member specifies the user geometry callback to get +-invoked for each user geometry encountered during traversal. The user +-geometry callback specified this way has preference over the one +-specified inside the geometry. +- +-The `minWidthDistanceFactor` value controls the target size of the +-curve radii when the min-width feature is enabled. Please see the +-[rtcSetGeometryMaxRadiusScale] function for more details on the +-min-width feature. +- +-#### EXIT STATUS {#exit-status} +- +-No error code is set by this function. +- +-#### SEE ALSO {#see-also} +- +-[rtcOccluded1], [rtcOccluded4/8/16], [RTCFeatureFlags], +-[rtcInitRayQueryContext], [RTC\_GEOMETRY\_TYPE\_USER], +-[rtcSetGeometryMaxRadiusScale] +- +-```{=tex} +- +-``` +-rtcInitRayQueryContext +----------------------- +- +-#### NAME {#name} +- +- rtcInitRayQueryContext - initializes the ray query context +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- struct RTCRayQueryContext +- { +- #if RTC_MAX_INSTANCE_LEVEL_COUNT > 1 +- unsigned int instStackSize; +- #endif +- +- unsigned int instID[RTC_MAX_INSTANCE_LEVEL_COUNT]; +- }; +- +- void rtcInitRayQueryContext( +- struct RTCRayQueryContext* context +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcInitRayQueryContext` function initializes the intersection +-context to default values and should be called to initialize every ray +-query context. +- +-It is guaranteed that the pointer to the ray query context +-(`RTCRayQueryContext` type) is passed to the registered callback +-functions. This way it is possible to attach arbitrary data to the end +-of the ray query context, such as a per-ray payload. +- +-Inside the user geometry callback the ray query context can get used to +-access the `instID` stack to know which instance the user geometry +-object resides. +- +-If not ray query context is specified when tracing a ray, a default +-context is used. +- +-#### EXIT STATUS {#exit-status} +- +-No error code is set by this function. +- +-#### SEE ALSO {#see-also} +- +-[rtcIntersect1], [rtcIntersect4/8/16], [rtcOccluded1], +-[rtcOccluded4/8/16] +- +-```{=tex} +- +-``` +-rtcIntersect1 +-------------- +- +-#### NAME {#name} +- +- rtcIntersect1 - finds the closest hit for a single ray +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcIntersect1( +- RTCScene scene, +- struct RTCRayHit* rayhit +- struct RTCIntersectArguments* args = NULL +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcIntersect1` function finds the closest hit of a single ray +-(`rayhit` argument) with the scene (`scene` argument). The provided +-ray/hit structure contains the ray to intersect and some hit output +-fields that are filled when a hit is found. The passed optional +-arguments struct (`args` argument) can get used for advanced use cases, +-see section [rtcInitIntersectArguments] for more details. +- +-To trace a ray, the user has to initialize the ray origin (`org` ray +-member), ray direction (`dir` ray member), ray segment (`tnear`, `tfar` +-ray members), ray mask (`mask` ray member), and set the ray flags to +-`0` (`flags` ray member). The ray time (`time` ray member) must be +-initialized to a value in the range \$[0, 1]. The ray segment has to +-be in the range $[0, \infty]$, thus ranges that start behind the ray +-origin are not valid, but ranges can reach to infinity. See Section +-[RTCRay] for the ray layout description. +- +-The geometry ID (`geomID` hit member) of the hit data must be +-initialized to `RTC_INVALID_GEOMETRY_ID` (-1). +- +-When no intersection is found, the ray/hit data is not updated. When an +-intersection is found, the hit distance is written into the `tfar` +-member of the ray and all hit data is set, such as unnormalized +-geometry normal in object space (`Ng` hit member), local hit +-coordinates (`u`, `v` hit member), instance ID stack (`instID` hit +-member), geometry ID (`geomID` hit member), and primitive ID (`primID` +-hit member). See Section [RTCHit] for the hit layout description. +- +-If the instance ID stack has a prefix of values not equal to +-`RTC_INVALID_GEOMETRY_ID`, the instance ID on each level corresponds to +-the geometry ID of the hit instance of the higher-level scene, the +-geometry ID corresponds to the hit geometry inside the hit instanced +-scene, and the primitive ID corresponds to the n-th primitive of that +-geometry. +- +-If level 0 of the instance ID stack is equal to +-`RTC_INVALID_GEOMETRY_ID`, the geometry ID corresponds to the hit +-geometry inside the top-level scene, and the primitive ID corresponds +-to the n-th primitive of that geometry. +- +-The implementation makes no guarantees that primitives whose hit +-distance is exactly at (or very close to) `tnear` or `tfar` are hit or +-missed. If you want to exclude intersections at `tnear` just pass a +-slightly enlarged `tnear`, and if you want to include intersections at +-`tfar` pass a slightly enlarged `tfar`. +- +-The ray pointer passed to callback functions is not guaranteed to be +-identical to the original ray provided. To extend the ray with +-additional data to be accessed in callback functions, use the ray query +-context. See section [rtcInitRayQueryContext] for more details. +- +-The ray/hit structure must be aligned to 16 bytes. +- +-#### EXIT STATUS {#exit-status} +- +-For performance reasons this function does not do any error checks, +-thus will not set any error flags on failure. +- +-#### SEE ALSO {#see-also} +- +-[rtcOccluded1], [rtcIntersect4/8/16], [RTCRayHit], +-[rtcInitIntersectArguments] +- +-```{=tex} +- +-``` +-rtcOccluded1 +------------- +- +-#### NAME {#name} +- +- rtcOccluded1 - finds any hit for a single ray +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcOccluded1( +- RTCScene scene, +- struct RTCRay* ray, +- struct RTCOccludedArguments* args = NULL +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcOccluded1` function checks for a single ray (`ray` argument) +-whether there is any hit with the scene (`scene` argument). The passed +-optional arguments struct (`args` argument) can get used for advanced +-use cases, see section [rtcInitOccludedArguments] for more details. +- +-To trace a ray, the user must initialize the ray origin (`org` ray +-member), ray direction (`dir` ray member), ray segment (`tnear`, `tfar` +-ray members), ray mask (`mask` ray member), and must set the ray flags +-to `0` (`flags` ray member). The ray time (`time` ray member) must be +-initialized to a value in the range $[0, 1]$. The ray segment must be +-in the range $[0, \infty]$, thus ranges that start behind the ray +-origin are not valid, but ranges can reach to infinity. See Section +-[RTCRay] for the ray layout description. +- +-When no intersection is found, the ray data is not updated. In case a +-hit was found, the `tfar` component of the ray is set to `-inf`. +- +-The implementation makes no guarantees that primitives whose hit +-distance is exactly at (or very close to) `tnear` or `tfar` are hit or +-missed. If you want to exclude intersections at `tnear` just pass a +-slightly enlarged `tnear`, and if you want to include intersections at +-`tfar` pass a slightly enlarged `tfar`. +- +-The ray pointer passed to callback functions is not guaranteed to be +-identical to the original ray provided. To extend the ray with +-additional data to be accessed in callback functions, use the ray query +-context. See section [rtcInitRayQueryContext] for more details. +- +-The ray must be aligned to 16 bytes. +- +-#### EXIT STATUS {#exit-status} +- +-For performance reasons this function does not do any error checks, +-thus will not set any error flags on failure. +- +-#### SEE ALSO {#see-also} +- +-[rtcIntersect1], [rtcOccluded4/8/16], [RTCRay], +-[rtcInitOccludedArguments] +- +-```{=tex} +- +-``` +-rtcIntersect4/8/16 +------------------- +- +-#### NAME {#name} +- +- rtcIntersect4/8/16 - finds the closest hits for a ray packet +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcIntersect4( +- const int* valid, +- RTCScene scene, +- struct RTCRayHit4* rayhit, +- struct RTCIntersectArguments* args = NULL +- ); +- +- void rtcIntersect8( +- const int* valid, +- RTCScene scene, +- struct RTCRayHit8* rayhit, +- struct RTCIntersectArguments* args = NULL +- ); +- +- void rtcIntersect16( +- const int* valid, +- RTCScene scene, +- struct RTCRayHit16* rayhit, +- struct RTCIntersectArguments* args = NULL +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcIntersect4/8/16` functions finds the closest hits for a ray +-packet of size 4, 8, or 16 (`rayhit` argument) with the scene (`scene` +-argument). The ray/hit input contains a ray packet and hit packet. The +-passed optional arguments struct (`args` argument) are used to pass +-additional arguments for advanced features. See Section +-[rtcIntersect1] for more details and a description of how to set up +-and trace rays. +- +-A ray valid mask must be provided (`valid` argument) which stores one +-32-bit integer (`-1` means valid and `0` invalid) per ray in the +-packet. Only active rays are processed, and hit data of inactive rays +-is not changed. +- +-The ray pointer passed to callback functions is not guaranteed to be +-identical to the original ray provided. To extend the ray with +-additional data to be accessed in callback functions, use the ray query +-context. See section [rtcInitRayQueryContext] for more details. +- +-For `rtcIntersect4` the ray packet must be aligned to 16 bytes, for +-`rtcIntersect8` the alignment must be 32 bytes, and for +-`rtcIntersect16` the alignment must be 64 bytes. +- +-The `rtcIntersect4`, `rtcIntersect8` and `rtcIntersect16` functions may +-change the ray packet size and ray order when calling back into filter +-functions or user geometry callbacks. Under some conditions the +-application can assume packets to stay intakt, which can determined by +-querying the `RTC_DEVICE_PROPERTY_NATIVE_RAY4_SUPPORTED`, +-`RTC_DEVICE_PROPERTY_NATIVE_RAY8_SUPPORTED`, +-`RTC_DEVICE_PROPERTY_NATIVE_RAY16_SUPPORTED` properties through the +-`rtcGetDeviceProperty` function. See [rtcGetDeviceProperty] for more +-information. +- +-#### EXIT STATUS {#exit-status} +- +-For performance reasons this function does not do any error checks, +-thus will not set any error flags on failure. +- +-#### SEE ALSO {#see-also} +- +-[rtcIntersect1], [rtcOccluded4/8/16], [rtcInitIntersectArguments] +- +-```{=tex} +- +-``` +-rtcOccluded4/8/16 +------------------ +- +-#### NAME {#name} +- +- rtcOccluded4/8/16 - finds any hits for a ray packet +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcOccluded4( +- const int* valid, +- RTCScene scene, +- struct RTCRay4* ray, +- struct RTCOccludedArguments* args = NULL +- ); +- +- void rtcOccluded8( +- const int* valid, +- RTCScene scene, +- struct RTCRay8* ray, +- struct RTCOccludedArguments* args = NULL +- ); +- +- void rtcOccluded16( +- const int* valid, +- RTCScene scene, +- struct RTCRay16* ray, +- struct RTCOccludedArguments* args = NULL +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcOccluded4/8/16` functions checks for each active ray of the ray +-packet of size 4, 8, or 16 (`ray` argument) whether there is any hit +-with the scene (`scene` argument). The passed optional arguments struct +-(`args` argument) can get used for advanced use cases, see section +-[rtcInitOccludedArguments] for more details. See Section +-[rtcOccluded1] for more details and a description of how to set up +-and trace occlusion rays. +- +-A ray valid mask must be provided (`valid` argument) which stores one +-32-bit integer (`-1` means valid and `0` invalid) per ray in the +-packet. Only active rays are processed, and hit data of inactive rays +-is not changed. +- +-The ray pointer passed to callback functions is not guaranteed to be +-identical to the original ray provided. To extend the ray with +-additional data to be accessed in callback functions, use the ray query +-context. See section [rtcInitRayQueryContext] for more details. +- +-For `rtcOccluded4` the ray packet must be aligned to 16 bytes, for +-`rtcOccluded8` the alignment must be 32 bytes, and for `rtcOccluded16` +-the alignment must be 64 bytes. +- +-The `rtcOccluded4`, `rtcOccluded8` and `rtcOccluded16` functions may +-change the ray packet size and ray order when calling back into +-intersect filter functions or user geometry callbacks. Under some +-conditions the application can assume packets to stay intakt, which can +-determined by querying the `RTC_DEVICE_PROPERTY_NATIVE_RAY4_SUPPORTED`, +-`RTC_DEVICE_PROPERTY_NATIVE_RAY8_SUPPORTED`, +-`RTC_DEVICE_PROPERTY_NATIVE_RAY16_SUPPORTED` properties through the +-`rtcGetDeviceProperty` function. See [rtcGetDeviceProperty] for more +-information. +- +-#### EXIT STATUS {#exit-status} +- +-For performance reasons this function does not do any error checks, +-thus will not set any error flags on failure. +- +-#### SEE ALSO {#see-also} +- +-[rtcOccluded1], [rtcIntersect4/8/16], [rtcInitOccludedArguments] +- +-```{=tex} +- +-``` +-rtcForwardIntersect1 +--------------------- +- +-#### NAME {#name} +- +- rtcForwardIntersect1/Ex - forwards a single ray to new scene +- from user geometry callback +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcForwardIntersect1( +- const struct RTCIntersectFunctionNArguments* args, +- RTCScene scene, +- struct RTCRay* ray, +- unsigned int instID +- ); +- +- void rtcForwardIntersect1Ex( +- const struct RTCIntersectFunctionNArguments* args, +- RTCScene scene, +- struct RTCRay* ray, +- unsigned int instID, +- unsigned int instPrimID, +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcForwardIntersect1` and `rtcForwardIntersect1Ex` functions +-forward the traversal of a transformed ray (`ray` argument) into a +-scene (`scene` argument) from a user geometry callback. The function +-can only get invoked from a user geometry callback for a ray traversal +-initiated with the `rtcIntersect1` function. The callback arguments +-structure of the callback invokation has to get passed to the ray +-forwarding (`args` argument). The user geometry callback should +-instantly terminate after invoking the `rtcForwardIntersect1/Ex` +-function. +- +-Only the ray origin and ray direction members of the ray argument are +-used for forwarding, all additional ray properties are inherited from +-the initial ray traversal invokation of `rtcIntersect1`. +- +-The implementation of the `rtcForwardIntersect1` function recursively +-continues the ray traversal into the specified scene and pushes the +-provided instance ID (`instID` argument) to the instance ID stack. Hit +-information is updated into the ray hit structure passed to the +-original `rtcIntersect1` invokation. +- +-This function can get used to implement user defined instancing using +-user geometries, e.g. by transforming the ray in a special way, and/or +-selecting between different scenes to instantiate. +- +-For user defined instance arrays, the `rtcForwardIntersect1Ex` variant +-has an additional `instPrimID` argument which is pushed to the instance +-primitive ID stack. Instance primitive IDs identify which instance of +-an instance array was hit. +- +-When using Embree on the CPU it is possible to recursively invoke +-`rtcIntersect1` directly from a user geometry callback. However, when +-SYCL is used, recursively tracing rays is not directly supported, and +-the `rtcForwardIntersect1/Ex` functions must be used. +- +-The ray structure must be aligned to 16 bytes. +- +-#### EXIT STATUS {#exit-status} +- +-For performance reasons this function does not do any error checks, +-thus will not set any error flags on failure. +- +-#### SEE ALSO {#see-also} +- +-[rtcIntersect1], [RTCRay] +- +-```{=tex} +- +-``` +-rtcForwardOccluded1 +-------------------- +- +-#### NAME {#name} +- +- rtcForwardOccluded1/Ex - forwards a single ray to new scene +- from user geometry callback +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcForwardOccluded1( +- const struct RTCOccludedFunctionNArguments* args, +- RTCScene scene, +- struct RTCRay* ray, +- unsigned int instID +- ); +- +- void rtcForwardOccluded1( +- const struct RTCOccludedFunctionNArguments* args, +- RTCScene scene, +- struct RTCRay* ray, +- unsigned int instID, +- unsigned int instPrimID +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcForwardOccluded1` and `rtcForwardOccluded1Ex` functions forward +-the traversal of a transformed ray (`ray` argument) into a scene +-(`scene` argument) from a user geometry callback. The function can only +-get invoked from a user geometry callback for a ray traversal initiated +-with the `rtcOccluded1` function. The callback arguments structure of +-the callback invokation has to get passed to the ray forwarding (`args` +-argument). The user geometry callback should instantly terminate after +-invoking the `rtcForwardOccluded1/Ex` function. +- +-Only the ray origin and ray direction members of the ray argument are +-used for forwarding, all additional ray properties are inherited from +-the initial ray traversal invokation of `rtcOccluded1`. +- +-The implementation of the `rtcForwardOccluded1` function recursively +-continues the ray traversal into the specified scene and pushes the +-provided instance ID (`instID` argument) to the instance ID stack. Hit +-information is updated into the ray structure passed to the original +-`rtcOccluded1` invokation. +- +-This function can get used to implement user defined instancing using +-user geometries, e.g. by transforming the ray in a special way, and/or +-selecting between different scenes to instantiate. +- +-For user defined instance arrays, the `rtcForwardIntersect1Ex` variant +-has an additional `instPrimID` argument which is pushed to the instance +-primitive ID stack. Instance primitive IDs identify which instance of +-an instance array was hit. +- +-When using Embree on the CPU it is possible to recursively invoke +-`rtcOccluded1` directly from a user geometry callback. However, when +-SYCL is used, recursively tracing rays is not directly supported, and +-the `rtcForwardOccluded1/Ex` function must be used. +- +-The ray structure must be aligned to 16 bytes. +- +-#### EXIT STATUS {#exit-status} +- +-For performance reasons this function does not do any error checks, +-thus will not set any error flags on failure. +- +-#### SEE ALSO {#see-also} +- +-[rtcOccluded1], [RTCRay] +- +-```{=tex} +- +-``` +-rtcForwardIntersect4/8/16 +-------------------------- +- +-#### NAME {#name} +- +- rtcForwardIntersect4/8/16/Ex - forwards a ray packet to new scene +- from user geometry callback +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcForwardIntersect4( +- void int* valid, +- const struct RTCIntersectFunctionNArguments* args, +- RTCScene scene, +- struct RTCRay4* ray, +- unsigned int instID +- ); +- +- void rtcForwardIntersect8( +- void int* valid, +- const struct RTCIntersectFunctionNArguments* args, +- RTCScene scene, +- struct RTCRay8* ray, +- unsigned int instID +- ); +- +- void rtcForwardIntersect16( +- void int* valid, +- const struct RTCIntersectFunctionNArguments* args, +- RTCScene scene, +- struct RTCRay16* ray, +- unsigned int instID, +- unsigned int instPrimID +- ); +- +- void rtcForwardIntersect4Ex( +- void int* valid, +- const struct RTCIntersectFunctionNArguments* args, +- RTCScene scene, +- struct RTCRay4* ray, +- unsigned int instID, +- unsigned int instPrimID +- ); +- +- void rtcForwardIntersect8Ex( +- void int* valid, +- const struct RTCIntersectFunctionNArguments* args, +- RTCScene scene, +- struct RTCRay8* ray, +- unsigned int instID, +- unsigned int instPrimID +- ); +- +- void rtcForwardIntersect16Ex( +- void int* valid, +- const struct RTCIntersectFunctionNArguments* args, +- RTCScene scene, +- struct RTCRay16* ray, +- unsigned int instID, +- unsigned int instPrimID +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcForwardIntersect4/8/16` and `rtcForwardIntersect4/8/16Ex` +-functions forward the traversal of a transformed ray packet (`ray` +-argument) into a scene (`scene` argument) from a user geometry +-callback. The function can only get invoked from a user geometry +-callback for a ray traversal initiated with the `rtcIntersect4/8/16` +-function. The callback arguments structure of the callback invokation +-has to get passed to the ray forwarding (`args` argument). The user +-geometry callback should instantly terminate after invoking the +-`rtcForwardIntersect4/8/16/Ex` function. +- +-Only the ray origin and ray direction members of the ray argument are +-used for forwarding, all additional ray properties are inherited from +-the initial ray traversal invokation of `rtcIntersect4/8/16`. +- +-The implementation of the `rtcForwardIntersect4/8/16` function +-recursively continues the ray traversal into the specified scene and +-pushes the provided instance ID (`instID` argument) to the instance ID +-stack. Hit information is updated into the ray hit structure passed to +-the original `rtcIntersect4/8/16` invokation. +- +-This function can get used to implement user defined instancing using +-user geometries, e.g. by transforming the ray in a special way, and/or +-selecting between different scenes to instantiate. +- +-For user defined instance arrays, the `rtcForwardIntersect4/8/16Ex` +-variant has an additional `instPrimID` argument which is pushed to the +-instance primitive ID stack. Instance primitive IDs identify which +-instance of an instance array was hit. +- +-When using Embree on the CPU it is possible to recursively invoke +-`rtcIntersect4/8/16` directly from a user geometry callback. However, +-when SYCL is used, recursively tracing rays is not directly supported, +-and the `rtcForwardIntersect4/8/16` function must be used. +- +-For `rtcForwardIntersect4` the ray packet must be aligned to 16 bytes, +-for `rtcForwardIntersect8` the alignment must be 32 bytes, and for +-`rtcForwardIntersect16` the alignment must be 64 bytes. +- +-#### EXIT STATUS {#exit-status} +- +-For performance reasons this function does not do any error checks, +-thus will not set any error flags on failure. +- +-#### SEE ALSO {#see-also} +- +-[rtcIntersect4/8/16] +- +-```{=tex} +- +-``` +-rtcForwardOccluded4/8/16 +------------------------- +- +-#### NAME {#name} +- +- rtcForwardOccluded4/8/16/Ex - forwards a ray packet to new scene +- from user geometry callback +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcForwardOccluded4( +- void int* valid, +- const struct RTCOccludedFunctionNArguments* args, +- RTCScene scene, +- struct RTCRay4* ray, +- unsigned int instID +- ); +- +- void rtcForwardOccluded8( +- void int* valid, +- const struct RTCOccludedFunctionNArguments* args, +- RTCScene scene, +- struct RTCRay8* ray, +- unsigned int instID +- ); +- +- void rtcForwardOccluded16( +- void int* valid, +- const struct RTCOccludedFunctionNArguments* args, +- RTCScene scene, +- struct RTCRay16* ray, +- unsigned int instID +- ); +- +- void rtcForwardOccluded4Ex( +- void int* valid, +- const struct RTCOccludedFunctionNArguments* args, +- RTCScene scene, +- struct RTCRay4* ray, +- unsigned int instID, +- unsigned int instPrimID +- ); +- +- void rtcForwardOccluded8Ex( +- void int* valid, +- const struct RTCOccludedFunctionNArguments* args, +- RTCScene scene, +- struct RTCRay8* ray, +- unsigned int instID, +- unsigned int instPrimID +- ); +- +- void rtcForwardOccluded16Ex( +- void int* valid, +- const struct RTCOccludedFunctionNArguments* args, +- RTCScene scene, +- struct RTCRay16* ray, +- unsigned int instID, +- unsigned int instPrimID +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcForwardOccluded4/8/16` and `rtcForwardOccluded4/8/16Ex` +-functions forward the traversal of a transformed ray packet (`ray` +-argument) into a scene (`scene` argument) from a user geometry +-callback. The function can only get invoked from a user geometry +-callback for a ray traversal initiated with the `rtcOccluded4/8/16` +-function. The callback arguments structure of the callback invokation +-has to get passed to the ray forwarding (`args` argument). The user +-geometry callback should instantly terminate after invoking the +-`rtcForwardOccluded4/8/16/Ex` function. +- +-Only the ray origin and ray direction members of the ray argument are +-used for forwarding, all additional ray properties are inherited from +-the initial ray traversal invokation of `rtcOccluded4/8/16`. +- +-The implementation of the `rtcForwardOccluded4/8/16` function +-recursively continues the ray traversal into the specified scene and +-pushes the provided instance ID (`instID` argument) to the instance ID +-stack. Hit information is updated into the ray structure passed to the +-original `rtcOccluded4/8/16` invokation. +- +-This function can get used to implement user defined instancing using +-user geometries, e.g. by transforming the ray in a special way, and/or +-selecting between different scenes to instantiate. +- +-For user defined instance arrays, the `rtcForwardIntersect4/8/16Ex` +-variant has an additional `instPrimID` argument which is pushed to the +-instance primitive ID stack. Instance primitive IDs identify which +-instance of an instance array was hit. +- +-When using Embree on the CPU it is possible to recursively invoke +-`rtcOccluded4/8/16` directly from a user geometry callback. However, +-when SYCL is used, recursively tracing rays is not directly supported, +-and the `rtcForwardOccluded4/8/16` function must be used. +- +-For `rtcForwardOccluded4` the ray packet must be aligned to 16 bytes, +-for `rtcForwardOccluded8` the alignment must be 32 bytes, and for +-`rtcForwardOccluded16` the alignment must be 64 bytes. +- +-#### EXIT STATUS {#exit-status} +- +-For performance reasons this function does not do any error checks, +-thus will not set any error flags on failure. +- +-#### SEE ALSO {#see-also} +- +-[rtcOccluded4/8/16] +- +-```{=tex} +- +-``` +-rtcInitPointQueryContext +------------------------- +- +-#### NAME {#name} +- +- rtcInitPointQueryContext - initializes the context information (e.g. +- stack of (multilevel-)instance transformations) for point queries +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- struct RTC_ALIGN(16) RTCPointQueryContext +- { +- // accumulated 4x4 column major matrices from world to instance space. +- float world2inst[RTC_MAX_INSTANCE_LEVEL_COUNT][16]; +- +- // accumulated 4x4 column major matrices from instance to world space. +- float inst2world[RTC_MAX_INSTANCE_LEVEL_COUNT][16]; +- +- // instance ids. +- unsigned int instID[RTC_MAX_INSTANCE_LEVEL_COUNT]; +- +- // number of instances currently on the stack. +- unsigned int instStackSize; +- }; +- +- void rtcInitPointQueryContext( +- struct RTCPointQueryContext* context +- ); +- +-#### DESCRIPTION {#description} +- +-A stack (`RTCPointQueryContext` type) which stores the IDs and instance +-transformations during a BVH traversal for a point query. The +-transformations are assumed to be affine transformations (3×3 matrix +-plus translation) and therefore the last column is ignored (see +-[RTC\_GEOMETRY\_TYPE\_INSTANCE] for details). +- +-The `rtcInitPointContext` function initializes the context to default +-values and should be called for initialization. +- +-The context will be passed as an argument to the point query callback +-function (see [rtcSetGeometryPointQueryFunction]) and should be used +-to pass instance information down the instancing chain for user defined +-instancing (see tutorial [ClosestPoint] for a reference +-implementation of point queries with user defined instancing). +- +-The context is an necessary argument to [rtcPointQuery] and Embree +-internally uses the topmost instance transformation of the stack to +-transform the point query into instance space. +- +-#### EXIT STATUS {#exit-status} +- +-No error code is set by this function. +- +-#### SEE ALSO {#see-also} +- +-[rtcPointQuery], [rtcSetGeometryPointQueryFunction] +- +-```{=tex} +- +-``` +-rtcPointQuery +-------------- +- +-#### NAME {#name} +- +- rtcPointQuery - traverses the BVH with a point query object +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- struct RTC_ALIGN(16) RTCPointQuery +- { +- // location of the query +- float x; +- float y; +- float z; +- +- // radius and time of the query +- float radius; +- float time; +- }; +- +- void rtcPointQuery( +- RTCScene scene, +- struct RTCPointQuery* query, +- struct RTCPointQueryContext* context, +- struct RTCPointQueryFunction* queryFunc, +- void* userPtr +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcPointQuery` function traverses the BVH using a `RTCPointQuery` +-object (`query` argument) and calls a user defined callback function +-(e.g `queryFunc` argument) for each primitive of the scene (`scene` +-argument) that intersects the query domain. +- +-The user has to initialize the query location (`x`, `y` and `z` member) +-and query radius in the range $[0, \infty]$. If the scene contains +-motion blur geometries, also the query time (`time` member) must be +-initialized to a value in the range $[0, 1]$. +- +-Further, a `RTCPointQueryContext` (`context` argument) must be created +-and initialized. It contains ID and transformation information of the +-instancing hierarchy if (multilevel-)instancing is used. See +-[rtcInitPointQueryContext] for further information. +- +-For every primitive that intersects the query domain, the callback +-function (`queryFunc` argument) is called, in which distance +-computations to the primitive can be implemented. The user will be +-provided with the primID and geomID of the according primitive, +-however, the geometry information (e.g. triangle index and vertex data) +-has to be determined manually. The `userPtr` argument can be used to +-input geometry data of the scene or output results of the point query +-(e.g. closest point currently found on surface geometry (see tutorial +-[ClosestPoint])). +- +-The parameter `queryFunc` is optional and can be NULL, in which case +-the callback function is not invoked. However, a callback function can +-still get attached to a specific `RTCGeometry` object using +-[rtcSetGeometryPointQueryFunction]. If a callback function is +-attached to a geometry and (a potentially different) callback function +-is passed as an argument to `rtcPointQuery`, both functions are called +-for the primitives of the according geometries. +- +-The query radius can be decreased inside the callback function, which +-allows to efficiently cull parts of the scene during BVH traversal. +-Increasing the query radius and modifying time or location of the query +-will result in undefined behaviour. +- +-The callback function will be called for all primitives in a leaf node +-of the BVH even if the primitive is outside the query domain, since +-Embree does not gather geometry information of primitives internally. +- +-Point queries can be used with (multilevel)-instancing. However, care +-has to be taken when the instance transformation contains anisotropic +-scaling or sheering. In these cases distance computations have to be +-performed in world space to ensure correctness and the ellipsoidal +-query domain (in instance space) will be approximated with its axis +-aligned bounding box internally. Therefore, the callback function might +-be invoked even for primitives in inner BVH nodes that do not intersect +-the query domain. See [rtcSetGeometryPointQueryFunction] for details. +- +-The point query structure must be aligned to 16 bytes. +- +-#### SUPPORTED PRIMITIVES +- +-Currently, all primitive types are supported by the point query API +-except of points (see [RTC\_GEOMETRY\_TYPE\_POINT]), curves (see +-[RTC\_GEOMETRY\_TYPE\_CURVE]) and sudivision surfaces (see +-[RTC\_GEOMETRY\_SUBDIVISION]). +- +-#### EXIT STATUS {#exit-status} +- +-For performance reasons this function does not do any error checks, +-thus will not set any error flags on failure. +- +-#### SEE ALSO {#see-also} +- +-[rtcSetGeometryPointQueryFunction], [rtcInitPointQueryContext] +- +-```{=tex} +- +-``` +-rtcCollide +----------- +- +-#### NAME {#name} +- +- rtcCollide - intersects one BVH with another +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- struct RTCCollision { +- unsigned int geomID0, primID0; +- unsigned int geomID1, primID1; +- }; +- +- typedef void (*RTCCollideFunc) ( +- void* userPtr, +- RTCCollision* collisions, +- size_t num_collisions); +- +- void rtcCollide ( +- RTCScene hscene0, +- RTCScene hscene1, +- RTCCollideFunc callback, +- void* userPtr +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcCollide` function intersects the BVH of `hscene0` with the BVH +-of scene `hscene1` and calls a user defined callback function (e.g +-`callback` argument) for each pair of intersecting primitives between +-the two scenes. A user defined data pointer (`userPtr` argument) can +-also be passed in. +- +-For every pair of primitives that may intersect each other, the +-callback function (`callback` argument) is called. The user will be +-provided with the primID's and geomID's of multiple potentially +-intersecting primitive pairs. Currently, only scene entirely composed +-of user geometries are supported, thus the user is expected to +-implement a primitive/primitive intersection to filter out false +-positives in the callback function. The `userPtr` argument can be used +-to input geometry data of the scene or output results of the +-intersection query. +- +-#### SUPPORTED PRIMITIVES {#supported-primitives} +- +-Currently, the only supported type is the user geometry type (see +-[RTC\_GEOMETRY\_TYPE\_USER]). +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-```{=tex} +- +-``` +-rtcNewBVH +---------- +- +-#### NAME {#name} +- +- rtcNewBVH - creates a new BVH object +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- RTCBVH rtcNewBVH(RTCDevice device); +- +-#### DESCRIPTION {#description} +- +-This function creates a new BVH object and returns a handle to this +-BVH. The BVH object is reference counted with an initial reference +-count of 1. The handle can be released using the `rtcReleaseBVH` API +-call. +- +-The BVH object can be used to build a BVH in a user-specified format +-over user-specified primitives. See the documentation of the +-`rtcBuildBVH` call for more details. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcRetainBVH], [rtcReleaseBVH], [rtcBuildBVH] +- +-```{=tex} +- +-``` +-rtcRetainBVH +------------- +- +-#### NAME {#name} +- +- rtcRetainBVH - increments the BVH reference count +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcRetainBVH(RTCBVH bvh); +- +-#### DESCRIPTION {#description} +- +-BVH objects are reference counted. The `rtcRetainBVH` function +-increments the reference count of the passed BVH object (`bvh` +-argument). This function together with `rtcReleaseBVH` allows to use +-the internal reference counting in a C++ wrapper class to handle the +-ownership of the object. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewBVH], [rtcReleaseBVH] +- +-```{=tex} +- +-``` +-rtcReleaseBVH +-------------- +- +-#### NAME {#name} +- +- rtcReleaseBVH - decrements the BVH reference count +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- void rtcReleaseBVH(RTCBVH bvh); +- +-#### DESCRIPTION {#description} +- +-BVH objects are reference counted. The `rtcReleaseBVH` function +-decrements the reference count of the passed BVH object (`bvh` +-argument). When the reference count falls to 0, the BVH gets destroyed. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewBVH], [rtcRetainBVH] +- +-```{=tex} +- +-``` +-rtcBuildBVH +------------ +- +-#### NAME {#name} +- +- rtcBuildBVH - builds a BVH +- +-#### SYNOPSIS {#synopsis} +- +- #include +- +- struct RTC_ALIGN(32) RTCBuildPrimitive +- { +- float lower_x, lower_y, lower_z; +- unsigned int geomID; +- float upper_x, upper_y, upper_z; +- unsigned int primID; +- }; +- +- typedef void* (*RTCCreateNodeFunction) ( +- RTCThreadLocalAllocator allocator, +- unsigned int childCount, +- void* userPtr +- ); +- +- typedef void (*RTCSetNodeChildrenFunction) ( +- void* nodePtr, +- void** children, +- unsigned int childCount, +- void* userPtr +- ); +- +- typedef void (*RTCSetNodeBoundsFunction) ( +- void* nodePtr, +- const struct RTCBounds** bounds, +- unsigned int childCount, +- void* userPtr +- ); +- +- typedef void* (*RTCCreateLeafFunction) ( +- RTCThreadLocalAllocator allocator, +- const struct RTCBuildPrimitive* primitives, +- size_t primitiveCount, +- void* userPtr +- ); +- +- typedef void (*RTCSplitPrimitiveFunction) ( +- const struct RTCBuildPrimitive* primitive, +- unsigned int dimension, +- float position, +- struct RTCBounds* leftBounds, +- struct RTCBounds* rightBounds, +- void* userPtr +- ); +- +- typedef bool (*RTCProgressMonitorFunction)( +- void* userPtr, double n +- ); +- +- enum RTCBuildFlags +- { +- RTC_BUILD_FLAG_NONE, +- RTC_BUILD_FLAG_DYNAMIC +- }; +- +- struct RTCBuildArguments +- { +- size_t byteSize; +- +- enum RTCBuildQuality buildQuality; +- enum RTCBuildFlags buildFlags; +- unsigned int maxBranchingFactor; +- unsigned int maxDepth; +- unsigned int sahBlockSize; +- unsigned int minLeafSize; +- unsigned int maxLeafSize; +- float traversalCost; +- float intersectionCost; +- +- RTCBVH bvh; +- struct RTCBuildPrimitive* primitives; +- size_t primitiveCount; +- size_t primitiveArrayCapacity; +- +- RTCCreateNodeFunction createNode; +- RTCSetNodeChildrenFunction setNodeChildren; +- RTCSetNodeBoundsFunction setNodeBounds; +- RTCCreateLeafFunction createLeaf; +- RTCSplitPrimitiveFunction splitPrimitive; +- RTCProgressMonitorFunction buildProgress; +- void* userPtr; +- }; +- +- struct RTCBuildArguments rtcDefaultBuildArguments(); +- +- void* rtcBuildBVH( +- const struct RTCBuildArguments* args +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcBuildBVH` function can be used to build a BVH in a user-defined +-format over arbitrary primitives. All arguments to the function are +-provided through the `RTCBuildArguments` structure. The first member of +-that structure must be set to the size of the structure in bytes +-(`bytesSize` member) which allows future extensions of the structure. +-It is recommended to initialize the build arguments structure using the +-`rtcDefaultBuildArguments` function. +- +-The `rtcBuildBVH` function gets passed the BVH to build (`bvh` member), +-the array of primitives (`primitives` member), the capacity of that +-array (`primitiveArrayCapacity` member), the number of primitives +-stored inside the array (`primitiveCount` member), callback function +-pointers, and a user-defined pointer (`userPtr` member) that is passed +-to all callback functions when invoked. The `primitives` array can be +-freed by the application after the BVH is built. All callback functions +-are typically called from multiple threads, thus their implementation +-must be thread-safe. +- +-Four callback functions must be registered, which are invoked during +-build to create BVH nodes (`createNode` member), to set the pointers to +-all children (`setNodeChildren` member), to set the bounding boxes of +-all children (`setNodeBounds` member), and to create a leaf node +-(`createLeaf` member). +- +-The function pointer to the primitive split function (`splitPrimitive` +-member) may be `NULL`, however, then no spatial splitting in high +-quality mode is possible. The function pointer used to report the build +-progress (`buildProgress` member) is optional and may also be `NULL`. +- +-Further, some build settings are passed to configure the BVH build. +-Using the build quality settings (`buildQuality` member), one can +-select between a faster, low quality build which is good for dynamic +-scenes, and a standard quality build for static scenes. One can also +-specify the desired maximum branching factor of the BVH +-(`maxBranchingFactor` member), the maximum depth the BVH should have +-(`maxDepth` member), the block size for the SAH heuristic +-(`sahBlockSize` member), the minimum and maximum leaf size +-(`minLeafSize` and `maxLeafSize` member), and the estimated costs of +-one traversal step and one primitive intersection (`traversalCost` and +-`intersectionCost` members). When enabling the `RTC_BUILD_FLAG_DYNAMIC` +-build flags (`buildFlags` member), re-build performance for dynamic +-scenes is improved at the cost of higher memory requirements. +- +-To spatially split primitives in high quality mode, the builder needs +-extra space at the end of the build primitive array to store split +-primitives. The total capacity of the build primitive array is passed +-using the `primitiveArrayCapacity` member, and should be about twice +-the number of primitives when using spatial splits. +- +-The `RTCCreateNodeFunc` and `RTCCreateLeafFunc` callbacks are passed a +-thread local allocator object that should be used for fast allocation +-of nodes using the `rtcThreadLocalAlloc` function. We strongly +-recommend using this allocation mechanism, as alternative approaches +-like standard `malloc` can be over 10× slower. The allocator object +-passed to the create callbacks may be used only inside the current +-thread. Memory allocated using `rtcThreadLocalAlloc` is automatically +-freed when the `RTCBVH` object is deleted. If you use your own memory +-allocation scheme you have to free the memory yourself when the +-`RTCBVH` object is no longer used. +- +-The `RTCCreateNodeFunc` callback additionally gets the number of +-children for this node in the range from 2 to `maxBranchingFactor` +-(`childCount` argument). +- +-The `RTCSetNodeChildFunc` callback function gets a pointer to the node +-as input (`nodePtr` argument), an array of pointers to the children +-(`childPtrs` argument), and the size of this array (`childCount` +-argument). +- +-The `RTCSetNodeBoundsFunc` callback function gets a pointer to the node +-as input (`nodePtr` argument), an array of pointers to the bounding +-boxes of the children (`bounds` argument), and the size of this array +-(`childCount` argument). +- +-The `RTCCreateLeafFunc` callback additionally gets an array of +-primitives as input (`primitives` argument), and the size of this array +-(`primitiveCount` argument). The callback should read the `geomID` and +-`primID` members from the passed primitives to construct the leaf. +- +-The `RTCSplitPrimitiveFunc` callback is invoked in high quality mode to +-split a primitive (`primitive` argument) at the specified position +-(`position` argument) and dimension (`dimension` argument). The +-callback should return bounds of the clipped left and right parts of +-the primitive (`leftBounds` and `rightBounds` arguments). +- +-The `RTCProgressMonitorFunction` callback function is called with the +-estimated completion rate `n` in the range $[0,1]$. Returning `true` +-from the callback lets the build continue; returning `false` cancels +-the build. +- +-#### EXIT STATUS {#exit-status} +- +-On failure an error code is set that can be queried using +-`rtcGetDeviceError`. +- +-#### SEE ALSO {#see-also} +- +-[rtcNewBVH] +- +-```{=tex} +- +-``` +-RTCQuaternionDecomposition +--------------------------- +- +-#### NAME {#name} +- +- RTCQuaternionDecomposition - structure that represents a quaternion +- decomposition of an affine transformation +- +-#### SYNOPSIS {#synopsis} +- +- struct RTCQuaternionDecomposition +- { +- float scale_x, scale_y, scale_z; +- float skew_xy, skew_xz, skew_yz; +- float shift_x, shift_y, shift_z; +- float quaternion_r, quaternion_i, quaternion_j, quaternion_k; +- float translation_x, translation_y, translation_z; +- }; +- +-#### DESCRIPTION {#description} +- +-The struct `RTCQuaternionDecomposition` represents an affine +-transformation decomposed into three parts. An upper triangular +-scaling/skew/shift matrix +- +-$$ +-S = \left( \begin{array}{cccc} +-scale_x & skew_{xy} & skew_{xz} & shift_x \  +-0 & scale_y & skew_{yz} & shift_y \  +-0 & 0 & scale_z & shift_z \  +-0 & 0 & 0 & 1 \  +-\end{array} \right), +-$$ +- +-a translation matrix +- +-$$ +-T = \left( \begin{array}{cccc} +-1 & 0 & 0 & translation_x \  +-0 & 1 & 0 & translation_y \  +-0 & 0 & 1 & translation_z \  +-0 & 0 & 0 & 1 \  +-\end{array} \right), +-$$ +- +-and a rotation matrix $R$, represented as a quaternion +- +-$quaternion_r + quaternion_i  \mathbf{i} + quaternion_j  \mathbf{i} + quaternion_k  \mathbf{k}$ +- +-where $\mathbf{i}$, $\mathbf{j}$ $\mathbf{k}$ are the imaginary +-quaternion units. The passed quaternion will be normalized internally. +- +-The affine transformation matrix corresponding to a +-`RTCQuaternionDecomposition` is $TRS$ and a point +-$p = (p_x, p_y, p_z, 1)^T$ will be transformed as +-$$p' = T  R  S  p.$$ +- +-The functions `rtcInitQuaternionDecomposition`, +-`rtcQuaternionDecompositionSetQuaternion`, +-`rtcQuaternionDecompositionSetScale`, +-`rtcQuaternionDecompositionSetSkew`, +-`rtcQuaternionDecompositionSetShift`, and +-`rtcQuaternionDecompositionSetTranslation` allow to set the fields of +-the structure more conveniently. +- +-#### EXIT STATUS {#exit-status} +- +-No error code is set by this function. +- +-#### SEE ALSO {#see-also} +- +-[rtcSetGeometryTransformQuaternion], +-[rtcInitQuaternionDecomposition] +- +-```{=tex} +- +-``` +-rtcInitQuaternionDecomposition +------------------------------- +- +-#### NAME {#name} +- +- rtcInitQuaternionDecomposition - initializes quaternion decomposition +- +-#### SYNOPSIS {#synopsis} +- +- void rtcInitQuaternionDecomposition( +- struct RTCQuaternionDecomposition* qd +- ); +- +-#### DESCRIPTION {#description} +- +-The `rtcInitQuaternionDecomposition` function initializes a +-`RTCQuaternionDecomposition` structure to represent an identity +-transformation. +- +-#### EXIT STATUS {#exit-status} +- +-No error code is set by this function. +- +-#### SEE ALSO {#see-also} +- +-[rtcSetGeometryTransformQuaternion], [RTCQuaternionDecomposition] +- +-```{=tex} +- +-``` +-CPU Performance Recommendations +-=============================== +- +-MXCSR control and status register +---------------------------------- +- +-It is strongly recommended to have the `Flush to Zero` and +-`Denormals are Zero` mode of the MXCSR control and status register +-enabled for each thread before calling the `rtcIntersect`-type and +-`rtcOccluded`-type functions. Otherwise, under some circumstances +-special handling of denormalized floating point numbers can +-significantly reduce application and Embree performance. When using +-Embree together with the Intel® Threading Building Blocks, it is +-sufficient to execute the following code at the beginning of the +-application main thread (before the creation of the +-`tbb::task_scheduler_init` object): +- +- #include +- #include +- ... +- _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); +- _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON); +- +-If using a different tasking system, make sure each rendering thread +-has the proper mode set. +- +-Thread Creation and Affinity Settings +-------------------------------------- +- +-Tasking systems like TBB create worker threads on demand, which will +-add a runtime overhead for the very first `rtcCommitScene` call. In +-case you want to benchmark the scene build time, you should start the +-threads at application startup. You can let Embree start TBB threads by +-passing `start_threads=1` to the `cfg` parameter of `rtcNewDevice`. +- +-On machines with a high thread count (e.g. dual-socket Xeon or Xeon Phi +-machines), affinitizing TBB worker threads increases build and +-rendering performance. You can let Embree affinitize TBB worker threads +-by passing `set_affinity=1` to the `cfg` parameter of `rtcNewDevice`. +-By default, threads are not affinitized by Embree with the exception of +-Xeon Phi Processors where they are affinitized by default. +- +-All Embree tutorials automatically start and affinitize TBB worker +-threads by passing `start_threads=1,set_affinity=1` to `rtcNewDevice`. +- +-Fast Coherent Rays +------------------- +- +-For getting the highest performance for highly coherent rays, e.g. +-primary or hard shadow rays, it is recommended to use packets with +-setting the `RTC_RAY_QUERY_FLAG_COHERENT` flag in the +-`RTCIntersectArguments` struct passed to the +-`rtcIntersect`/`rtcOccluded` calls. The rays inside each packet should +-be grouped as coherent as possible. +- +-Huge Page Support +------------------ +- +-It is recommended to use huge pages under Linux to increase rendering +-performance. Embree supports 2MB huge pages under Windows, Linux, and +-macOS. Under Linux huge page support is enabled by default, and under +-Windows and macOS disabled by default. Huge page support can be enabled +-in Embree by passing `hugepages=1` to `rtcNewDevice` or disabled by +-passing `hugepages=0` to `rtcNewDevice`. +- +-We recommend using 2MB huge pages with Embree under Linux as this +-improves ray tracing performance by about 5-10%. Under Windows using +-huge pages requires the application to run in elevated mode which is a +-security issue, thus likely not an option for most use cases. Under +-macOS huge pages are rarely available as memory tends to get quickly +-fragmented, thus we do not recommend using huge pages on macOS. +- +-### Huge Pages under Linux +- +-Linux supports transparent huge pages and explicit huge pages. To +-enable transparent huge page support under Linux, execute the following +-as root: +- +- echo always > /sys/kernel/mm/transparent_hugepage/enabled +- +-When transparent huge pages are enabled, the kernel tries to merge 4KB +-pages to 2MB pages when possible as a background job. Many Linux +-distributions have transparent huge pages enabled by default. See the +-following webpage for more information on [transparent huge pages under +-Linux](https://www.kernel.org/doc/Documentation/vm/transhuge.txt). In +-this mode each application, including your rendering application based +-on Embree, will automatically tend to use huge pages. +- +-Using transparent huge pages, the transitioning from 4KB to 2MB pages +-might take some time. For that reason Embree also supports allocating +-2MB pages directly when a huge page pool is configured. Such a pool can +-be configured by writing some number of huge pages to allocate to +-`/proc/sys/vm/nr_overcommit_hugepages` as root user. E.g. to configure +-2GB of address space for huge page allocation, execute the following as +-root: +- +- echo 1000 > /proc/sys/vm/nr_overcommit_hugepages +- +-See the following webpage for more information on [huge pages under +-Linux](https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt). +- +-### Huge Pages under Windows +- +-To use huge pages under Windows, the current user must have the "Lock +-pages in memory" (SeLockMemoryPrivilege) assigned. This can be +-configured through the "Local Security Policy" application, by adding a +-user to "Local Policies" -\> "User Rights Assignment" -\> "Lock pages +-in memory". You have to log out and in again for this change to take +-effect. +- +-Further, your application must be executed as an elevated process ("Run +-as administrator") and the "SeLockMemoryPrivilege" must be explicitly +-enabled by your application. Example code on how to enable this +-privilege can be found in the "common/sys/alloc.cpp" file of Embree. +-Alternatively, Embree will try to enable this privilege when passing +-`enable_selockmemoryprivilege=1` to `rtcNewDevice`. Further, huge pages +-should be enabled in Embree by passing `hugepages=1` to `rtcNewDevice`. +- +-When the system has been running for a while, physical memory gets +-fragmented, which can slow down the allocation of huge pages +-significantly under Windows. +- +-### Huge Pages under macOS +- +-To use huge pages under macOS you have to pass `hugepages=1` to +-`rtcNewDevice` to enable that feature in Embree. +- +-When the system has been running for a while, physical memory gets +-quickly fragmented, and causes huge page allocations to fail. For this +-reason, huge pages are not very useful under macOS in practice. +- +-Avoid store-to-load forwarding issues with single rays +------------------------------------------------------- +- +-We recommend to use a single SSE store to set up the `org` and `tnear` +-components, and a single SSE store to set up the `dir` and `time` +-components of a single ray (`RTCRay` type). Storing these values using +-scalar stores causes a store-to-load forwarding penalty because Embree +-is reading these components using SSE loads later on. +- +-```{=tex} +- +-``` +-GPU Performance Recommendations +-=============================== +- +-Low Code Complexity +-------------------- +- +-As a general rule try to keep code complexity low, to avoid spill code +-generation. To achieve this we recommend splitting your renderer into +-separate kernels instead of using a single Uber kernel invokation. +- +-Code can further get reduced by using SYCL specialization constants to +-just enable rendering features required to render a given scene. +- +-Feature Flags +-------------- +- +-Use SYCL specialization constants and the feature flags (see section +-[RTCFeatureFlags]) of the `rtcIntersect1` and `rtcOccluded1` calls to +-JIT compile minimal code. The passed feature flags should just contain +-features required to render the current scene. If JIT compile times are +-an issue, reduce the number of feature masks used and use JIT caching +-(see section [SYCL JIT caching](#sycl-jit-caching)). +- +-Inline Indirect Calls +---------------------- +- +-Attaching user geometry and intersection filter callbacks to the +-geometries of the scene is not supported in SYCL for performance +-reasons. +- +-Instead directly pass the user geometry and intersection filter +-callback functions through the `RTCIntersectArguments` (and +-`RTCOccludedArguments`) struct to `rtcIntersect1` (and `rtcOccluded1`) +-API functions as in the following example: +- +- RTC_SYCL_INDIRECTLY_CALLABLE void intersectionFilter( +- const RTCFilterFunctionNArguments* args +- ) { ... } +- +- RTCIntersectArguments args; +- rtcInitIntersectArguments(&args); +- args.filter = intersectionFilter; +- +- rtcIntersect1(scene,&ray,&args); +- +-If the callback function is directly passed that way, the SYCL compiler +-can inline the indirect call, which gives a huge performance benefit. +-Do *not* read a function pointer form some memory location and pass it +-to `rtcIntersect1` (and `rtcOccluded1`) as this will also prevent +-inlining. +- +-7 Bit Ray Mask +--------------- +- +-Use just the lower 7 bits of the ray and geometry mask if possible, +-even though Embree supports 32 bit ray masks for geometry masking. On +-the CPU using any of the 32 bits yields the same performance, but the +-ray tracing hardware only supports an 8 bit mask, thus Embree has to +-emulate 32 bit masking if used. For that reason the lower 7 mask bits +-are hardware accelerated and fast, while the mask bits 7-31 require +-some software intervention and using them reduces performance. To turn +-on 32 bit ray masks use the RTC\_FEATURE\_FLAG\_32\_BIT\_RAY\_MASK (see +-section [RTCFeatureFlags]). +- +-Limit Motion Blur Motions +-------------------------- +- +-The motion blur implementation on SYCL has some limitations regarding +-supported motion. Primitive motion should be maximally as large as a +-small multiple of the primitive size, otherwise performance can degrade +-a lot. If detailed geometry moves fast, best put the geometry into an +-instance, and apply motion blur to the instance itself, which +-efficiently allows larger motions. As a fallback, problematic scenes +-can always still get rendered robustly on the CPU. +- +-Generic Pointers +----------------- +- +-Embree uses standard C++ pointers in its implementation. SYCL might not +-be able to detect the memory space these pointers refer to and has to +-treat them as generic pointers which are not performing optimal. The +-DPC++ compiler has advanced optimizations to infer the proper address +-space to avoid usage of generic pointers. +- +-However, if you still encounter the following warning during ahead of +-time compilation of SYCL kernels, then loads from generic pointer are +-present: +- +- warning: Adding XX occurrences of additional control flow due to presence +- of generic address space operations in function YYY. +- +-To work around this issue we recommend: +- +-- Do not use local memory inside kernels that trace rays. In this +- case the DPC++ compiler knows that no local memory pointer can +- exist and will optimize generic loads. As this is typically the +- case for renderers, generic pointer will typically not cause +- issues. +- +-- Indirectly callable functions may still cause problems, even if +- your kernel does not use local memory. Thus best use SYCL pointers +- like sycl::global\_ptr``{=html} and +- sycl::private\_ptr``{=html} in indirectly callable functions to +- avoid generic address space usage. +- +-- You can also enforce usage of global pointers using the following +- DPC++ compile flags: +- `-cl-intel-force-global-mem-allocation -cl-intel-no-local-to-generic`. + + Embree Tutorials + ================ +@@ -9622,6 +978,14 @@ There is no image output to keep the tutorial as simple as possible. + + [Source Code](https://github.com/embree/embree/blob/master/tutorials/minimal/minimal.cpp) + ++Host Device Memory ++------------------ ++ ++This tutorial shows four different ways to use explicit host and device memory ++with SYCL. ++ ++[Source Code](https://github.com/embree/embree/blob/master/tutorials/host_device_memory/host_device_memory_device.cpp) ++ + Triangle Geometry + ----------------- + +diff --git a/man/man3/RTCBufferType.4embree4 b/man/man3/RTCBufferType.4embree4 +index 98da9cef7..65a7853af 100644 +--- a/man/man3/RTCBufferType.4embree4 ++++ b/man/man3/RTCBufferType.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "RTCBufferType" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/RTCCurveFlags.4embree4 b/man/man3/RTCCurveFlags.4embree4 +index 3e4536bc2..35c9981ff 100644 +--- a/man/man3/RTCCurveFlags.4embree4 ++++ b/man/man3/RTCCurveFlags.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "RTCCurveFlags" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/RTCFeatureFlags.4embree4 b/man/man3/RTCFeatureFlags.4embree4 +index d150c8b4c..53fdf193a 100644 +--- a/man/man3/RTCFeatureFlags.4embree4 ++++ b/man/man3/RTCFeatureFlags.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "RTCFeatureFlags" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +@@ -131,7 +145,7 @@ curves (RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_XXX_CURVE). + RTC_FEATURE_FLAG_LINEAR_CURVES: Enables all linear curves + (RTC_GEOMETRY_TYPE_XXX_LINEAR_CURVE). + .IP \[bu] 2 +-RTC_FEATURE_FLAG_BEZIER_CURVES: Enables all B\['e]zier curves ++RTC_FEATURE_FLAG_BEZIER_CURVES: Enables all Bézier curves + (RTC_GEOMETRY_TYPE_XXX_BEZIER_CURVE). + .IP \[bu] 2 + RTC_FEATURE_FLAG_BSPLINE_CURVES: Enables all B-spline curves +@@ -149,14 +163,14 @@ RTC_FEATURE_FLAG_ROUND_LINEAR_CURVE: Enables round linear curves + RTC_FEATURE_FLAG_FLAT_LINEAR_CURVE: Enables flat linear curves + (RTC_GEOMETRY_TYPE_FLAT_LINEAR_CURVE). + .IP \[bu] 2 +-RTC_FEATURE_FLAG_ROUND_BEZIER_CURVE: Enables round B\['e]zier curves ++RTC_FEATURE_FLAG_ROUND_BEZIER_CURVE: Enables round Bézier curves + (RTC_GEOMETRY_TYPE_ROUND_BEZIER_CURVE). + .IP \[bu] 2 +-RTC_FEATURE_FLAG_FLAT_BEZIER_CURVE: Enables flat B\['e]zier curves ++RTC_FEATURE_FLAG_FLAT_BEZIER_CURVE: Enables flat Bézier curves + (RTC_GEOMETRY_TYPE_FLAT_BEZIER_CURVE). + .IP \[bu] 2 + RTC_FEATURE_FLAG_NORMAL_ORIENTED_BEZIER_CURVE: Enables normal oriented +-B\['e]zier curves (RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_BEZIER_CURVE). ++Bézier curves (RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_BEZIER_CURVE). + .IP \[bu] 2 + RTC_FEATURE_FLAG_ROUND_BSPLINE_CURVE: Enables round B-spline curves + (RTC_GEOMETRY_TYPE_ROUND_BSPLINE_CURVE). +diff --git a/man/man3/RTCFormat.4embree4 b/man/man3/RTCFormat.4embree4 +index c148f2b51..0b6df6cc9 100644 +--- a/man/man3/RTCFormat.4embree4 ++++ b/man/man3/RTCFormat.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "RTCFormat" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/RTCHit.4embree4 b/man/man3/RTCHit.4embree4 +index 690ad75ce..f0309a53a 100644 +--- a/man/man3/RTCHit.4embree4 ++++ b/man/man3/RTCHit.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "RTCHit" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/RTCHitN.4embree4 b/man/man3/RTCHitN.4embree4 +index 224b4697b..7459a9538 100644 +--- a/man/man3/RTCHitN.4embree4 ++++ b/man/man3/RTCHitN.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "RTCHitN" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/RTCQuaternionDecomposition.4embree4 b/man/man3/RTCQuaternionDecomposition.4embree4 +index 95b30c582..9fb50d492 100644 +--- a/man/man3/RTCQuaternionDecomposition.4embree4 ++++ b/man/man3/RTCQuaternionDecomposition.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "RTCQuaternionDecomposition" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +@@ -56,7 +70,7 @@ $$ + .PP + and a rotation matrix \f[I]R\f[R], represented as a quaternion + .PP +-\f[I]q\f[R]\f[I]u\f[R]\f[I]a\f[R]\f[I]t\f[R]\f[I]e\f[R]\f[I]r\f[R]\f[I]n\f[R]\f[I]i\f[R]\f[I]o\f[R]\f[I]n\f[R]~\f[I]r\f[R]~\[u2005]+\[u2005]\f[I]q\f[R]\f[I]u\f[R]\f[I]a\f[R]\f[I]t\f[R]\f[I]e\f[R]\f[I]r\f[R]\f[I]n\f[R]\f[I]i\f[R]\f[I]o\f[R]\f[I]n\f[R]~\f[I]i\f[R]~\ \f[B]i\f[R]\[u2005]+\[u2005]\f[I]q\f[R]\f[I]u\f[R]\f[I]a\f[R]\f[I]t\f[R]\f[I]e\f[R]\f[I]r\f[R]\f[I]n\f[R]\f[I]i\f[R]\f[I]o\f[R]\f[I]n\f[R]~\f[I]j\f[R]~\ \f[B]i\f[R]\[u2005]+\[u2005]\f[I]q\f[R]\f[I]u\f[R]\f[I]a\f[R]\f[I]t\f[R]\f[I]e\f[R]\f[I]r\f[R]\f[I]n\f[R]\f[I]i\f[R]\f[I]o\f[R]\f[I]n\f[R]~\f[I]k\f[R]~\ \f[B]k\f[R] ++\f[I]q\f[R]\f[I]u\f[R]\f[I]a\f[R]\f[I]t\f[R]\f[I]e\f[R]\f[I]r\f[R]\f[I]n\f[R]\f[I]i\f[R]\f[I]o\f[R]\f[I]n\f[R]~\f[I]r\f[R]~ + \f[I]q\f[R]\f[I]u\f[R]\f[I]a\f[R]\f[I]t\f[R]\f[I]e\f[R]\f[I]r\f[R]\f[I]n\f[R]\f[I]i\f[R]\f[I]o\f[R]\f[I]n\f[R]~\f[I]i\f[R]~\ \f[B]i\f[R] + \f[I]q\f[R]\f[I]u\f[R]\f[I]a\f[R]\f[I]t\f[R]\f[I]e\f[R]\f[I]r\f[R]\f[I]n\f[R]\f[I]i\f[R]\f[I]o\f[R]\f[I]n\f[R]~\f[I]j\f[R]~\ \f[B]i\f[R] + \f[I]q\f[R]\f[I]u\f[R]\f[I]a\f[R]\f[I]t\f[R]\f[I]e\f[R]\f[I]r\f[R]\f[I]n\f[R]\f[I]i\f[R]\f[I]o\f[R]\f[I]n\f[R]~\f[I]k\f[R]~\ \f[B]k\f[R] + .PP + where \f[B]i\f[R], \f[B]j\f[R] \f[B]k\f[R] are the imaginary quaternion + units. +@@ -65,10 +79,10 @@ The passed quaternion will be normalized internally. + The affine transformation matrix corresponding to a + \f[C]RTCQuaternionDecomposition\f[R] is + \f[I]T\f[R]\f[I]R\f[R]\f[I]S\f[R] and a point +-\f[I]p\f[R]\[u2004]=\[u2004](\f[I]p\f[R]~\f[I]x\f[R]~,\[u2006]\f[I]p\f[R]~\f[I]y\f[R]~,\[u2006]\f[I]p\f[R]~\f[I]z\f[R]~,\[u2006]1)^\f[I]T\f[R]^ ++\f[I]p\f[R] = (\f[I]p\f[R]~\f[I]x\f[R]~,\f[I]p\f[R]~\f[I]y\f[R]~,\f[I]p\f[R]~\f[I]z\f[R]~,1)^\f[I]T\f[R]^ + will be transformed as + .RS +-\f[I]p\f[R]\[fm]\[u2004]=\[u2004]\f[I]T\f[R]\ \f[I]R\f[R]\ \f[I]S\f[R]\ \f[I]p\f[R]. ++\f[I]p\f[R]′ = \f[I]T\f[R]\ \f[I]R\f[R]\ \f[I]S\f[R]\ \f[I]p\f[R]. + .RE + .PP + The functions \f[C]rtcInitQuaternionDecomposition\f[R], +diff --git a/man/man3/RTCRay.4embree4 b/man/man3/RTCRay.4embree4 +index a2854acdf..6018de65b 100644 +--- a/man/man3/RTCRay.4embree4 ++++ b/man/man3/RTCRay.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "RTCRay" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +@@ -45,11 +59,10 @@ The ray direction does not have to be normalized, and only the parameter + range specified by the \f[C]tnear\f[R]/\f[C]tfar\f[R] interval is + considered valid. + .PP +-The ray segment must be in the range [0,\[u2006]\[if]], thus ranges that +-start behind the ray origin are not allowed, but ranges can reach to +-infinity. ++The ray segment must be in the range [0,∞], thus ranges that start ++behind the ray origin are not allowed, but ranges can reach to infinity. + .PP +-The ray further contains a motion blur time in the range [0,\[u2006]1] ++The ray further contains a motion blur time in the range [0,1] + (\f[C]time\f[R] member), a ray mask (\f[C]mask\f[R] member), a ray ID + (\f[C]id\f[R] member), and ray flags (\f[C]flags\f[R] member). + The ray mask can be used to mask out some geometries for some rays (see +diff --git a/man/man3/RTCRayHit.4embree4 b/man/man3/RTCRayHit.4embree4 +index 2c7431033..23a822350 100644 +--- a/man/man3/RTCRayHit.4embree4 ++++ b/man/man3/RTCRayHit.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "RTCRay" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/RTCRayHitN.4embree4 b/man/man3/RTCRayHitN.4embree4 +index f156ba8ca..ef4ee7c63 100644 +--- a/man/man3/RTCRayHitN.4embree4 ++++ b/man/man3/RTCRayHitN.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "RTCRayHitN" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/RTCRayN.4embree4 b/man/man3/RTCRayN.4embree4 +index 1f8aa51c5..bb2318d7a 100644 +--- a/man/man3/RTCRayN.4embree4 ++++ b/man/man3/RTCRayN.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "RTCRayN" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/RTC_GEOMETRY_TYPE_CURVE.4embree4 b/man/man3/RTC_GEOMETRY_TYPE_CURVE.4embree4 +index ff9c20b2e..e0752d725 100644 +--- a/man/man3/RTC_GEOMETRY_TYPE_CURVE.4embree4 ++++ b/man/man3/RTC_GEOMETRY_TYPE_CURVE.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "RTC_GEOMETRY_TYPE_*_CURVE" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +@@ -10,7 +24,7 @@ RTC_GEOMETRY_TYPE_FLAT_LINEAR_CURVE - + flat curve geometry with linear basis + + RTC_GEOMETRY_TYPE_FLAT_BEZIER_CURVE - +- flat curve geometry with cubic B\['e]zier basis ++ flat curve geometry with cubic Bézier basis + + RTC_GEOMETRY_TYPE_FLAT_BSPLINE_CURVE - + flat curve geometry with cubic B-spline basis +@@ -22,7 +36,7 @@ RTC_GEOMETRY_TYPE_FLAT_CATMULL_ROM_CURVE - + flat curve geometry with Catmull-Rom basis + + RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_BEZIER_CURVE - +- flat normal oriented curve geometry with cubic B\['e]zier basis ++ flat normal oriented curve geometry with cubic Bézier basis + + RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_BSPLINE_CURVE - + flat normal oriented curve geometry with cubic B-spline basis +@@ -40,7 +54,7 @@ RTC_GEOMETRY_TYPE_ROUND_LINEAR_CURVE - + capped cone curve geometry with linear basis and spherical ending + + RTC_GEOMETRY_TYPE_ROUND_BEZIER_CURVE - +- swept surface curve geometry with cubic B\['e]zier basis ++ swept surface curve geometry with cubic Bézier basis + + RTC_GEOMETRY_TYPE_ROUND_BSPLINE_CURVE - + swept surface curve geometry with cubic B-spline basis +@@ -77,8 +91,8 @@ rtcNewGeometry(device, RTC_GEOMETRY_TYPE_ROUND_CATMULL_ROM_CURVE); + .fi + .SS DESCRIPTION + .PP +-Curves with per vertex radii are supported with linear, cubic +-B\['e]zier, cubic B-spline, and cubic Hermite bases. ++Curves with per vertex radii are supported with linear, cubic Bézier, ++cubic B-spline, and cubic Hermite bases. + Such curve geometries are created by passing + \f[C]RTC_GEOMETRY_TYPE_FLAT_LINEAR_CURVE\f[R], + \f[C]RTC_GEOMETRY_TYPE_FLAT_BEZIER_CURVE\f[R], +@@ -156,14 +170,14 @@ vertex buffer. + Only when the left and right bits are properly specified the current + segment can properly attach to the left and/or right neighbor, otherwise + the touching area may not get rendered properly. +-.SS B\['e]zier Basis ++.SS Bézier Basis + .PP +-For the cubic B\['e]zier basis the indices point to the first of 4 ++For the cubic Bézier basis the indices point to the first of 4 + consecutive control points in the vertex buffer. +-These control points use the cubic B\['e]zier basis, where the first +-control point represents the start point of the curve, and the 4th +-control point the end point of the curve. +-The B\['e]zier basis is interpolating, thus the curve does go exactly ++These control points use the cubic Bézier basis, where the first control ++point represents the start point of the curve, and the 4th control point ++the end point of the curve. ++The Bézier basis is interpolating, thus the curve does go exactly + through the first and fourth control vertex. + .SS B-spline Basis + .PP +@@ -225,7 +239,7 @@ follows the provided normal spline. + .PP + To intersect the normal oriented curve, we perform a newton-raphson + style intersection of a ray with a tensor product surface of a linear +-basis (perpendicular to the curve) and cubic B\['e]zier basis (along the ++basis (perpendicular to the curve) and cubic Bézier basis (along the + curve). + We use a guide curve and its derivatives to construct the control points + of that surface. +diff --git a/man/man3/RTC_GEOMETRY_TYPE_GRID.4embree4 b/man/man3/RTC_GEOMETRY_TYPE_GRID.4embree4 +index d2c3981a1..faa83eab4 100644 +--- a/man/man3/RTC_GEOMETRY_TYPE_GRID.4embree4 ++++ b/man/man3/RTC_GEOMETRY_TYPE_GRID.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "RTC_GEOMETRY_TYPE_GRID" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +@@ -56,7 +70,7 @@ The \f[C]RTCGrid\f[R] structure describes a 2D grid of vertices (with + respect to the vertex buffer of the grid mesh). + The \f[C]width\f[R] and \f[C]height\f[R] members specify the number of + vertices in u and v direction, e.g.\ setting both \f[C]width\f[R] and +-\f[C]height\f[R] to 3 sets up a 3\[tmu]3 vertex grid. ++\f[C]height\f[R] to 3 sets up a 3×3 vertex grid. + The maximum allowed \f[C]width\f[R] and \f[C]height\f[R] is 32767. + The \f[C]startVertexID\f[R] specifies the ID of the top-left vertex in + the vertex grid, while the \f[C]stride\f[R] parameter specifies a stride +diff --git a/man/man3/RTC_GEOMETRY_TYPE_INSTANCE.4embree4 b/man/man3/RTC_GEOMETRY_TYPE_INSTANCE.4embree4 +index 0a759d6a1..310dca2eb 100644 +--- a/man/man3/RTC_GEOMETRY_TYPE_INSTANCE.4embree4 ++++ b/man/man3/RTC_GEOMETRY_TYPE_INSTANCE.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "RTC_GEOMETRY_TYPE_INSTANCE" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +@@ -21,8 +35,8 @@ RTCGeometry geometry = + .fi + .SS DESCRIPTION + .PP +-Embree supports instancing of scenes using affine transformations +-(3\[tmu]3 matrix plus translation). ++Embree supports instancing of scenes using affine transformations (3×3 ++matrix plus translation). + As the instanced scene is stored only a single time, even if instanced + to multiple locations, this feature can be used to create very complex + scenes with small memory footprint. +diff --git a/man/man3/RTC_GEOMETRY_TYPE_INSTANCE_ARRAY.4embree4 b/man/man3/RTC_GEOMETRY_TYPE_INSTANCE_ARRAY.4embree4 +index 66adf1910..ba3d27c28 100644 +--- a/man/man3/RTC_GEOMETRY_TYPE_INSTANCE_ARRAY.4embree4 ++++ b/man/man3/RTC_GEOMETRY_TYPE_INSTANCE_ARRAY.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "RTC_GEOMETRY_TYPE_INSTANCE_ARRAY" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/RTC_GEOMETRY_TYPE_POINT.4embree4 b/man/man3/RTC_GEOMETRY_TYPE_POINT.4embree4 +index e317b333f..23834ca7a 100644 +--- a/man/man3/RTC_GEOMETRY_TYPE_POINT.4embree4 ++++ b/man/man3/RTC_GEOMETRY_TYPE_POINT.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "RTC_GEOMETRY_TYPE_*_POINT" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/RTC_GEOMETRY_TYPE_QUAD.4embree4 b/man/man3/RTC_GEOMETRY_TYPE_QUAD.4embree4 +index 811183b32..54cee964d 100644 +--- a/man/man3/RTC_GEOMETRY_TYPE_QUAD.4embree4 ++++ b/man/man3/RTC_GEOMETRY_TYPE_QUAD.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "RTC_GEOMETRY_TYPE_QUAD" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/RTC_GEOMETRY_TYPE_SUBDIVISION.4embree4 b/man/man3/RTC_GEOMETRY_TYPE_SUBDIVISION.4embree4 +index db1fde746..17d4c0ad4 100644 +--- a/man/man3/RTC_GEOMETRY_TYPE_SUBDIVISION.4embree4 ++++ b/man/man3/RTC_GEOMETRY_TYPE_SUBDIVISION.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "RTC_GEOMETRY_TYPE_SUBDIVISION" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/RTC_GEOMETRY_TYPE_TRIANGLE.4embree4 b/man/man3/RTC_GEOMETRY_TYPE_TRIANGLE.4embree4 +index ff1b4a94a..52b61d894 100644 +--- a/man/man3/RTC_GEOMETRY_TYPE_TRIANGLE.4embree4 ++++ b/man/man3/RTC_GEOMETRY_TYPE_TRIANGLE.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "RTC_GEOMETRY_TYPE_TRIANGLE" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/RTC_GEOMETRY_TYPE_USER.4embree4 b/man/man3/RTC_GEOMETRY_TYPE_USER.4embree4 +index fb48aa598..c2f99c748 100644 +--- a/man/man3/RTC_GEOMETRY_TYPE_USER.4embree4 ++++ b/man/man3/RTC_GEOMETRY_TYPE_USER.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "RTC_GEOMETRY_TYPE_USER" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcAttachGeometry.4embree4 b/man/man3/rtcAttachGeometry.4embree4 +index cba90b8ac..952504192 100644 +--- a/man/man3/rtcAttachGeometry.4embree4 ++++ b/man/man3/rtcAttachGeometry.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcAttachGeometry" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcAttachGeometryByID.4embree4 b/man/man3/rtcAttachGeometryByID.4embree4 +index 0416ba7e7..a9948f310 100644 +--- a/man/man3/rtcAttachGeometryByID.4embree4 ++++ b/man/man3/rtcAttachGeometryByID.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcAttachGeometryByID" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcBuildBVH.4embree4 b/man/man3/rtcBuildBVH.4embree4 +index 5244be76c..a51ef6335 100644 +--- a/man/man3/rtcBuildBVH.4embree4 ++++ b/man/man3/rtcBuildBVH.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcBuildBVH" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +@@ -168,7 +182,7 @@ callbacks are passed a thread local allocator object that should be used + for fast allocation of nodes using the \f[C]rtcThreadLocalAlloc\f[R] + function. + We strongly recommend using this allocation mechanism, as alternative +-approaches like standard \f[C]malloc\f[R] can be over 10\[tmu] slower. ++approaches like standard \f[C]malloc\f[R] can be over 10× slower. + The allocator object passed to the create callbacks may be used only + inside the current thread. + Memory allocated using \f[C]rtcThreadLocalAlloc\f[R] is automatically +@@ -205,8 +219,7 @@ the primitive (\f[C]leftBounds\f[R] and \f[C]rightBounds\f[R] + arguments). + .PP + The \f[C]RTCProgressMonitorFunction\f[R] callback function is called +-with the estimated completion rate \f[C]n\f[R] in the range +-[0,\[u2006]1]. ++with the estimated completion rate \f[C]n\f[R] in the range [0,1]. + Returning \f[C]true\f[R] from the callback lets the build continue; + returning \f[C]false\f[R] cancels the build. + .SS EXIT STATUS +diff --git a/man/man3/rtcCollide.4embree4 b/man/man3/rtcCollide.4embree4 +index 0cffc75c4..2b35ff532 100644 +--- a/man/man3/rtcCollide.4embree4 ++++ b/man/man3/rtcCollide.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcCollide" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcCommitGeometry.4embree4 b/man/man3/rtcCommitGeometry.4embree4 +index ea00f5e9f..c0f6ddedc 100644 +--- a/man/man3/rtcCommitGeometry.4embree4 ++++ b/man/man3/rtcCommitGeometry.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcCommitGeometry" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcCommitScene.4embree4 b/man/man3/rtcCommitScene.4embree4 +index cffdd736d..28c3540c8 100644 +--- a/man/man3/rtcCommitScene.4embree4 ++++ b/man/man3/rtcCommitScene.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcCommitScene" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +@@ -56,10 +70,24 @@ construction that would cause numerical issues, e.g.\ primitives + containing NaNs, INFs, or values greater than 1.844E18f (as no + reasonable calculations can be performed with such values without + causing overflows). ++.PP ++In case the RTCDevice associated with the \f[C]scene\f[R] is a SYCL ++device, \f[C]rtcCommitScene\f[R] will internally create a temporary SYCL ++queue to issue memory transfers from host to device memory. ++In this case, the call to \f[C]rtcCommitScene\f[R] will be blocking and ++return only after the memory transfers are completed and SYCL kernels ++can traverse the scene savely on the device. ++The function \f[C]rtcCommitSceneWithQueue\f[R] can be used to commit all ++changes for the specified scene asynchronously. ++Handles to traversal objects (\f[C]RTCTraversable\f[R] type) that have ++been aquired before a call to \f[C]rtcCommitScene\f[R] will be ++invalidated. ++Use \f[C]rtcGetSceneTraversable\f[R] to get a valid handle from the ++scene after every scene commit. + .SS EXIT STATUS + .PP + On failure an error code is set that can be queried using + \f[C]rtcGetDeviceError\f[R]. + .SS SEE ALSO + .PP +-[rtcJoinCommitScene] ++[rtcCommitSceneWithQueue], [rtcJoinCommitScene] +diff --git a/man/man3/rtcDetachGeometry.4embree4 b/man/man3/rtcDetachGeometry.4embree4 +index 12f825ad3..c4c71a16e 100644 +--- a/man/man3/rtcDetachGeometry.4embree4 ++++ b/man/man3/rtcDetachGeometry.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcDetachGeometry" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcDisableGeometry.4embree4 b/man/man3/rtcDisableGeometry.4embree4 +index f01a283b7..b9c5c234b 100644 +--- a/man/man3/rtcDisableGeometry.4embree4 ++++ b/man/man3/rtcDisableGeometry.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcDisableGeometry" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcEnableGeometry.4embree4 b/man/man3/rtcEnableGeometry.4embree4 +index d476d4d9d..b24d7a64f 100644 +--- a/man/man3/rtcEnableGeometry.4embree4 ++++ b/man/man3/rtcEnableGeometry.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcEnableGeometry" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcForwardIntersect1.4embree4 b/man/man3/rtcForwardIntersect1.4embree4 +index 2bccd9624..1c3010173 100644 +--- a/man/man3/rtcForwardIntersect1.4embree4 ++++ b/man/man3/rtcForwardIntersect1.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcForwardIntersect1/Ex" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcForwardIntersect4.4embree4 b/man/man3/rtcForwardIntersect4.4embree4 +index d4c6aa228..bc6c63c41 100644 +--- a/man/man3/rtcForwardIntersect4.4embree4 ++++ b/man/man3/rtcForwardIntersect4.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcForwardIntersect4/8/16/Ex" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcForwardOccluded1.4embree4 b/man/man3/rtcForwardOccluded1.4embree4 +index 7c51a1274..e25a983e0 100644 +--- a/man/man3/rtcForwardOccluded1.4embree4 ++++ b/man/man3/rtcForwardOccluded1.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcForwardOccluded1/Ex" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +@@ -23,7 +37,7 @@ void rtcForwardOccluded1( + unsigned int instID + ); + +-void rtcForwardOccluded1( ++void rtcForwardOccluded1Ex( + const struct RTCOccludedFunctionNArguments* args, + RTCScene scene, + struct RTCRay* ray, +diff --git a/man/man3/rtcForwardOccluded4.4embree4 b/man/man3/rtcForwardOccluded4.4embree4 +index b7c554827..c960e1f2b 100644 +--- a/man/man3/rtcForwardOccluded4.4embree4 ++++ b/man/man3/rtcForwardOccluded4.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcForwardOccluded4/8/16/Ex" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcGetBufferData.4embree4 b/man/man3/rtcGetBufferData.4embree4 +index 6c172c97f..60c72cd6b 100644 +--- a/man/man3/rtcGetBufferData.4embree4 ++++ b/man/man3/rtcGetBufferData.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcGetBufferData" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +@@ -22,10 +36,15 @@ void* rtcGetBufferData(RTCBuffer buffer); + .PP + The \f[C]rtcGetBufferData\f[R] function returns a pointer to the buffer + data of the specified buffer object (\f[C]buffer\f[R] argument). ++If the buffer was created using \f[C]rtcNewBufferHostDevice\f[R] and the ++SYCL device has no host unified memory, this pointer is only valid on ++the host. ++To get a device pointer in this case, use ++\f[C]rtcGetBufferDataDevice\f[R]. + .SS EXIT STATUS + .PP + On failure an error code is set that can be queried using + \f[C]rtcGetDeviceError\f[R]. + .SS SEE ALSO + .PP +-[rtcNewBuffer] ++[rtcGetBufferDataDevice], [rtcNewBuffer], [rtcNewBufferHostDevice] +diff --git a/man/man3/rtcGetDeviceError.4embree4 b/man/man3/rtcGetDeviceError.4embree4 +index 7c5babae3..ce7b8a4a8 100644 +--- a/man/man3/rtcGetDeviceError.4embree4 ++++ b/man/man3/rtcGetDeviceError.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcGetDeviceError" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcGetDeviceLastErrorMessage.4embree4 b/man/man3/rtcGetDeviceLastErrorMessage.4embree4 +index 49cd55498..be5d34c77 100644 +--- a/man/man3/rtcGetDeviceLastErrorMessage.4embree4 ++++ b/man/man3/rtcGetDeviceLastErrorMessage.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcGetDeviceLastErrorMessage" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcGetDeviceProperty.4embree4 b/man/man3/rtcGetDeviceProperty.4embree4 +index c9b5a5c41..197a71ea0 100644 +--- a/man/man3/rtcGetDeviceProperty.4embree4 ++++ b/man/man3/rtcGetDeviceProperty.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcGetDeviceProperty" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcGetErrorString.4embree4 b/man/man3/rtcGetErrorString.4embree4 +index 60f009a2a..33faf475e 100644 +--- a/man/man3/rtcGetErrorString.4embree4 ++++ b/man/man3/rtcGetErrorString.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcGetErrorString" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcGetGeometry.4embree4 b/man/man3/rtcGetGeometry.4embree4 +index d6302b2a0..c278edb53 100644 +--- a/man/man3/rtcGetGeometry.4embree4 ++++ b/man/man3/rtcGetGeometry.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcGetGeometry" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcGetGeometryBufferData.4embree4 b/man/man3/rtcGetGeometryBufferData.4embree4 +index ed0c646c6..cdddf3466 100644 +--- a/man/man3/rtcGetGeometryBufferData.4embree4 ++++ b/man/man3/rtcGetGeometryBufferData.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcGetGeometryBufferData" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +@@ -29,11 +43,16 @@ The \f[C]rtcGetGeometryBufferData\f[R] function returns a pointer to the + first element of the buffer view attached to the specified buffer type + and slot (\f[C]type\f[R] and \f[C]slot\f[R] argument) of the geometry + (\f[C]geometry\f[R] argument). +-.SS EXIT STATUS ++.PP ++If the device associated with \f[C]geometry\f[R] is a SYCL device, the ++returned pointer only accessible on the host. ++The function \f[C]rtcGetGeometryBufferDataDevice\f[R] can be used to get ++a pointer accessible on the SYCL device. ++#### EXIT STATUS + .PP + On failure an error code is set that can be queried using + \f[C]rtcGetDeviceError\f[R]. + .SS SEE ALSO + .PP +-[rtcSetGeometryBuffer], [rtcSetSharedGeometryBuffer], +-[rtcSetNewGeometryBuffer] ++[rtcGetGeometryBufferDataDevice], [rtcSetGeometryBuffer], ++[rtcSetSharedGeometryBuffer], [rtcSetNewGeometryBuffer] +diff --git a/man/man3/rtcGetGeometryFace.4embree4 b/man/man3/rtcGetGeometryFace.4embree4 +index c028541ff..9314d91f4 100644 +--- a/man/man3/rtcGetGeometryFace.4embree4 ++++ b/man/man3/rtcGetGeometryFace.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcGetGeometryFace" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcGetGeometryFirstHalfEdge.4embree4 b/man/man3/rtcGetGeometryFirstHalfEdge.4embree4 +index ca35bb10d..d24b6cff4 100644 +--- a/man/man3/rtcGetGeometryFirstHalfEdge.4embree4 ++++ b/man/man3/rtcGetGeometryFirstHalfEdge.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcGetGeometryFirstHalfEdge" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcGetGeometryNextHalfEdge.4embree4 b/man/man3/rtcGetGeometryNextHalfEdge.4embree4 +index e4e773e67..02323c4ca 100644 +--- a/man/man3/rtcGetGeometryNextHalfEdge.4embree4 ++++ b/man/man3/rtcGetGeometryNextHalfEdge.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcGetGeometryNextHalfEdge" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcGetGeometryOppositeHalfEdge.4embree4 b/man/man3/rtcGetGeometryOppositeHalfEdge.4embree4 +index c4188c154..1ad5c8407 100644 +--- a/man/man3/rtcGetGeometryOppositeHalfEdge.4embree4 ++++ b/man/man3/rtcGetGeometryOppositeHalfEdge.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcGetGeometryOppositeHalfEdge" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcGetGeometryPreviousHalfEdge.4embree4 b/man/man3/rtcGetGeometryPreviousHalfEdge.4embree4 +index 4efefa044..54d205fd2 100644 +--- a/man/man3/rtcGetGeometryPreviousHalfEdge.4embree4 ++++ b/man/man3/rtcGetGeometryPreviousHalfEdge.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcGetGeometryPreviousHalfEdge" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcGetGeometryThreadSafe.4embree4 b/man/man3/rtcGetGeometryThreadSafe.4embree4 +index 754c737c9..fcee8fb5d 100644 +--- a/man/man3/rtcGetGeometryThreadSafe.4embree4 ++++ b/man/man3/rtcGetGeometryThreadSafe.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcGetGeometryThreadSafe" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcGetGeometryTransform.4embree4 b/man/man3/rtcGetGeometryTransform.4embree4 +index c1c7babb6..05ceeb69e 100644 +--- a/man/man3/rtcGetGeometryTransform.4embree4 ++++ b/man/man3/rtcGetGeometryTransform.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcGetGeometryTransform" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +@@ -29,20 +43,20 @@ void rtcGetGeometryTransform( + The \f[C]rtcGetGeometryTransform\f[R] function returns the interpolated + local to world transformation (\f[C]xfm\f[R] parameter) of an instance + geometry (\f[C]geometry\f[R] parameter) for a particular time +-(\f[C]time\f[R] parameter in range [0,\[u2006]1]) in the specified +-format (\f[C]format\f[R] parameter). ++(\f[C]time\f[R] parameter in range [0,1]) in the specified format ++(\f[C]format\f[R] parameter). + .PP + Possible formats for the returned matrix are: + .IP \[bu] 2 +-\f[C]RTC_FORMAT_FLOAT3X4_ROW_MAJOR\f[R]: The 3\[tmu]4 float matrix is +-laid out in row-major form. ++\f[C]RTC_FORMAT_FLOAT3X4_ROW_MAJOR\f[R]: The 3×4 float matrix is laid ++out in row-major form. + .IP \[bu] 2 +-\f[C]RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR\f[R]: The 3\[tmu]4 float matrix is +-laid out in column-major form. ++\f[C]RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR\f[R]: The 3×4 float matrix is laid ++out in column-major form. + .IP \[bu] 2 +-\f[C]RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR\f[R]: The 3\[tmu]4 float matrix is +-laid out in column-major form as a 4\[tmu]4 homogeneous matrix with last +-row equal to (0, 0, 0, 1). ++\f[C]RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR\f[R]: The 3×4 float matrix is laid ++out in column-major form as a 4×4 homogeneous matrix with last row equal ++to (0, 0, 0, 1). + .PP + This function is supposed to be used during rendering, but only + supported on the CPU and not inside SYCL kernels on the GPU. +diff --git a/man/man3/rtcGetGeometryTransformEx.4embree4 b/man/man3/rtcGetGeometryTransformEx.4embree4 +index fbcca2795..cfd018661 100644 +--- a/man/man3/rtcGetGeometryTransformEx.4embree4 ++++ b/man/man3/rtcGetGeometryTransformEx.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcGetGeometryTransformEx" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +@@ -32,22 +46,22 @@ The \f[C]rtcGetGeometryTransformEx\f[R] function returns the + interpolated local to world transformation (\f[C]xfm\f[R] parameter) of + the \f[C]instPrimID\f[R]-th instance of an instance array geometry + (\f[C]geometry\f[R] parameter) for a particular time (\f[C]time\f[R] +-parameter in range [0,\[u2006]1]) in the specified format +-(\f[C]format\f[R] parameter). ++parameter in range [0,1]) in the specified format (\f[C]format\f[R] ++parameter). + The function can also be used when \f[C]geometry\f[R] refers to a + regular instance, but then the \f[C]instPrimID\f[R] has to be 0. + .PP + Possible formats for the returned matrix are: + .IP \[bu] 2 +-\f[C]RTC_FORMAT_FLOAT3X4_ROW_MAJOR\f[R]: The 3\[tmu]4 float matrix is +-laid out in row-major form. ++\f[C]RTC_FORMAT_FLOAT3X4_ROW_MAJOR\f[R]: The 3×4 float matrix is laid ++out in row-major form. + .IP \[bu] 2 +-\f[C]RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR\f[R]: The 3\[tmu]4 float matrix is +-laid out in column-major form. ++\f[C]RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR\f[R]: The 3×4 float matrix is laid ++out in column-major form. + .IP \[bu] 2 +-\f[C]RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR\f[R]: The 3\[tmu]4 float matrix is +-laid out in column-major form as a 4\[tmu]4 homogeneous matrix with last +-row equal to (0, 0, 0, 1). ++\f[C]RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR\f[R]: The 3×4 float matrix is laid ++out in column-major form as a 4×4 homogeneous matrix with last row equal ++to (0, 0, 0, 1). + .SS EXIT STATUS + .PP + On failure an error code is set that can be queried using +diff --git a/man/man3/rtcGetGeometryTransformFromScene.4embree4 b/man/man3/rtcGetGeometryTransformFromScene.4embree4 +index e7dac37a4..a00f18b14 100644 +--- a/man/man3/rtcGetGeometryTransformFromScene.4embree4 ++++ b/man/man3/rtcGetGeometryTransformFromScene.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcGetGeometryTransformFromScene" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +@@ -31,20 +45,20 @@ The \f[C]rtcGetGeometryTransformFromScene\f[R] function returns the + interpolated local to world transformation (\f[C]xfm\f[R] output + parameter) of an instance geometry specified by its geometry ID + (\f[C]geomID\f[R] parameter) of a scene (\f[C]scene\f[R] parameter) for +-a particular time (\f[C]time\f[R] parameter in range [0,\[u2006]1]) in +-the specified format (\f[C]format\f[R] parameter). ++a particular time (\f[C]time\f[R] parameter in range [0,1]) in the ++specified format (\f[C]format\f[R] parameter). + .PP + Possible formats for the returned matrix are: + .IP \[bu] 2 +-\f[C]RTC_FORMAT_FLOAT3X4_ROW_MAJOR\f[R]: The 3\[tmu]4 float matrix is +-laid out in row-major form. ++\f[C]RTC_FORMAT_FLOAT3X4_ROW_MAJOR\f[R]: The 3×4 float matrix is laid ++out in row-major form. + .IP \[bu] 2 +-\f[C]RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR\f[R]: The 3\[tmu]4 float matrix is +-laid out in column-major form. ++\f[C]RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR\f[R]: The 3×4 float matrix is laid ++out in column-major form. + .IP \[bu] 2 +-\f[C]RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR\f[R]: The 3\[tmu]4 float matrix is +-laid out in column-major form as a 4\[tmu]4 homogeneous matrix with last +-row equal to (0, 0, 0, 1). ++\f[C]RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR\f[R]: The 3×4 float matrix is laid ++out in column-major form as a 4×4 homogeneous matrix with last row equal ++to (0, 0, 0, 1). + .PP + In contrast to the \f[C]rtcGetGeometryTransform\f[R] function, the + \f[C]rtcGetGeometryTransformFromScene\f[R] function can get used during +diff --git a/man/man3/rtcGetGeometryUserData.4embree4 b/man/man3/rtcGetGeometryUserData.4embree4 +index 25be9eb47..3440106ae 100644 +--- a/man/man3/rtcGetGeometryUserData.4embree4 ++++ b/man/man3/rtcGetGeometryUserData.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcGetGeometryUserData" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcGetGeometryUserDataFromScene.4embree4 b/man/man3/rtcGetGeometryUserDataFromScene.4embree4 +index d87f328bd..e047a28b1 100644 +--- a/man/man3/rtcGetGeometryUserDataFromScene.4embree4 ++++ b/man/man3/rtcGetGeometryUserDataFromScene.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcGetGeometryUserDataFromScene" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcGetSYCLDeviceFunctionPointer.4embree4 b/man/man3/rtcGetSYCLDeviceFunctionPointer.4embree4 +index b5c4e8028..97f8384c9 100644 +--- a/man/man3/rtcGetSYCLDeviceFunctionPointer.4embree4 ++++ b/man/man3/rtcGetSYCLDeviceFunctionPointer.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcGetSYCLDeviceFunctionPointer" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcGetSceneBounds.4embree4 b/man/man3/rtcGetSceneBounds.4embree4 +index 16ab0b5a0..72bc0ec54 100644 +--- a/man/man3/rtcGetSceneBounds.4embree4 ++++ b/man/man3/rtcGetSceneBounds.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcGetSceneBounds" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcGetSceneDevice.4embree4 b/man/man3/rtcGetSceneDevice.4embree4 +index fe57d73ad..bb021bef1 100644 +--- a/man/man3/rtcGetSceneDevice.4embree4 ++++ b/man/man3/rtcGetSceneDevice.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcGetSceneDevice" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcGetSceneFlags.4embree4 b/man/man3/rtcGetSceneFlags.4embree4 +index 697712b54..272e5eaad 100644 +--- a/man/man3/rtcGetSceneFlags.4embree4 ++++ b/man/man3/rtcGetSceneFlags.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcGetSceneFlags" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcGetSceneLinearBounds.4embree4 b/man/man3/rtcGetSceneLinearBounds.4embree4 +index 1ace4da4b..c0c572980 100644 +--- a/man/man3/rtcGetSceneLinearBounds.4embree4 ++++ b/man/man3/rtcGetSceneLinearBounds.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcGetSceneLinearBounds" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcInitIntersectArguments.4embree4 b/man/man3/rtcInitIntersectArguments.4embree4 +index 3813dc44b..bed659ebc 100644 +--- a/man/man3/rtcInitIntersectArguments.4embree4 ++++ b/man/man3/rtcInitIntersectArguments.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcInitIntersectArguments" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcInitOccludedArguments.4embree4 b/man/man3/rtcInitOccludedArguments.4embree4 +index f7539cce0..006efb5fa 100644 +--- a/man/man3/rtcInitOccludedArguments.4embree4 ++++ b/man/man3/rtcInitOccludedArguments.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcInitOccludedArguments" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcInitPointQueryContext.4embree4 b/man/man3/rtcInitPointQueryContext.4embree4 +index 31c0782e4..ad2fb26c6 100644 +--- a/man/man3/rtcInitPointQueryContext.4embree4 ++++ b/man/man3/rtcInitPointQueryContext.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcInitPointQueryContext" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +@@ -40,8 +54,8 @@ void rtcInitPointQueryContext( + .PP + A stack (\f[C]RTCPointQueryContext\f[R] type) which stores the IDs and + instance transformations during a BVH traversal for a point query. +-The transformations are assumed to be affine transformations (3\[tmu]3 +-matrix plus translation) and therefore the last column is ignored (see ++The transformations are assumed to be affine transformations (3×3 matrix ++plus translation) and therefore the last column is ignored (see + [RTC_GEOMETRY_TYPE_INSTANCE] for details). + .PP + The \f[C]rtcInitPointContext\f[R] function initializes the context to +diff --git a/man/man3/rtcInitQuaternionDecomposition.4embree4 b/man/man3/rtcInitQuaternionDecomposition.4embree4 +index 43ebb8b9f..4c0f78af0 100644 +--- a/man/man3/rtcInitQuaternionDecomposition.4embree4 ++++ b/man/man3/rtcInitQuaternionDecomposition.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcInitQuaternionDecomposition" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcInitRayQueryContext.4embree4 b/man/man3/rtcInitRayQueryContext.4embree4 +index 79fb601a0..1dc8e7f16 100644 +--- a/man/man3/rtcInitRayQueryContext.4embree4 ++++ b/man/man3/rtcInitRayQueryContext.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcInitRayQueryContext" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcInterpolate.4embree4 b/man/man3/rtcInterpolate.4embree4 +index e1d05ae34..43127eccc 100644 +--- a/man/man3/rtcInterpolate.4embree4 ++++ b/man/man3/rtcInterpolate.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcInterpolate" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcInterpolateN.4embree4 b/man/man3/rtcInterpolateN.4embree4 +index b124f32f6..ab2eeed90 100644 +--- a/man/man3/rtcInterpolateN.4embree4 ++++ b/man/man3/rtcInterpolateN.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcInterpolateN" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcIntersect1.4embree4 b/man/man3/rtcIntersect1.4embree4 +index 4abc597b5..e562701eb 100644 +--- a/man/man3/rtcIntersect1.4embree4 ++++ b/man/man3/rtcIntersect1.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcIntersect1" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +@@ -40,9 +54,8 @@ ray member), and set the ray flags to \f[C]0\f[R] (\f[C]flags\f[R] ray + member). + The ray time (\f[C]time\f[R] ray member) must be initialized to a value + in the range $[0, 1]. +-The ray segment has to be in the range [0,\[u2006]\[if]], thus ranges +-that start behind the ray origin are not valid, but ranges can reach to +-infinity. ++The ray segment has to be in the range [0,∞], thus ranges that start ++behind the ray origin are not valid, but ranges can reach to infinity. + See Section [RTCRay] for the ray layout description. + .PP + The geometry ID (\f[C]geomID\f[R] hit member) of the hit data must be +diff --git a/man/man3/rtcIntersect4.4embree4 b/man/man3/rtcIntersect4.4embree4 +index 55fbee7a2..10fe6559e 100644 +--- a/man/man3/rtcIntersect4.4embree4 ++++ b/man/man3/rtcIntersect4.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcIntersect4/8/16" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcInvokeIntersectFilterFromGeometry.4embree4 b/man/man3/rtcInvokeIntersectFilterFromGeometry.4embree4 +index 2f9336af0..b76869420 100644 +--- a/man/man3/rtcInvokeIntersectFilterFromGeometry.4embree4 ++++ b/man/man3/rtcInvokeIntersectFilterFromGeometry.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcInvokeIntersectFilterFromGeometry" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcInvokeOccludedFilterFromGeometry.4embree4 b/man/man3/rtcInvokeOccludedFilterFromGeometry.4embree4 +index 4f4f4b1a7..ce7af0740 100644 +--- a/man/man3/rtcInvokeOccludedFilterFromGeometry.4embree4 ++++ b/man/man3/rtcInvokeOccludedFilterFromGeometry.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcInvokeOccludedFilterFromGeometry" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcIsSYCLDeviceSupported.4embree4 b/man/man3/rtcIsSYCLDeviceSupported.4embree4 +index 0fab577ce..99ffdb8cc 100644 +--- a/man/man3/rtcIsSYCLDeviceSupported.4embree4 ++++ b/man/man3/rtcIsSYCLDeviceSupported.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcIsSYCLDeviceSupported" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcJoinCommitScene.4embree4 b/man/man3/rtcJoinCommitScene.4embree4 +index 2a6396f05..09b9ef732 100644 +--- a/man/man3/rtcJoinCommitScene.4embree4 ++++ b/man/man3/rtcJoinCommitScene.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcJoinCommitScene" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +@@ -57,10 +71,10 @@ Multiple scene commit operations on different scenes can be running at + the same time, hence it is possible to commit many small scenes in + parallel, distributing the commits to many threads. + .PP +-When using Embree with the Intel\[rg] Threading Building Blocks (which +-is the default), threads that call \f[C]rtcJoinCommitScene\f[R] will +-join the build operation, but other TBB worker threads might also +-participate in the build. ++When using Embree with the Intel® Threading Building Blocks (which is ++the default), threads that call \f[C]rtcJoinCommitScene\f[R] will join ++the build operation, but other TBB worker threads might also participate ++in the build. + To avoid thread oversubscription, we recommend using TBB also inside the + application. + Further, the join mode only works properly starting with TBB v4.4 Update +diff --git a/man/man3/rtcNewBVH.4embree4 b/man/man3/rtcNewBVH.4embree4 +index e748607ab..bf13bfeb2 100644 +--- a/man/man3/rtcNewBVH.4embree4 ++++ b/man/man3/rtcNewBVH.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcNewBVH" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcNewBuffer.4embree4 b/man/man3/rtcNewBuffer.4embree4 +index 228fcf159..75ae489f8 100644 +--- a/man/man3/rtcNewBuffer.4embree4 ++++ b/man/man3/rtcNewBuffer.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcNewBuffer" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +@@ -37,10 +51,18 @@ and deallocated when the buffer is destroyed. + \f[C] + \f[R] + .fi ++.PP ++If the \f[C]device\f[R] is a Embree SYCL device, the buffer will be ++allocated using SYCL USM shared memory, i.e.\ the buffer can be accessed ++on the host and device (GPU) and the SYCL runtime will handle buffer ++transfers automatically. ++.PP ++For precise control over when memory is copied from host to device, a ++buffer can also be created using \f[C]rtcNewBufferHostDevice\f[R]. + .SS EXIT STATUS + .PP + On failure \f[C]NULL\f[R] is returned and an error code is set that can + be queried using \f[C]rtcGetDeviceError\f[R]. + .SS SEE ALSO + .PP +-[rtcRetainBuffer], [rtcReleaseBuffer] ++[rtcNewBufferHostDevice], [rtcRetainBuffer], [rtcReleaseBuffer] +diff --git a/man/man3/rtcNewDevice.4embree4 b/man/man3/rtcNewDevice.4embree4 +index 2c7e7fa69..8746c06d2 100644 +--- a/man/man3/rtcNewDevice.4embree4 ++++ b/man/man3/rtcNewDevice.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcNewDevice" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +@@ -28,9 +42,9 @@ The handle can be released using the \f[C]rtcReleaseDevice\f[R] API + call. + .PP + The device object acts as a class factory for all other object types. +-All objects created from the device (like scenes, geometries, etc.) hold +-a reference to the device, thus the device will not be destroyed unless +-these objects are destroyed first. ++All objects created from the device (like scenes, geometries, etc.) ++hold a reference to the device, thus the device will not be destroyed ++unless these objects are destroyed first. + .PP + Objects are only compatible if they belong to the same device, e.g it is + not allowed to create a geometry in one device and attach it to a scene +diff --git a/man/man3/rtcNewGeometry.4embree4 b/man/man3/rtcNewGeometry.4embree4 +index 5de74ed7e..0fa856a62 100644 +--- a/man/man3/rtcNewGeometry.4embree4 ++++ b/man/man3/rtcNewGeometry.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcNewGeometry" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcNewSYCLDevice.4embree4 b/man/man3/rtcNewSYCLDevice.4embree4 +index bfde39b70..1b46d5a1d 100644 +--- a/man/man3/rtcNewSYCLDevice.4embree4 ++++ b/man/man3/rtcNewSYCLDevice.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcNewSYCLDevice" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +@@ -35,9 +49,9 @@ context, but this behavior can get changed with the + [rtcSetDeviceSYCLDevice] function. + .PP + The device object acts as a class factory for all other object types. +-All objects created from the device (like scenes, geometries, etc.) hold +-a reference to the device, thus the device will not be destroyed unless +-these objects are destroyed first. ++All objects created from the device (like scenes, geometries, etc.) ++hold a reference to the device, thus the device will not be destroyed ++unless these objects are destroyed first. + .PP + Objects are only compatible if they belong to the same device, e.g it is + not allowed to create a geometry in one device and attach it to a scene +diff --git a/man/man3/rtcNewScene.4embree4 b/man/man3/rtcNewScene.4embree4 +index 258aa7a2d..fac3e7f2d 100644 +--- a/man/man3/rtcNewScene.4embree4 ++++ b/man/man3/rtcNewScene.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcNewScene" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcNewSharedBuffer.4embree4 b/man/man3/rtcNewSharedBuffer.4embree4 +index a47949b91..dd602a14b 100644 +--- a/man/man3/rtcNewSharedBuffer.4embree4 ++++ b/man/man3/rtcNewSharedBuffer.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcNewSharedBuffer" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +@@ -53,4 +67,4 @@ On failure \f[C]NULL\f[R] is returned and an error code is set that can + be queried using \f[C]rtcGetDeviceError\f[R]. + .SS SEE ALSO + .PP +-[rtcRetainBuffer], [rtcReleaseBuffer] ++[rtcNewSharedBufferHostDevice], [rtcRetainBuffer], [rtcReleaseBuffer] +diff --git a/man/man3/rtcOccluded1.4embree4 b/man/man3/rtcOccluded1.4embree4 +index c33e38d9a..842c6192b 100644 +--- a/man/man3/rtcOccluded1.4embree4 ++++ b/man/man3/rtcOccluded1.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcOccluded1" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +@@ -37,10 +51,9 @@ ray member), ray direction (\f[C]dir\f[R] ray member), ray segment + ray member), and must set the ray flags to \f[C]0\f[R] (\f[C]flags\f[R] + ray member). + The ray time (\f[C]time\f[R] ray member) must be initialized to a value +-in the range [0,\[u2006]1]. +-The ray segment must be in the range [0,\[u2006]\[if]], thus ranges that +-start behind the ray origin are not valid, but ranges can reach to +-infinity. ++in the range [0,1]. ++The ray segment must be in the range [0,∞], thus ranges that start ++behind the ray origin are not valid, but ranges can reach to infinity. + See Section [RTCRay] for the ray layout description. + .PP + When no intersection is found, the ray data is not updated. +diff --git a/man/man3/rtcOccluded4.4embree4 b/man/man3/rtcOccluded4.4embree4 +index e63544d40..0241e26bc 100644 +--- a/man/man3/rtcOccluded4.4embree4 ++++ b/man/man3/rtcOccluded4.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcOccluded4/8/16" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcPointQuery.4embree4 b/man/man3/rtcPointQuery.4embree4 +index b9342de00..1da0039c2 100644 +--- a/man/man3/rtcPointQuery.4embree4 ++++ b/man/man3/rtcPointQuery.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcPointQuery" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +@@ -45,10 +59,10 @@ each primitive of the scene (\f[C]scene\f[R] argument) that intersects + the query domain. + .PP + The user has to initialize the query location (\f[C]x\f[R], \f[C]y\f[R] +-and \f[C]z\f[R] member) and query radius in the range [0,\[u2006]\[if]]. ++and \f[C]z\f[R] member) and query radius in the range [0,∞]. + If the scene contains motion blur geometries, also the query time + (\f[C]time\f[R] member) must be initialized to a value in the range +-[0,\[u2006]1]. ++[0,1]. + .PP + Further, a \f[C]RTCPointQueryContext\f[R] (\f[C]context\f[R] argument) + must be created and initialized. +diff --git a/man/man3/rtcPointQuery4.4embree4 b/man/man3/rtcPointQuery4.4embree4 +index cc3a27ce4..01c763a08 100644 +--- a/man/man3/rtcPointQuery4.4embree4 ++++ b/man/man3/rtcPointQuery4.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcPointQuery" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcReleaseBVH.4embree4 b/man/man3/rtcReleaseBVH.4embree4 +index 48197b442..31e255145 100644 +--- a/man/man3/rtcReleaseBVH.4embree4 ++++ b/man/man3/rtcReleaseBVH.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcReleaseBVH" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcReleaseBuffer.4embree4 b/man/man3/rtcReleaseBuffer.4embree4 +index fbfdef0c6..81da875b4 100644 +--- a/man/man3/rtcReleaseBuffer.4embree4 ++++ b/man/man3/rtcReleaseBuffer.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcReleaseBuffer" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcReleaseDevice.4embree4 b/man/man3/rtcReleaseDevice.4embree4 +index a2529f5e6..1c5c5664e 100644 +--- a/man/man3/rtcReleaseDevice.4embree4 ++++ b/man/man3/rtcReleaseDevice.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcReleaseDevice" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +@@ -25,9 +39,9 @@ The \f[C]rtcReleaseDevice\f[R] function decrements the reference count + of the passed device object (\f[C]device\f[R] argument). + When the reference count falls to 0, the device gets destroyed. + .PP +-All objects created from the device (like scenes, geometries, etc.) hold +-a reference to the device, thus the device will not get destroyed unless +-these objects are destroyed first. ++All objects created from the device (like scenes, geometries, etc.) ++hold a reference to the device, thus the device will not get destroyed ++unless these objects are destroyed first. + .SS EXIT STATUS + .PP + On failure an error code is set that can be queried using +diff --git a/man/man3/rtcReleaseGeometry.4embree4 b/man/man3/rtcReleaseGeometry.4embree4 +index dc2f21487..8f949a3c0 100644 +--- a/man/man3/rtcReleaseGeometry.4embree4 ++++ b/man/man3/rtcReleaseGeometry.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcReleaseGeometry" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcReleaseScene.4embree4 b/man/man3/rtcReleaseScene.4embree4 +index bd6340f24..8352dffb7 100644 +--- a/man/man3/rtcReleaseScene.4embree4 ++++ b/man/man3/rtcReleaseScene.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcReleaseScene" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcRetainBVH.4embree4 b/man/man3/rtcRetainBVH.4embree4 +index b0ca81608..e6a90eea4 100644 +--- a/man/man3/rtcRetainBVH.4embree4 ++++ b/man/man3/rtcRetainBVH.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcRetainBVH" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcRetainBuffer.4embree4 b/man/man3/rtcRetainBuffer.4embree4 +index 87269a348..a15d9fb6b 100644 +--- a/man/man3/rtcRetainBuffer.4embree4 ++++ b/man/man3/rtcRetainBuffer.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcRetainBuffer" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcRetainDevice.4embree4 b/man/man3/rtcRetainDevice.4embree4 +index 11cd2d527..d449fa8c2 100644 +--- a/man/man3/rtcRetainDevice.4embree4 ++++ b/man/man3/rtcRetainDevice.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcRetainDevice" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcRetainGeometry.4embree4 b/man/man3/rtcRetainGeometry.4embree4 +index f469d97ec..73d42bf57 100644 +--- a/man/man3/rtcRetainGeometry.4embree4 ++++ b/man/man3/rtcRetainGeometry.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcRetainGeometry" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcRetainScene.4embree4 b/man/man3/rtcRetainScene.4embree4 +index 2337265d9..a4e71a143 100644 +--- a/man/man3/rtcRetainScene.4embree4 ++++ b/man/man3/rtcRetainScene.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcRetainScene" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSYCLDeviceSelector.4embree4 b/man/man3/rtcSYCLDeviceSelector.4embree4 +index 20e197ae3..dac3e5754 100644 +--- a/man/man3/rtcSYCLDeviceSelector.4embree4 ++++ b/man/man3/rtcSYCLDeviceSelector.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSYCLDeviceSelector" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetDeviceErrorFunction.4embree4 b/man/man3/rtcSetDeviceErrorFunction.4embree4 +index 169e565d7..250cdd220 100644 +--- a/man/man3/rtcSetDeviceErrorFunction.4embree4 ++++ b/man/man3/rtcSetDeviceErrorFunction.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetDeviceErrorFunction" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetDeviceMemoryMonitorFunction.4embree4 b/man/man3/rtcSetDeviceMemoryMonitorFunction.4embree4 +index 2d5bc8ba7..2c89c6965 100644 +--- a/man/man3/rtcSetDeviceMemoryMonitorFunction.4embree4 ++++ b/man/man3/rtcSetDeviceMemoryMonitorFunction.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetDeviceMemoryMonitorFunction" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetDeviceSYCLDevice.4embree4 b/man/man3/rtcSetDeviceSYCLDevice.4embree4 +index 567269b9d..ac32f36b0 100644 +--- a/man/man3/rtcSetDeviceSYCLDevice.4embree4 ++++ b/man/man3/rtcSetDeviceSYCLDevice.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetDeviceSYCLDevice" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetGeometryBoundsFunction.4embree4 b/man/man3/rtcSetGeometryBoundsFunction.4embree4 +index 356cf9719..9a1cca46a 100644 +--- a/man/man3/rtcSetGeometryBoundsFunction.4embree4 ++++ b/man/man3/rtcSetGeometryBoundsFunction.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetGeometryBoundsFunction" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetGeometryBuffer.4embree4 b/man/man3/rtcSetGeometryBuffer.4embree4 +index 1de68798d..a8956f128 100644 +--- a/man/man3/rtcSetGeometryBuffer.4embree4 ++++ b/man/man3/rtcSetGeometryBuffer.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetGeometryBuffer" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetGeometryBuildQuality.4embree4 b/man/man3/rtcSetGeometryBuildQuality.4embree4 +index 0c16ed6fa..10e568b78 100644 +--- a/man/man3/rtcSetGeometryBuildQuality.4embree4 ++++ b/man/man3/rtcSetGeometryBuildQuality.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetGeometryBuildQuality" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetGeometryDisplacementFunction.4embree4 b/man/man3/rtcSetGeometryDisplacementFunction.4embree4 +index df37187e8..7f7453ca2 100644 +--- a/man/man3/rtcSetGeometryDisplacementFunction.4embree4 ++++ b/man/man3/rtcSetGeometryDisplacementFunction.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetGeometryDisplacementFunction" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetGeometryEnableFilterFunctionFromArguments.4embree4 b/man/man3/rtcSetGeometryEnableFilterFunctionFromArguments.4embree4 +index 7bd70c50b..63cb1bbcb 100644 +--- a/man/man3/rtcSetGeometryEnableFilterFunctionFromArguments.4embree4 ++++ b/man/man3/rtcSetGeometryEnableFilterFunctionFromArguments.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetGeometryEnableFilterFunctionFromArguments" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetGeometryInstancedScene.4embree4 b/man/man3/rtcSetGeometryInstancedScene.4embree4 +index 81c442151..e9cc89419 100644 +--- a/man/man3/rtcSetGeometryInstancedScene.4embree4 ++++ b/man/man3/rtcSetGeometryInstancedScene.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetGeometryInstancedScene" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetGeometryInstancedScenes.4embree4 b/man/man3/rtcSetGeometryInstancedScenes.4embree4 +index 39ad0accc..3d193282e 100644 +--- a/man/man3/rtcSetGeometryInstancedScenes.4embree4 ++++ b/man/man3/rtcSetGeometryInstancedScenes.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetGeometryInstancedScenes" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetGeometryIntersectFilterFunction.4embree4 b/man/man3/rtcSetGeometryIntersectFilterFunction.4embree4 +index 8224e208f..0ef1d2de6 100644 +--- a/man/man3/rtcSetGeometryIntersectFilterFunction.4embree4 ++++ b/man/man3/rtcSetGeometryIntersectFilterFunction.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetGeometryIntersectFilterFunction" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetGeometryIntersectFunction.4embree4 b/man/man3/rtcSetGeometryIntersectFunction.4embree4 +index f57f9bda5..3870fc489 100644 +--- a/man/man3/rtcSetGeometryIntersectFunction.4embree4 ++++ b/man/man3/rtcSetGeometryIntersectFunction.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetGeometryIntersectFunction" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetGeometryMask.4embree4 b/man/man3/rtcSetGeometryMask.4embree4 +index 0afc34f74..d4b94176c 100644 +--- a/man/man3/rtcSetGeometryMask.4embree4 ++++ b/man/man3/rtcSetGeometryMask.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetGeometryMask" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetGeometryMaxRadiusScale.4embree4 b/man/man3/rtcSetGeometryMaxRadiusScale.4embree4 +index 5707b09a5..ecbf135f8 100644 +--- a/man/man3/rtcSetGeometryMaxRadiusScale.4embree4 ++++ b/man/man3/rtcSetGeometryMaxRadiusScale.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetGeometryMaxRadiusScale" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetGeometryOccludedFilterFunction.4embree4 b/man/man3/rtcSetGeometryOccludedFilterFunction.4embree4 +index b97403212..50872c04d 100644 +--- a/man/man3/rtcSetGeometryOccludedFilterFunction.4embree4 ++++ b/man/man3/rtcSetGeometryOccludedFilterFunction.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetGeometryOccludedFilterFunction" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetGeometryOccludedFunction.4embree4 b/man/man3/rtcSetGeometryOccludedFunction.4embree4 +index e52cc69bd..7aba7d077 100644 +--- a/man/man3/rtcSetGeometryOccludedFunction.4embree4 ++++ b/man/man3/rtcSetGeometryOccludedFunction.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetGeometryOccludedFunction" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetGeometryPointQueryFunction.4embree4 b/man/man3/rtcSetGeometryPointQueryFunction.4embree4 +index 0f7d81ed4..86e7892d9 100644 +--- a/man/man3/rtcSetGeometryPointQueryFunction.4embree4 ++++ b/man/man3/rtcSetGeometryPointQueryFunction.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetGeometryPointQueryFunction" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetGeometrySubdivisionMode.4embree4 b/man/man3/rtcSetGeometrySubdivisionMode.4embree4 +index 6cb133b2f..90d50de7e 100644 +--- a/man/man3/rtcSetGeometrySubdivisionMode.4embree4 ++++ b/man/man3/rtcSetGeometrySubdivisionMode.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetGeometrySubdivisionMode" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetGeometryTessellationRate.4embree4 b/man/man3/rtcSetGeometryTessellationRate.4embree4 +index fdcd83ad1..72b0af969 100644 +--- a/man/man3/rtcSetGeometryTessellationRate.4embree4 ++++ b/man/man3/rtcSetGeometryTessellationRate.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetGeometryTessellationRate" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetGeometryTimeRange.4embree4 b/man/man3/rtcSetGeometryTimeRange.4embree4 +index 11c7de35a..baded5a43 100644 +--- a/man/man3/rtcSetGeometryTimeRange.4embree4 ++++ b/man/man3/rtcSetGeometryTimeRange.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetGeometryTimeRange" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetGeometryTimeStepCount.4embree4 b/man/man3/rtcSetGeometryTimeStepCount.4embree4 +index ed3a6e352..06074ee46 100644 +--- a/man/man3/rtcSetGeometryTimeStepCount.4embree4 ++++ b/man/man3/rtcSetGeometryTimeStepCount.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetGeometryTimeStepCount" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetGeometryTopologyCount.4embree4 b/man/man3/rtcSetGeometryTopologyCount.4embree4 +index 1dab04ae6..9485d6086 100644 +--- a/man/man3/rtcSetGeometryTopologyCount.4embree4 ++++ b/man/man3/rtcSetGeometryTopologyCount.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetGeometryTimeStepCount" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetGeometryTransform.4embree4 b/man/man3/rtcSetGeometryTransform.4embree4 +index ef0db660f..8f9c9ec31 100644 +--- a/man/man3/rtcSetGeometryTransform.4embree4 ++++ b/man/man3/rtcSetGeometryTransform.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetGeometryTransform" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +@@ -30,19 +44,19 @@ The \f[C]rtcSetGeometryTransform\f[R] function sets the local-to-world + affine transformation (\f[C]xfm\f[R] parameter) of an instance geometry + (\f[C]geometry\f[R] parameter) for a particular time step + (\f[C]timeStep\f[R] parameter). +-The transformation is specified as a 3\[tmu]4 matrix (3\[tmu]3 linear ++The transformation is specified as a 3×4 matrix (3×3 linear + transformation plus translation), for which the following formats + (\f[C]format\f[R] parameter) are supported: + .IP \[bu] 2 +-\f[C]RTC_FORMAT_FLOAT3X4_ROW_MAJOR\f[R]: The 3\[tmu]4 float matrix is +-laid out in row-major form. ++\f[C]RTC_FORMAT_FLOAT3X4_ROW_MAJOR\f[R]: The 3×4 float matrix is laid ++out in row-major form. + .IP \[bu] 2 +-\f[C]RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR\f[R]: The 3\[tmu]4 float matrix is +-laid out in column-major form. ++\f[C]RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR\f[R]: The 3×4 float matrix is laid ++out in column-major form. + .IP \[bu] 2 +-\f[C]RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR\f[R]: The 3\[tmu]4 float matrix is +-laid out in column-major form as a 4\[tmu]4 homogeneous matrix with the +-last row being equal to (0, 0, 0, 1). ++\f[C]RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR\f[R]: The 3×4 float matrix is laid ++out in column-major form as a 4×4 homogeneous matrix with the last row ++being equal to (0, 0, 0, 1). + .SS EXIT STATUS + .PP + On failure an error code is set that can be queried using +diff --git a/man/man3/rtcSetGeometryTransformQuaternion.4embree4 b/man/man3/rtcSetGeometryTransformQuaternion.4embree4 +index 1b9346900..19dc81f6e 100644 +--- a/man/man3/rtcSetGeometryTransformQuaternion.4embree4 ++++ b/man/man3/rtcSetGeometryTransformQuaternion.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetGeometryTransformQuaternion" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetGeometryUserData.4embree4 b/man/man3/rtcSetGeometryUserData.4embree4 +index 8ec4268b5..9f7ebc4ed 100644 +--- a/man/man3/rtcSetGeometryUserData.4embree4 ++++ b/man/man3/rtcSetGeometryUserData.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetGeometryUserData" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetGeometryUserPrimitiveCount.4embree4 b/man/man3/rtcSetGeometryUserPrimitiveCount.4embree4 +index 96ada92bf..8dc1a2f61 100644 +--- a/man/man3/rtcSetGeometryUserPrimitiveCount.4embree4 ++++ b/man/man3/rtcSetGeometryUserPrimitiveCount.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetGeometryUserPrimitiveCount" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetGeometryVertexAttributeCount.4embree4 b/man/man3/rtcSetGeometryVertexAttributeCount.4embree4 +index a741a2a65..c39dca67f 100644 +--- a/man/man3/rtcSetGeometryVertexAttributeCount.4embree4 ++++ b/man/man3/rtcSetGeometryVertexAttributeCount.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetGeometryTimeStepCount" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetGeometryVertexAttributeTopology.4embree4 b/man/man3/rtcSetGeometryVertexAttributeTopology.4embree4 +index 16db18cd9..5d25927a5 100644 +--- a/man/man3/rtcSetGeometryVertexAttributeTopology.4embree4 ++++ b/man/man3/rtcSetGeometryVertexAttributeTopology.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetGeometryVertexAttributeTopology" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetNewGeometryBuffer.4embree4 b/man/man3/rtcSetNewGeometryBuffer.4embree4 +index e10ef840c..b3a8caa40 100644 +--- a/man/man3/rtcSetNewGeometryBuffer.4embree4 ++++ b/man/man3/rtcSetNewGeometryBuffer.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetNewGeometryBuffer" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetSceneBuildQuality.4embree4 b/man/man3/rtcSetSceneBuildQuality.4embree4 +index 200a588a9..b9f7d5d34 100644 +--- a/man/man3/rtcSetSceneBuildQuality.4embree4 ++++ b/man/man3/rtcSetSceneBuildQuality.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetSceneBuildQuality" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetSceneFlags.4embree4 b/man/man3/rtcSetSceneFlags.4embree4 +index b66de4a31..02060c405 100644 +--- a/man/man3/rtcSetSceneFlags.4embree4 ++++ b/man/man3/rtcSetSceneFlags.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetSceneFlags" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/man/man3/rtcSetSceneProgressMonitorFunction.4embree4 b/man/man3/rtcSetSceneProgressMonitorFunction.4embree4 +index c7ab9ddaa..96d41968c 100644 +--- a/man/man3/rtcSetSceneProgressMonitorFunction.4embree4 ++++ b/man/man3/rtcSetSceneProgressMonitorFunction.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetSceneProgressMonitorFunction" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +@@ -47,7 +61,7 @@ callback function. + Once registered, Embree will invoke the callback function multiple times + during hierarchy build operations of the scene, by passing the payload + as set at registration time (\f[C]userPtr\f[R] argument), and a double +-in the range [0,\[u2006]1] which estimates the progress of the operation ++in the range [0,1] which estimates the progress of the operation + (\f[C]n\f[R] argument). + The callback function might be called from multiple threads + concurrently. +diff --git a/man/man3/rtcSetSharedGeometryBuffer.4embree4 b/man/man3/rtcSetSharedGeometryBuffer.4embree4 +index 1cec42764..182a02abe 100644 +--- a/man/man3/rtcSetSharedGeometryBuffer.4embree4 ++++ b/man/man3/rtcSetSharedGeometryBuffer.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcSetSharedGeometryBuffer" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +@@ -54,6 +68,12 @@ The buffer data must remain valid for as long as the buffer may be used, + and the user is responsible for freeing the buffer data when no longer + required. + .PP ++If using a SYCL Embree device, \f[C]ptr\f[R] must be allocated using ++SYCL USM shared memory to be accessible on the device. ++Alternatively the function ++\f[C]rtcSetSharedGeometryBufferHostDevice\f[R] can be used to pass an ++explicitly managed host/device buffer pair. ++.PP + Sharing buffers can significantly reduce the memory required by the + application, thus we recommend using this feature. + When enabling the \f[C]RTC_SCENE_FLAG_COMPACT\f[R] scene flag, the +@@ -65,4 +85,5 @@ On failure an error code is set that can be queried using + \f[C]rtcGetDeviceError\f[R]. + .SS SEE ALSO + .PP +-[rtcSetGeometryBuffer], [rtcSetNewGeometryBuffer] ++[rtcSetSharedGeometryBufferHostDevice], [rtcSetGeometryBuffer], ++[rtcSetNewGeometryBuffer] +diff --git a/man/man3/rtcUpdateGeometryBuffer.4embree4 b/man/man3/rtcUpdateGeometryBuffer.4embree4 +index 51c3b78de..27fce4dea 100644 +--- a/man/man3/rtcUpdateGeometryBuffer.4embree4 ++++ b/man/man3/rtcUpdateGeometryBuffer.4embree4 +@@ -1,5 +1,19 @@ +-.\" Automatically generated by Pandoc 2.9.2.1 ++.\" Automatically generated by Pandoc 3.1.3 + .\" ++.\" Define V font for inline verbatim, using C font in formats ++.\" that render this, and otherwise B font. ++.ie "\f[CB]x\f[]"x" \{\ ++. ftr V B ++. ftr VI BI ++. ftr VB B ++. ftr VBI BI ++.\} ++.el \{\ ++. ftr V CR ++. ftr VI CI ++. ftr VB CB ++. ftr VBI CBI ++.\} + .TH "rtcUpdateGeometryBuffer" "3" "" "" "Embree Ray Tracing Kernels 4" + .hy + .SS NAME +diff --git a/readme.pdf b/readme.pdf +index bd4d6773c..e4bd4ad17 100644 +Binary files a/readme.pdf and b/readme.pdf differ diff --git a/imgui.ini b/imgui.ini new file mode 100644 index 0000000000..83f9d7be5d --- /dev/null +++ b/imgui.ini @@ -0,0 +1,10 @@ +[Window][Debug##Default] +Pos=60,60 +Size=400,400 +Collapsed=0 + +[Window][Embree] +Pos=60,60 +Size=142,149 +Collapsed=0 +