diff --git a/.gitignore b/.gitignore index 8a26daa..33591c6 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,9 @@ dist/ .vscode # Rever rever/ + +# Virtual environment folders +.venv/ + +# Shared libs +*.pyd \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..7b2ba6d --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,3 @@ +include *.h *.pxd *.dll +recursive-include embree2 *.h *.isph +recursive-include embree2/lib *.lib \ No newline at end of file diff --git a/poetry.lock b/poetry.lock new file mode 100644 index 0000000..898c1a0 --- /dev/null +++ b/poetry.lock @@ -0,0 +1,855 @@ +[[package]] +name = "appnope" +version = "0.1.2" +description = "Disable App Nap on macOS >= 10.9" +category = "dev" +optional = false +python-versions = "*" + +[[package]] +name = "astroid" +version = "2.9.3" +description = "An abstract syntax tree for Python with inference support." +category = "dev" +optional = false +python-versions = ">=3.6.2" + +[package.dependencies] +lazy-object-proxy = ">=1.4.0" +typing-extensions = {version = ">=3.10", markers = "python_version < \"3.10\""} +wrapt = ">=1.11,<1.14" + +[[package]] +name = "asttokens" +version = "2.0.5" +description = "Annotate AST trees with source code positions" +category = "dev" +optional = false +python-versions = "*" + +[package.dependencies] +six = "*" + +[package.extras] +test = ["astroid", "pytest"] + +[[package]] +name = "atomicwrites" +version = "1.4.0" +description = "Atomic file writes." +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[[package]] +name = "attrs" +version = "21.4.0" +description = "Classes Without Boilerplate" +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[package.extras] +dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"] +docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] +tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "cloudpickle"] +tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "cloudpickle"] + +[[package]] +name = "backcall" +version = "0.2.0" +description = "Specifications for callback functions passed in to an API" +category = "dev" +optional = false +python-versions = "*" + +[[package]] +name = "colorama" +version = "0.4.4" +description = "Cross-platform colored terminal text." +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[[package]] +name = "coverage" +version = "6.3.2" +description = "Code coverage measurement for Python" +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.extras] +toml = ["tomli"] + +[[package]] +name = "cython" +version = "0.29.28" +description = "The Cython compiler for writing C extensions for the Python language." +category = "main" +optional = false +python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" + +[[package]] +name = "decorator" +version = "5.1.1" +description = "Decorators for Humans" +category = "dev" +optional = false +python-versions = ">=3.5" + +[[package]] +name = "executing" +version = "0.8.3" +description = "Get the currently executing AST node of a frame, and other information" +category = "dev" +optional = false +python-versions = "*" + +[[package]] +name = "iniconfig" +version = "1.1.1" +description = "iniconfig: brain-dead simple config-ini parsing" +category = "dev" +optional = false +python-versions = "*" + +[[package]] +name = "ipython" +version = "8.1.1" +description = "IPython: Productive Interactive Computing" +category = "dev" +optional = false +python-versions = ">=3.8" + +[package.dependencies] +appnope = {version = "*", markers = "sys_platform == \"darwin\""} +backcall = "*" +colorama = {version = "*", markers = "sys_platform == \"win32\""} +decorator = "*" +jedi = ">=0.16" +matplotlib-inline = "*" +pexpect = {version = ">4.3", markers = "sys_platform != \"win32\""} +pickleshare = "*" +prompt-toolkit = ">=2.0.0,<3.0.0 || >3.0.0,<3.0.1 || >3.0.1,<3.1.0" +pygments = ">=2.4.0" +stack-data = "*" +traitlets = ">=5" + +[package.extras] +all = ["black", "Sphinx (>=1.3)", "ipykernel", "nbconvert", "nbformat", "ipywidgets", "notebook", "ipyparallel", "qtconsole", "curio", "matplotlib (!=3.2.0)", "numpy (>=1.19)", "pandas", "pytest", "testpath", "trio", "pytest-asyncio"] +black = ["black"] +doc = ["Sphinx (>=1.3)"] +kernel = ["ipykernel"] +nbconvert = ["nbconvert"] +nbformat = ["nbformat"] +notebook = ["ipywidgets", "notebook"] +parallel = ["ipyparallel"] +qtconsole = ["qtconsole"] +test = ["pytest", "pytest-asyncio", "testpath"] +test_extra = ["curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.19)", "pandas", "pytest", "testpath", "trio"] + +[[package]] +name = "isort" +version = "5.10.1" +description = "A Python utility / library to sort Python imports." +category = "dev" +optional = false +python-versions = ">=3.6.1,<4.0" + +[package.extras] +pipfile_deprecated_finder = ["pipreqs", "requirementslib"] +requirements_deprecated_finder = ["pipreqs", "pip-api"] +colors = ["colorama (>=0.4.3,<0.5.0)"] +plugins = ["setuptools"] + +[[package]] +name = "jedi" +version = "0.18.1" +description = "An autocompletion tool for Python that can be used for text editors." +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +parso = ">=0.8.0,<0.9.0" + +[package.extras] +qa = ["flake8 (==3.8.3)", "mypy (==0.782)"] +testing = ["Django (<3.1)", "colorama", "docopt", "pytest (<7.0.0)"] + +[[package]] +name = "lazy-object-proxy" +version = "1.7.1" +description = "A fast and thorough lazy object proxy." +category = "dev" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "matplotlib-inline" +version = "0.1.3" +description = "Inline Matplotlib backend for Jupyter" +category = "dev" +optional = false +python-versions = ">=3.5" + +[package.dependencies] +traitlets = "*" + +[[package]] +name = "mccabe" +version = "0.6.1" +description = "McCabe checker, plugin for flake8" +category = "dev" +optional = false +python-versions = "*" + +[[package]] +name = "numpy" +version = "1.22.2" +description = "NumPy is the fundamental package for array computing with Python." +category = "main" +optional = false +python-versions = ">=3.8" + +[[package]] +name = "packaging" +version = "21.3" +description = "Core utilities for Python packages" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" + +[[package]] +name = "parso" +version = "0.8.3" +description = "A Python Parser" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.extras] +qa = ["flake8 (==3.8.3)", "mypy (==0.782)"] +testing = ["docopt", "pytest (<6.0.0)"] + +[[package]] +name = "pexpect" +version = "4.8.0" +description = "Pexpect allows easy control of interactive console applications." +category = "dev" +optional = false +python-versions = "*" + +[package.dependencies] +ptyprocess = ">=0.5" + +[[package]] +name = "pickleshare" +version = "0.7.5" +description = "Tiny 'shelve'-like database with concurrency support" +category = "dev" +optional = false +python-versions = "*" + +[[package]] +name = "platformdirs" +version = "2.5.1" +description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.extras] +docs = ["Sphinx (>=4)", "furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)"] +test = ["appdirs (==1.4.4)", "pytest (>=6)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)"] + +[[package]] +name = "pluggy" +version = "1.0.0" +description = "plugin and hook calling mechanisms for python" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.extras] +dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] + +[[package]] +name = "prompt-toolkit" +version = "3.0.28" +description = "Library for building powerful interactive command lines in Python" +category = "dev" +optional = false +python-versions = ">=3.6.2" + +[package.dependencies] +wcwidth = "*" + +[[package]] +name = "ptyprocess" +version = "0.7.0" +description = "Run a subprocess in a pseudo terminal" +category = "dev" +optional = false +python-versions = "*" + +[[package]] +name = "pure-eval" +version = "0.2.2" +description = "Safely evaluate AST nodes without side effects" +category = "dev" +optional = false +python-versions = "*" + +[package.extras] +tests = ["pytest"] + +[[package]] +name = "py" +version = "1.11.0" +description = "library with cross-python path, ini-parsing, io, code, log facilities" +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[[package]] +name = "pygments" +version = "2.11.2" +description = "Pygments is a syntax highlighting package written in Python." +category = "dev" +optional = false +python-versions = ">=3.5" + +[[package]] +name = "pylint" +version = "2.12.2" +description = "python code static checker" +category = "dev" +optional = false +python-versions = ">=3.6.2" + +[package.dependencies] +astroid = ">=2.9.0,<2.10" +colorama = {version = "*", markers = "sys_platform == \"win32\""} +isort = ">=4.2.5,<6" +mccabe = ">=0.6,<0.7" +platformdirs = ">=2.2.0" +toml = ">=0.9.2" +typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\""} + +[[package]] +name = "pyparsing" +version = "3.0.7" +description = "Python parsing module" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.extras] +diagrams = ["jinja2", "railroad-diagrams"] + +[[package]] +name = "pytest" +version = "7.0.1" +description = "pytest: simple powerful testing with Python" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} +attrs = ">=19.2.0" +colorama = {version = "*", markers = "sys_platform == \"win32\""} +iniconfig = "*" +packaging = "*" +pluggy = ">=0.12,<2.0" +py = ">=1.8.2" +tomli = ">=1.0.0" + +[package.extras] +testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"] + +[[package]] +name = "rtree" +version = "1.0.0" +description = "R-Tree spatial index for Python GIS" +category = "main" +optional = false +python-versions = ">=3.7" + +[[package]] +name = "six" +version = "1.16.0" +description = "Python 2 and 3 compatibility utilities" +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" + +[[package]] +name = "stack-data" +version = "0.2.0" +description = "Extract data from python stack frames and tracebacks for informative displays" +category = "dev" +optional = false +python-versions = "*" + +[package.dependencies] +asttokens = "*" +executing = "*" +pure-eval = "*" + +[package.extras] +tests = ["pytest", "typeguard", "pygments", "littleutils", "cython"] + +[[package]] +name = "toml" +version = "0.10.2" +description = "Python Library for Tom's Obvious, Minimal Language" +category = "dev" +optional = false +python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" + +[[package]] +name = "tomli" +version = "2.0.1" +description = "A lil' TOML parser" +category = "dev" +optional = false +python-versions = ">=3.7" + +[[package]] +name = "traitlets" +version = "5.1.1" +description = "Traitlets Python configuration system" +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.extras] +test = ["pytest"] + +[[package]] +name = "trimesh" +version = "3.10.7" +description = "Import, export, process, analyze and view triangular meshes." +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +numpy = "*" + +[package.extras] +all = ["scikit-image", "sympy", "xatlas", "shapely", "xxhash", "networkx", "requests", "mapbox-earcut", "psutil", "meshio", "pillow", "svg.path", "python-fcl", "setuptools", "triangle", "msgpack", "scipy", "lxml", "pycollada", "colorlog", "pyglet", "jsonschema", "chardet", "glooey", "rtree"] +easy = ["msgpack", "sympy", "shapely", "scipy", "networkx", "xxhash", "requests", "lxml", "pycollada", "colorlog", "chardet", "pyglet", "jsonschema", "pillow", "svg.path", "setuptools", "rtree"] +test = ["pytest-cov", "ezdxf", "coveralls", "pyinstrument", "pytest"] + +[[package]] +name = "typing-extensions" +version = "4.1.1" +description = "Backported and Experimental Type Hints for Python 3.6+" +category = "dev" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "wcwidth" +version = "0.2.5" +description = "Measures the displayed width of unicode strings in a terminal" +category = "dev" +optional = false +python-versions = "*" + +[[package]] +name = "wrapt" +version = "1.13.3" +description = "Module for decorators, wrappers and monkey patching." +category = "dev" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" + +[metadata] +lock-version = "1.1" +python-versions = "^3.8" +content-hash = "9d3b03c14034bf1241ce2e37f787c26cce8d9e9d748008a5b312c65093169b36" + +[metadata.files] +appnope = [ + {file = "appnope-0.1.2-py2.py3-none-any.whl", hash = "sha256:93aa393e9d6c54c5cd570ccadd8edad61ea0c4b9ea7a01409020c9aa019eb442"}, + {file = "appnope-0.1.2.tar.gz", hash = "sha256:dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a"}, +] +astroid = [ + {file = "astroid-2.9.3-py3-none-any.whl", hash = "sha256:506daabe5edffb7e696ad82483ad0228245a9742ed7d2d8c9cdb31537decf9f6"}, + {file = "astroid-2.9.3.tar.gz", hash = "sha256:1efdf4e867d4d8ba4a9f6cf9ce07cd182c4c41de77f23814feb27ca93ca9d877"}, +] +asttokens = [ + {file = "asttokens-2.0.5-py2.py3-none-any.whl", hash = "sha256:0844691e88552595a6f4a4281a9f7f79b8dd45ca4ccea82e5e05b4bbdb76705c"}, + {file = "asttokens-2.0.5.tar.gz", hash = "sha256:9a54c114f02c7a9480d56550932546a3f1fe71d8a02f1bc7ccd0ee3ee35cf4d5"}, +] +atomicwrites = [ + {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"}, + {file = "atomicwrites-1.4.0.tar.gz", hash = "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"}, +] +attrs = [ + {file = "attrs-21.4.0-py2.py3-none-any.whl", hash = "sha256:2d27e3784d7a565d36ab851fe94887c5eccd6a463168875832a1be79c82828b4"}, + {file = "attrs-21.4.0.tar.gz", hash = "sha256:626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd"}, +] +backcall = [ + {file = "backcall-0.2.0-py2.py3-none-any.whl", hash = "sha256:fbbce6a29f263178a1f7915c1940bde0ec2b2a967566fe1c65c1dfb7422bd255"}, + {file = "backcall-0.2.0.tar.gz", hash = "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e"}, +] +colorama = [ + {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, + {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, +] +coverage = [ + {file = "coverage-6.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9b27d894748475fa858f9597c0ee1d4829f44683f3813633aaf94b19cb5453cf"}, + {file = "coverage-6.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:37d1141ad6b2466a7b53a22e08fe76994c2d35a5b6b469590424a9953155afac"}, + {file = "coverage-6.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f9987b0354b06d4df0f4d3e0ec1ae76d7ce7cbca9a2f98c25041eb79eec766f1"}, + {file = "coverage-6.3.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:26e2deacd414fc2f97dd9f7676ee3eaecd299ca751412d89f40bc01557a6b1b4"}, + {file = "coverage-6.3.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4dd8bafa458b5c7d061540f1ee9f18025a68e2d8471b3e858a9dad47c8d41903"}, + {file = "coverage-6.3.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:46191097ebc381fbf89bdce207a6c107ac4ec0890d8d20f3360345ff5976155c"}, + {file = "coverage-6.3.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:6f89d05e028d274ce4fa1a86887b071ae1755082ef94a6740238cd7a8178804f"}, + {file = "coverage-6.3.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:58303469e9a272b4abdb9e302a780072c0633cdcc0165db7eec0f9e32f901e05"}, + {file = "coverage-6.3.2-cp310-cp310-win32.whl", hash = "sha256:2fea046bfb455510e05be95e879f0e768d45c10c11509e20e06d8fcaa31d9e39"}, + {file = "coverage-6.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:a2a8b8bcc399edb4347a5ca8b9b87e7524c0967b335fbb08a83c8421489ddee1"}, + {file = "coverage-6.3.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:f1555ea6d6da108e1999b2463ea1003fe03f29213e459145e70edbaf3e004aaa"}, + {file = "coverage-6.3.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e5f4e1edcf57ce94e5475fe09e5afa3e3145081318e5fd1a43a6b4539a97e518"}, + {file = "coverage-6.3.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7a15dc0a14008f1da3d1ebd44bdda3e357dbabdf5a0b5034d38fcde0b5c234b7"}, + {file = "coverage-6.3.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:21b7745788866028adeb1e0eca3bf1101109e2dc58456cb49d2d9b99a8c516e6"}, + {file = "coverage-6.3.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:8ce257cac556cb03be4a248d92ed36904a59a4a5ff55a994e92214cde15c5bad"}, + {file = "coverage-6.3.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:b0be84e5a6209858a1d3e8d1806c46214e867ce1b0fd32e4ea03f4bd8b2e3359"}, + {file = "coverage-6.3.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:acf53bc2cf7282ab9b8ba346746afe703474004d9e566ad164c91a7a59f188a4"}, + {file = "coverage-6.3.2-cp37-cp37m-win32.whl", hash = "sha256:8bdde1177f2311ee552f47ae6e5aa7750c0e3291ca6b75f71f7ffe1f1dab3dca"}, + {file = "coverage-6.3.2-cp37-cp37m-win_amd64.whl", hash = "sha256:b31651d018b23ec463e95cf10070d0b2c548aa950a03d0b559eaa11c7e5a6fa3"}, + {file = "coverage-6.3.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:07e6db90cd9686c767dcc593dff16c8c09f9814f5e9c51034066cad3373b914d"}, + {file = "coverage-6.3.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:2c6dbb42f3ad25760010c45191e9757e7dce981cbfb90e42feef301d71540059"}, + {file = "coverage-6.3.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c76aeef1b95aff3905fb2ae2d96e319caca5b76fa41d3470b19d4e4a3a313512"}, + {file = "coverage-6.3.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8cf5cfcb1521dc3255d845d9dca3ff204b3229401994ef8d1984b32746bb45ca"}, + {file = "coverage-6.3.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8fbbdc8d55990eac1b0919ca69eb5a988a802b854488c34b8f37f3e2025fa90d"}, + {file = "coverage-6.3.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:ec6bc7fe73a938933d4178c9b23c4e0568e43e220aef9472c4f6044bfc6dd0f0"}, + {file = "coverage-6.3.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:9baff2a45ae1f17c8078452e9e5962e518eab705e50a0aa8083733ea7d45f3a6"}, + {file = "coverage-6.3.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:fd9e830e9d8d89b20ab1e5af09b32d33e1a08ef4c4e14411e559556fd788e6b2"}, + {file = "coverage-6.3.2-cp38-cp38-win32.whl", hash = "sha256:f7331dbf301b7289013175087636bbaf5b2405e57259dd2c42fdcc9fcc47325e"}, + {file = "coverage-6.3.2-cp38-cp38-win_amd64.whl", hash = "sha256:68353fe7cdf91f109fc7d474461b46e7f1f14e533e911a2a2cbb8b0fc8613cf1"}, + {file = "coverage-6.3.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b78e5afb39941572209f71866aa0b206c12f0109835aa0d601e41552f9b3e620"}, + {file = "coverage-6.3.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4e21876082ed887baed0146fe222f861b5815455ada3b33b890f4105d806128d"}, + {file = "coverage-6.3.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:34626a7eee2a3da12af0507780bb51eb52dca0e1751fd1471d0810539cefb536"}, + {file = "coverage-6.3.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1ebf730d2381158ecf3dfd4453fbca0613e16eaa547b4170e2450c9707665ce7"}, + {file = "coverage-6.3.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd6fe30bd519694b356cbfcaca9bd5c1737cddd20778c6a581ae20dc8c04def2"}, + {file = "coverage-6.3.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:96f8a1cb43ca1422f36492bebe63312d396491a9165ed3b9231e778d43a7fca4"}, + {file = "coverage-6.3.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:dd035edafefee4d573140a76fdc785dc38829fe5a455c4bb12bac8c20cfc3d69"}, + {file = "coverage-6.3.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5ca5aeb4344b30d0bec47481536b8ba1181d50dbe783b0e4ad03c95dc1296684"}, + {file = "coverage-6.3.2-cp39-cp39-win32.whl", hash = "sha256:f5fa5803f47e095d7ad8443d28b01d48c0359484fec1b9d8606d0e3282084bc4"}, + {file = "coverage-6.3.2-cp39-cp39-win_amd64.whl", hash = "sha256:9548f10d8be799551eb3a9c74bbf2b4934ddb330e08a73320123c07f95cc2d92"}, + {file = "coverage-6.3.2-pp36.pp37.pp38-none-any.whl", hash = "sha256:18d520c6860515a771708937d2f78f63cc47ab3b80cb78e86573b0a760161faf"}, + {file = "coverage-6.3.2.tar.gz", hash = "sha256:03e2a7826086b91ef345ff18742ee9fc47a6839ccd517061ef8fa1976e652ce9"}, +] +cython = [ + {file = "Cython-0.29.28-cp27-cp27m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:75686c586e37b1fed0fe4a2c053474f96fc07da0063bbfc98023454540515d31"}, + {file = "Cython-0.29.28-cp27-cp27m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:16f2e74fcac223c53e298ecead62c353d3cffa107bea5d8232e4b2ba40781634"}, + {file = "Cython-0.29.28-cp27-cp27mu-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b6c77cc24861a33714e74212abfab4e54bf42e1ad602623f193b8e369389af2f"}, + {file = "Cython-0.29.28-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:59f4e86b415620a097cf0ec602adf5a7ee3cc33e8220567ded96566f753483f8"}, + {file = "Cython-0.29.28-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:31465dce7fd3f058d02afb98b13af962848cc607052388814428dc801cc26f57"}, + {file = "Cython-0.29.28-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:5658fa477e80d96c49d5ff011938dd4b62da9aa428f771b91f1a7c49af45aad8"}, + {file = "Cython-0.29.28-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_24_i686.whl", hash = "sha256:33b69ac9bbf2b93d8cae336cfe48889397a857e6ceeb5cef0b2f0b31b6c54f2b"}, + {file = "Cython-0.29.28-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:9d39ee7ddef6856413f950b8959e852d83376d9db1c509505e3f4873df32aa70"}, + {file = "Cython-0.29.28-cp35-cp35m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c9848a423a14e8f51bd4bbf8e2ff37031764ce66bdc7c6bc06c70d4084eb23c7"}, + {file = "Cython-0.29.28-cp35-cp35m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:09448aadb818387160ca4d1e1b82dbb7001526b6d0bed7529c4e8ac12e3b6f4c"}, + {file = "Cython-0.29.28-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:341917bdb2c95bcf8322aacfe50bbe6b4794880b16fa8b2300330520e123a5e5"}, + {file = "Cython-0.29.28-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:fdcef7abb09fd827691e3abe6fd42c6c34beaccfa0bc2df6074f0a49949df6a8"}, + {file = "Cython-0.29.28-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_24_i686.whl", hash = "sha256:43eca77169f855dd04be11921a585c8854a174f30bc925257e92bc7b9197fbd2"}, + {file = "Cython-0.29.28-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7962a78ceb80cdec21345fb5088e675060fa65982030d446069f2d675d30e3cd"}, + {file = "Cython-0.29.28-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:ed32c206e1d68056a34b21d2ec0cf0f23d338d6531476a68c73e21e20bd7bb63"}, + {file = "Cython-0.29.28-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:a0ed39c63ba52edd03a39ea9d6da6f5326aaee5d333c317feba543270a1b3af5"}, + {file = "Cython-0.29.28-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:ded4fd3da4dee2f4414c35214244e29befa7f6fede3e9be317e765169df2cbc7"}, + {file = "Cython-0.29.28-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:e24bd94946ffa37f30fcb865f2340fb6d429a3c7bf87b47b22f7d22e0e68a15c"}, + {file = "Cython-0.29.28-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_24_i686.whl", hash = "sha256:076aa8da83383e2bed0ca5f92c13a7e76e684bc41fe8e438bbed735f5b1c2731"}, + {file = "Cython-0.29.28-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:004387d8b94c64681ee05660d6a234e125396097726cf2f419c0fa2ac38034d6"}, + {file = "Cython-0.29.28-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:d6036f6a5a0c7fb1af88889872268b15bf20dd9cefe33a6602d79ba18b8db20f"}, + {file = "Cython-0.29.28-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:1612d7439590ba3b8de5f907bf0e54bd8e024eafb8c59261531a7988030c182d"}, + {file = "Cython-0.29.28-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:d7d7beb600d5dd551e9322e1393b74286f4a3d4aa387f7bfbaccc1495a98603b"}, + {file = "Cython-0.29.28-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:5e82f6b3dc2133b2e0e2c5c63d352d40a695e40cc7ed99f4cbe83334bcf9ab39"}, + {file = "Cython-0.29.28-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_24_i686.whl", hash = "sha256:49076747b731ed78acf203666c3b3c5d664754ea01ca4527f62f6d8675703688"}, + {file = "Cython-0.29.28-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9f2b7c86a73db0d8dbbd885fe67f04c7b787df37a3848b9867270d3484101fbd"}, + {file = "Cython-0.29.28-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:a3b27812ac9e9737026bfbb1dd47434f3e84013f430bafe1c6cbaf1cd51b5518"}, + {file = "Cython-0.29.28-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:0378a14d2580dcea234d7a2dc8d75f60c091105885096e6dd5b032be97542c16"}, + {file = "Cython-0.29.28-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:d7c98727397c2547a56aa0c3c98140f1873c69a0642edc9446c6c870d0d8a5b5"}, + {file = "Cython-0.29.28-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:6626f9691ce2093ccbcc9932f449efe3b6e1c893b556910881d177c61612e8ff"}, + {file = "Cython-0.29.28-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_24_i686.whl", hash = "sha256:e9cc6af0c9c477c5e175e807dce439509934efefc24ea2da9fced7fbc8170591"}, + {file = "Cython-0.29.28-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:05edfa51c0ff31a8df3cb291b90ca93ab499686d023b9b81c216cd3509f73def"}, + {file = "Cython-0.29.28-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:4b3089255b6b1cc69e4b854626a41193e6acae5332263d24707976b3cb8ca644"}, + {file = "Cython-0.29.28-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:03b749e4f0bbf631cee472add2806d338a7d496f8383f6fb28cc5fdc34b7fdb8"}, + {file = "Cython-0.29.28-py2.py3-none-any.whl", hash = "sha256:26d8d0ededca42be50e0ac377c08408e18802b1391caa3aea045a72c1bff47ac"}, + {file = "Cython-0.29.28.tar.gz", hash = "sha256:d6fac2342802c30e51426828fe084ff4deb1b3387367cf98976bb2e64b6f8e45"}, +] +decorator = [ + {file = "decorator-5.1.1-py3-none-any.whl", hash = "sha256:b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186"}, + {file = "decorator-5.1.1.tar.gz", hash = "sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330"}, +] +executing = [ + {file = "executing-0.8.3-py2.py3-none-any.whl", hash = "sha256:d1eef132db1b83649a3905ca6dd8897f71ac6f8cac79a7e58a1a09cf137546c9"}, + {file = "executing-0.8.3.tar.gz", hash = "sha256:c6554e21c6b060590a6d3be4b82fb78f8f0194d809de5ea7df1c093763311501"}, +] +iniconfig = [ + {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, + {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, +] +ipython = [ + {file = "ipython-8.1.1-py3-none-any.whl", hash = "sha256:6f56bfaeaa3247aa3b9cd3b8cbab3a9c0abf7428392f97b21902d12b2f42a381"}, + {file = "ipython-8.1.1.tar.gz", hash = "sha256:8138762243c9b3a3ffcf70b37151a2a35c23d3a29f9743878c33624f4207be3d"}, +] +isort = [ + {file = "isort-5.10.1-py3-none-any.whl", hash = "sha256:6f62d78e2f89b4500b080fe3a81690850cd254227f27f75c3a0c491a1f351ba7"}, + {file = "isort-5.10.1.tar.gz", hash = "sha256:e8443a5e7a020e9d7f97f1d7d9cd17c88bcb3bc7e218bf9cf5095fe550be2951"}, +] +jedi = [ + {file = "jedi-0.18.1-py2.py3-none-any.whl", hash = "sha256:637c9635fcf47945ceb91cd7f320234a7be540ded6f3e99a50cb6febdfd1ba8d"}, + {file = "jedi-0.18.1.tar.gz", hash = "sha256:74137626a64a99c8eb6ae5832d99b3bdd7d29a3850fe2aa80a4126b2a7d949ab"}, +] +lazy-object-proxy = [ + {file = "lazy-object-proxy-1.7.1.tar.gz", hash = "sha256:d609c75b986def706743cdebe5e47553f4a5a1da9c5ff66d76013ef396b5a8a4"}, + {file = "lazy_object_proxy-1.7.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bb8c5fd1684d60a9902c60ebe276da1f2281a318ca16c1d0a96db28f62e9166b"}, + {file = "lazy_object_proxy-1.7.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a57d51ed2997e97f3b8e3500c984db50a554bb5db56c50b5dab1b41339b37e36"}, + {file = "lazy_object_proxy-1.7.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd45683c3caddf83abbb1249b653a266e7069a09f486daa8863fb0e7496a9fdb"}, + {file = "lazy_object_proxy-1.7.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:8561da8b3dd22d696244d6d0d5330618c993a215070f473b699e00cf1f3f6443"}, + {file = "lazy_object_proxy-1.7.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fccdf7c2c5821a8cbd0a9440a456f5050492f2270bd54e94360cac663398739b"}, + {file = "lazy_object_proxy-1.7.1-cp310-cp310-win32.whl", hash = "sha256:898322f8d078f2654d275124a8dd19b079080ae977033b713f677afcfc88e2b9"}, + {file = "lazy_object_proxy-1.7.1-cp310-cp310-win_amd64.whl", hash = "sha256:85b232e791f2229a4f55840ed54706110c80c0a210d076eee093f2b2e33e1bfd"}, + {file = "lazy_object_proxy-1.7.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:46ff647e76f106bb444b4533bb4153c7370cdf52efc62ccfc1a28bdb3cc95442"}, + {file = "lazy_object_proxy-1.7.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:12f3bb77efe1367b2515f8cb4790a11cffae889148ad33adad07b9b55e0ab22c"}, + {file = "lazy_object_proxy-1.7.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c19814163728941bb871240d45c4c30d33b8a2e85972c44d4e63dd7107faba44"}, + {file = "lazy_object_proxy-1.7.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:e40f2013d96d30217a51eeb1db28c9ac41e9d0ee915ef9d00da639c5b63f01a1"}, + {file = "lazy_object_proxy-1.7.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:2052837718516a94940867e16b1bb10edb069ab475c3ad84fd1e1a6dd2c0fcfc"}, + {file = "lazy_object_proxy-1.7.1-cp36-cp36m-win32.whl", hash = "sha256:6a24357267aa976abab660b1d47a34aaf07259a0c3859a34e536f1ee6e76b5bb"}, + {file = "lazy_object_proxy-1.7.1-cp36-cp36m-win_amd64.whl", hash = "sha256:6aff3fe5de0831867092e017cf67e2750c6a1c7d88d84d2481bd84a2e019ec35"}, + {file = "lazy_object_proxy-1.7.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:6a6e94c7b02641d1311228a102607ecd576f70734dc3d5e22610111aeacba8a0"}, + {file = "lazy_object_proxy-1.7.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c4ce15276a1a14549d7e81c243b887293904ad2d94ad767f42df91e75fd7b5b6"}, + {file = "lazy_object_proxy-1.7.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e368b7f7eac182a59ff1f81d5f3802161932a41dc1b1cc45c1f757dc876b5d2c"}, + {file = "lazy_object_proxy-1.7.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:6ecbb350991d6434e1388bee761ece3260e5228952b1f0c46ffc800eb313ff42"}, + {file = "lazy_object_proxy-1.7.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:553b0f0d8dbf21890dd66edd771f9b1b5f51bd912fa5f26de4449bfc5af5e029"}, + {file = "lazy_object_proxy-1.7.1-cp37-cp37m-win32.whl", hash = "sha256:c7a683c37a8a24f6428c28c561c80d5f4fd316ddcf0c7cab999b15ab3f5c5c69"}, + {file = "lazy_object_proxy-1.7.1-cp37-cp37m-win_amd64.whl", hash = "sha256:df2631f9d67259dc9620d831384ed7732a198eb434eadf69aea95ad18c587a28"}, + {file = "lazy_object_proxy-1.7.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:07fa44286cda977bd4803b656ffc1c9b7e3bc7dff7d34263446aec8f8c96f88a"}, + {file = "lazy_object_proxy-1.7.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4dca6244e4121c74cc20542c2ca39e5c4a5027c81d112bfb893cf0790f96f57e"}, + {file = "lazy_object_proxy-1.7.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:91ba172fc5b03978764d1df5144b4ba4ab13290d7bab7a50f12d8117f8630c38"}, + {file = "lazy_object_proxy-1.7.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:043651b6cb706eee4f91854da4a089816a6606c1428fd391573ef8cb642ae4f7"}, + {file = "lazy_object_proxy-1.7.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b9e89b87c707dd769c4ea91f7a31538888aad05c116a59820f28d59b3ebfe25a"}, + {file = "lazy_object_proxy-1.7.1-cp38-cp38-win32.whl", hash = "sha256:9d166602b525bf54ac994cf833c385bfcc341b364e3ee71e3bf5a1336e677b55"}, + {file = "lazy_object_proxy-1.7.1-cp38-cp38-win_amd64.whl", hash = "sha256:8f3953eb575b45480db6568306893f0bd9d8dfeeebd46812aa09ca9579595148"}, + {file = "lazy_object_proxy-1.7.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:dd7ed7429dbb6c494aa9bc4e09d94b778a3579be699f9d67da7e6804c422d3de"}, + {file = "lazy_object_proxy-1.7.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:70ed0c2b380eb6248abdef3cd425fc52f0abd92d2b07ce26359fcbc399f636ad"}, + {file = "lazy_object_proxy-1.7.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7096a5e0c1115ec82641afbdd70451a144558ea5cf564a896294e346eb611be1"}, + {file = "lazy_object_proxy-1.7.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:f769457a639403073968d118bc70110e7dce294688009f5c24ab78800ae56dc8"}, + {file = "lazy_object_proxy-1.7.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:39b0e26725c5023757fc1ab2a89ef9d7ab23b84f9251e28f9cc114d5b59c1b09"}, + {file = "lazy_object_proxy-1.7.1-cp39-cp39-win32.whl", hash = "sha256:2130db8ed69a48a3440103d4a520b89d8a9405f1b06e2cc81640509e8bf6548f"}, + {file = "lazy_object_proxy-1.7.1-cp39-cp39-win_amd64.whl", hash = "sha256:677ea950bef409b47e51e733283544ac3d660b709cfce7b187f5ace137960d61"}, + {file = "lazy_object_proxy-1.7.1-pp37.pp38-none-any.whl", hash = "sha256:d66906d5785da8e0be7360912e99c9188b70f52c422f9fc18223347235691a84"}, +] +matplotlib-inline = [ + {file = "matplotlib-inline-0.1.3.tar.gz", hash = "sha256:a04bfba22e0d1395479f866853ec1ee28eea1485c1d69a6faf00dc3e24ff34ee"}, + {file = "matplotlib_inline-0.1.3-py3-none-any.whl", hash = "sha256:aed605ba3b72462d64d475a21a9296f400a19c4f74a31b59103d2a99ffd5aa5c"}, +] +mccabe = [ + {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, + {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, +] +numpy = [ + {file = "numpy-1.22.2-cp310-cp310-macosx_10_14_x86_64.whl", hash = "sha256:515a8b6edbb904594685da6e176ac9fbea8f73a5ebae947281de6613e27f1956"}, + {file = "numpy-1.22.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:76a4f9bce0278becc2da7da3b8ef854bed41a991f4226911a24a9711baad672c"}, + {file = "numpy-1.22.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:168259b1b184aa83a514f307352c25c56af111c269ffc109d9704e81f72e764b"}, + {file = "numpy-1.22.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3556c5550de40027d3121ebbb170f61bbe19eb639c7ad0c7b482cd9b560cd23b"}, + {file = "numpy-1.22.2-cp310-cp310-win_amd64.whl", hash = "sha256:aafa46b5a39a27aca566198d3312fb3bde95ce9677085efd02c86f7ef6be4ec7"}, + {file = "numpy-1.22.2-cp38-cp38-macosx_10_14_x86_64.whl", hash = "sha256:55535c7c2f61e2b2fc817c5cbe1af7cb907c7f011e46ae0a52caa4be1f19afe2"}, + {file = "numpy-1.22.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:60cb8e5933193a3cc2912ee29ca331e9c15b2da034f76159b7abc520b3d1233a"}, + {file = "numpy-1.22.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b536b6840e84c1c6a410f3a5aa727821e6108f3454d81a5cd5900999ef04f89"}, + {file = "numpy-1.22.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2638389562bda1635b564490d76713695ff497242a83d9b684d27bb4a6cc9d7a"}, + {file = "numpy-1.22.2-cp38-cp38-win32.whl", hash = "sha256:6767ad399e9327bfdbaa40871be4254d1995f4a3ca3806127f10cec778bd9896"}, + {file = "numpy-1.22.2-cp38-cp38-win_amd64.whl", hash = "sha256:03ae5850619abb34a879d5f2d4bb4dcd025d6d8fb72f5e461dae84edccfe129f"}, + {file = "numpy-1.22.2-cp39-cp39-macosx_10_14_x86_64.whl", hash = "sha256:d76a26c5118c4d96e264acc9e3242d72e1a2b92e739807b3b69d8d47684b6677"}, + {file = "numpy-1.22.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:15efb7b93806d438e3bc590ca8ef2f953b0ce4f86f337ef4559d31ec6cf9d7dd"}, + {file = "numpy-1.22.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:badca914580eb46385e7f7e4e426fea6de0a37b9e06bec252e481ae7ec287082"}, + {file = "numpy-1.22.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94dd11d9f13ea1be17bac39c1942f527cbf7065f94953cf62dfe805653da2f8f"}, + {file = "numpy-1.22.2-cp39-cp39-win32.whl", hash = "sha256:8cf33634b60c9cef346663a222d9841d3bbbc0a2f00221d6bcfd0d993d5543f6"}, + {file = "numpy-1.22.2-cp39-cp39-win_amd64.whl", hash = "sha256:59153979d60f5bfe9e4c00e401e24dfe0469ef8da6d68247439d3278f30a180f"}, + {file = "numpy-1.22.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4a176959b6e7e00b5a0d6f549a479f869829bfd8150282c590deee6d099bbb6e"}, + {file = "numpy-1.22.2.zip", hash = "sha256:076aee5a3763d41da6bef9565fdf3cb987606f567cd8b104aded2b38b7b47abf"}, +] +packaging = [ + {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"}, + {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"}, +] +parso = [ + {file = "parso-0.8.3-py2.py3-none-any.whl", hash = "sha256:c001d4636cd3aecdaf33cbb40aebb59b094be2a74c556778ef5576c175e19e75"}, + {file = "parso-0.8.3.tar.gz", hash = "sha256:8c07be290bb59f03588915921e29e8a50002acaf2cdc5fa0e0114f91709fafa0"}, +] +pexpect = [ + {file = "pexpect-4.8.0-py2.py3-none-any.whl", hash = "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937"}, + {file = "pexpect-4.8.0.tar.gz", hash = "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c"}, +] +pickleshare = [ + {file = "pickleshare-0.7.5-py2.py3-none-any.whl", hash = "sha256:9649af414d74d4df115d5d718f82acb59c9d418196b7b4290ed47a12ce62df56"}, + {file = "pickleshare-0.7.5.tar.gz", hash = "sha256:87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca"}, +] +platformdirs = [ + {file = "platformdirs-2.5.1-py3-none-any.whl", hash = "sha256:bcae7cab893c2d310a711b70b24efb93334febe65f8de776ee320b517471e227"}, + {file = "platformdirs-2.5.1.tar.gz", hash = "sha256:7535e70dfa32e84d4b34996ea99c5e432fa29a708d0f4e394bbcb2a8faa4f16d"}, +] +pluggy = [ + {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, + {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, +] +prompt-toolkit = [ + {file = "prompt_toolkit-3.0.28-py3-none-any.whl", hash = "sha256:30129d870dcb0b3b6a53efdc9d0a83ea96162ffd28ffe077e94215b233dc670c"}, + {file = "prompt_toolkit-3.0.28.tar.gz", hash = "sha256:9f1cd16b1e86c2968f2519d7fb31dd9d669916f515612c269d14e9ed52b51650"}, +] +ptyprocess = [ + {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, + {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, +] +pure-eval = [ + {file = "pure_eval-0.2.2-py3-none-any.whl", hash = "sha256:01eaab343580944bc56080ebe0a674b39ec44a945e6d09ba7db3cb8cec289350"}, + {file = "pure_eval-0.2.2.tar.gz", hash = "sha256:2b45320af6dfaa1750f543d714b6d1c520a1688dec6fd24d339063ce0aaa9ac3"}, +] +py = [ + {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, + {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, +] +pygments = [ + {file = "Pygments-2.11.2-py3-none-any.whl", hash = "sha256:44238f1b60a76d78fc8ca0528ee429702aae011c265fe6a8dd8b63049ae41c65"}, + {file = "Pygments-2.11.2.tar.gz", hash = "sha256:4e426f72023d88d03b2fa258de560726ce890ff3b630f88c21cbb8b2503b8c6a"}, +] +pylint = [ + {file = "pylint-2.12.2-py3-none-any.whl", hash = "sha256:daabda3f7ed9d1c60f52d563b1b854632fd90035bcf01443e234d3dc794e3b74"}, + {file = "pylint-2.12.2.tar.gz", hash = "sha256:9d945a73640e1fec07ee34b42f5669b770c759acd536ec7b16d7e4b87a9c9ff9"}, +] +pyparsing = [ + {file = "pyparsing-3.0.7-py3-none-any.whl", hash = "sha256:a6c06a88f252e6c322f65faf8f418b16213b51bdfaece0524c1c1bc30c63c484"}, + {file = "pyparsing-3.0.7.tar.gz", hash = "sha256:18ee9022775d270c55187733956460083db60b37d0d0fb357445f3094eed3eea"}, +] +pytest = [ + {file = "pytest-7.0.1-py3-none-any.whl", hash = "sha256:9ce3ff477af913ecf6321fe337b93a2c0dcf2a0a1439c43f5452112c1e4280db"}, + {file = "pytest-7.0.1.tar.gz", hash = "sha256:e30905a0c131d3d94b89624a1cc5afec3e0ba2fbdb151867d8e0ebd49850f171"}, +] +rtree = [ + {file = "Rtree-1.0.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:757bbf9ca38c241e34812a646f16ffda2cabd535bcd815041b83fe091df7a85c"}, + {file = "Rtree-1.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fe3954a51d691d3938cbac42ac97f4acacbea8ea622a375df901318a5c4ab0e9"}, + {file = "Rtree-1.0.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:24185f39b277aaca0566284858de02edc80dc7b120233be38fcf3b4c7d2e72dc"}, + {file = "Rtree-1.0.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b2110fb8675bf809bba431a1876ba76ca5dde829a4de40aa7851941452a01278"}, + {file = "Rtree-1.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b0256ed9c27037892bcb7167e7f5c469ee7c5de38c5a895145e33c320584babe"}, + {file = "Rtree-1.0.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:7f2c0bd3e7d4b68cc27ab605b18487440427d5febba5f4b747b694f9de601c6f"}, + {file = "Rtree-1.0.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:c2b14f7603576b73a5e0fd2e35394db08c5ca3cfa41e4c8530128d91e5e43dd3"}, + {file = "Rtree-1.0.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:973ce22ee8bafa44b3df24c6bf78012e534e1f36103e0bbfbb193ec48e9be22a"}, + {file = "Rtree-1.0.0-cp310-cp310-win_amd64.whl", hash = "sha256:55b771e62b1e391a44776ef9f906944796213cc3cb48ffd6b22493684c68a859"}, + {file = "Rtree-1.0.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0475b2e7fe813c427ceb21e57c22f8b4b7fee6e5966db8a200688163d4853f14"}, + {file = "Rtree-1.0.0-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e436d8da7527655fd0512dd6a5218f604a3806849f3981ec0ca64930dc19b7f2"}, + {file = "Rtree-1.0.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d18efe4e69f6b7daee9aaced21e0218786209d55235c909c78dbc5c12368790"}, + {file = "Rtree-1.0.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:728cf9b774ed6f120f2ed072082431c14af8243d477656b5b7dc1ff855fe7786"}, + {file = "Rtree-1.0.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:3e28303d84f8b5509e26db7c2aa533692a6112a430cc955a7a7e6d899c9d5996"}, + {file = "Rtree-1.0.0-cp37-cp37m-win_amd64.whl", hash = "sha256:062439d3a33d95281445960af76b6189b987cda0803fdc1818e31b68bce989d1"}, + {file = "Rtree-1.0.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0ab0dccff665389329f8d2e623131a1af3ab82b6de570f8c494a429c129f3e65"}, + {file = "Rtree-1.0.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:44df5adc12841b94adcbc4e5aaada248e98a4dc2017c8c7060f9a782ef63e050"}, + {file = "Rtree-1.0.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:29a1a4452e334eaf3299c8b95f137a2ccafbccfd856041f612ec933eeafb2cf5"}, + {file = "Rtree-1.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:efdaf7137303af7a85ddd224bacdb27f9f7ece99e0dec627c900e12f22cdefd0"}, + {file = "Rtree-1.0.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:264e3b255a1fc6aaa2ddbcedfc15ac40578433f6b35a0c7aaba026215d91d8c3"}, + {file = "Rtree-1.0.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:26b2275ebc738cb6a0473c15d80fdfe820ef319015009f8f0789e586552cf411"}, + {file = "Rtree-1.0.0-cp38-cp38-win_amd64.whl", hash = "sha256:825c1f74a84e9857657c04503c4c50b9f170114183fa2db9211a5d8650cf1ffa"}, + {file = "Rtree-1.0.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a91d7b514210ae93029c2a7ed83b2595ca73de5e08a9d87fcdf3a784a7b3ef54"}, + {file = "Rtree-1.0.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0ffaa03d1f7e8291de7cd8a11f92e10579f145dc3a08cd46a9eea65cc7b42173"}, + {file = "Rtree-1.0.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4f2f93c997de551a1a0fa4065e713270ad9a509aeeb143c5b46f332c0759f314"}, + {file = "Rtree-1.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a48f46dbb6ab0cb135a43d90529e1fa09a6dd80149a34844f2adf8414b4ab71a"}, + {file = "Rtree-1.0.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:171aa361b3542bf1e47bdee54c611644bb33d35502e2ceea57ac89cf35330554"}, + {file = "Rtree-1.0.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:bc18d4df3edb3b889b177ba39238770afdb5787fb803677c3aadea42a6931485"}, + {file = "Rtree-1.0.0-cp39-cp39-win_amd64.whl", hash = "sha256:bc6e7384684a260eb2f04fcac64ca5ffe28876132a11d1a883db2a5db8becb64"}, + {file = "Rtree-1.0.0.tar.gz", hash = "sha256:d0483482121346b093b9a42518d40f921adf445915b7aea307eb26768c839682"}, +] +six = [ + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, +] +stack-data = [ + {file = "stack_data-0.2.0-py3-none-any.whl", hash = "sha256:999762f9c3132308789affa03e9271bbbe947bf78311851f4d485d8402ed858e"}, + {file = "stack_data-0.2.0.tar.gz", hash = "sha256:45692d41bd633a9503a5195552df22b583caf16f0b27c4e58c98d88c8b648e12"}, +] +toml = [ + {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, + {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, +] +tomli = [ + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, +] +traitlets = [ + {file = "traitlets-5.1.1-py3-none-any.whl", hash = "sha256:2d313cc50a42cd6c277e7d7dc8d4d7fedd06a2c215f78766ae7b1a66277e0033"}, + {file = "traitlets-5.1.1.tar.gz", hash = "sha256:059f456c5a7c1c82b98c2e8c799f39c9b8128f6d0d46941ee118daace9eb70c7"}, +] +trimesh = [ + {file = "trimesh-3.10.7-py3-none-any.whl", hash = "sha256:fae7270e6ee8bb9a97bd0aca042d8e2eeaf5814acd51f9d5326e2e8ccfdb0961"}, + {file = "trimesh-3.10.7.tar.gz", hash = "sha256:398a2bf83409924431f02e44d2999e19aca68981322a4b8a04ba75da392b852f"}, +] +typing-extensions = [ + {file = "typing_extensions-4.1.1-py3-none-any.whl", hash = "sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2"}, + {file = "typing_extensions-4.1.1.tar.gz", hash = "sha256:1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42"}, +] +wcwidth = [ + {file = "wcwidth-0.2.5-py2.py3-none-any.whl", hash = "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784"}, + {file = "wcwidth-0.2.5.tar.gz", hash = "sha256:c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83"}, +] +wrapt = [ + {file = "wrapt-1.13.3-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:e05e60ff3b2b0342153be4d1b597bbcfd8330890056b9619f4ad6b8d5c96a81a"}, + {file = "wrapt-1.13.3-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:85148f4225287b6a0665eef08a178c15097366d46b210574a658c1ff5b377489"}, + {file = "wrapt-1.13.3-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:2dded5496e8f1592ec27079b28b6ad2a1ef0b9296d270f77b8e4a3a796cf6909"}, + {file = "wrapt-1.13.3-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:e94b7d9deaa4cc7bac9198a58a7240aaf87fe56c6277ee25fa5b3aa1edebd229"}, + {file = "wrapt-1.13.3-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:498e6217523111d07cd67e87a791f5e9ee769f9241fcf8a379696e25806965af"}, + {file = "wrapt-1.13.3-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:ec7e20258ecc5174029a0f391e1b948bf2906cd64c198a9b8b281b811cbc04de"}, + {file = "wrapt-1.13.3-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:87883690cae293541e08ba2da22cacaae0a092e0ed56bbba8d018cc486fbafbb"}, + {file = "wrapt-1.13.3-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:f99c0489258086308aad4ae57da9e8ecf9e1f3f30fa35d5e170b4d4896554d80"}, + {file = "wrapt-1.13.3-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:6a03d9917aee887690aa3f1747ce634e610f6db6f6b332b35c2dd89412912bca"}, + {file = "wrapt-1.13.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:936503cb0a6ed28dbfa87e8fcd0a56458822144e9d11a49ccee6d9a8adb2ac44"}, + {file = "wrapt-1.13.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:f9c51d9af9abb899bd34ace878fbec8bf357b3194a10c4e8e0a25512826ef056"}, + {file = "wrapt-1.13.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:220a869982ea9023e163ba915077816ca439489de6d2c09089b219f4e11b6785"}, + {file = "wrapt-1.13.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:0877fe981fd76b183711d767500e6b3111378ed2043c145e21816ee589d91096"}, + {file = "wrapt-1.13.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:43e69ffe47e3609a6aec0fe723001c60c65305784d964f5007d5b4fb1bc6bf33"}, + {file = "wrapt-1.13.3-cp310-cp310-win32.whl", hash = "sha256:78dea98c81915bbf510eb6a3c9c24915e4660302937b9ae05a0947164248020f"}, + {file = "wrapt-1.13.3-cp310-cp310-win_amd64.whl", hash = "sha256:ea3e746e29d4000cd98d572f3ee2a6050a4f784bb536f4ac1f035987fc1ed83e"}, + {file = "wrapt-1.13.3-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:8c73c1a2ec7c98d7eaded149f6d225a692caa1bd7b2401a14125446e9e90410d"}, + {file = "wrapt-1.13.3-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:086218a72ec7d986a3eddb7707c8c4526d677c7b35e355875a0fe2918b059179"}, + {file = "wrapt-1.13.3-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:e92d0d4fa68ea0c02d39f1e2f9cb5bc4b4a71e8c442207433d8db47ee79d7aa3"}, + {file = "wrapt-1.13.3-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:d4a5f6146cfa5c7ba0134249665acd322a70d1ea61732723c7d3e8cc0fa80755"}, + {file = "wrapt-1.13.3-cp35-cp35m-win32.whl", hash = "sha256:8aab36778fa9bba1a8f06a4919556f9f8c7b33102bd71b3ab307bb3fecb21851"}, + {file = "wrapt-1.13.3-cp35-cp35m-win_amd64.whl", hash = "sha256:944b180f61f5e36c0634d3202ba8509b986b5fbaf57db3e94df11abee244ba13"}, + {file = "wrapt-1.13.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:2ebdde19cd3c8cdf8df3fc165bc7827334bc4e353465048b36f7deeae8ee0918"}, + {file = "wrapt-1.13.3-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:610f5f83dd1e0ad40254c306f4764fcdc846641f120c3cf424ff57a19d5f7ade"}, + {file = "wrapt-1.13.3-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:5601f44a0f38fed36cc07db004f0eedeaadbdcec90e4e90509480e7e6060a5bc"}, + {file = "wrapt-1.13.3-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:e6906d6f48437dfd80464f7d7af1740eadc572b9f7a4301e7dd3d65db285cacf"}, + {file = "wrapt-1.13.3-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:766b32c762e07e26f50d8a3468e3b4228b3736c805018e4b0ec8cc01ecd88125"}, + {file = "wrapt-1.13.3-cp36-cp36m-win32.whl", hash = "sha256:5f223101f21cfd41deec8ce3889dc59f88a59b409db028c469c9b20cfeefbe36"}, + {file = "wrapt-1.13.3-cp36-cp36m-win_amd64.whl", hash = "sha256:f122ccd12fdc69628786d0c947bdd9cb2733be8f800d88b5a37c57f1f1d73c10"}, + {file = "wrapt-1.13.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:46f7f3af321a573fc0c3586612db4decb7eb37172af1bc6173d81f5b66c2e068"}, + {file = "wrapt-1.13.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:778fd096ee96890c10ce96187c76b3e99b2da44e08c9e24d5652f356873f6709"}, + {file = "wrapt-1.13.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:0cb23d36ed03bf46b894cfec777eec754146d68429c30431c99ef28482b5c1df"}, + {file = "wrapt-1.13.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:96b81ae75591a795d8c90edc0bfaab44d3d41ffc1aae4d994c5aa21d9b8e19a2"}, + {file = "wrapt-1.13.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:7dd215e4e8514004c8d810a73e342c536547038fb130205ec4bba9f5de35d45b"}, + {file = "wrapt-1.13.3-cp37-cp37m-win32.whl", hash = "sha256:47f0a183743e7f71f29e4e21574ad3fa95676136f45b91afcf83f6a050914829"}, + {file = "wrapt-1.13.3-cp37-cp37m-win_amd64.whl", hash = "sha256:fd76c47f20984b43d93de9a82011bb6e5f8325df6c9ed4d8310029a55fa361ea"}, + {file = "wrapt-1.13.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b73d4b78807bd299b38e4598b8e7bd34ed55d480160d2e7fdaabd9931afa65f9"}, + {file = "wrapt-1.13.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:ec9465dd69d5657b5d2fa6133b3e1e989ae27d29471a672416fd729b429eb554"}, + {file = "wrapt-1.13.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:dd91006848eb55af2159375134d724032a2d1d13bcc6f81cd8d3ed9f2b8e846c"}, + {file = "wrapt-1.13.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ae9de71eb60940e58207f8e71fe113c639da42adb02fb2bcbcaccc1ccecd092b"}, + {file = "wrapt-1.13.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:51799ca950cfee9396a87f4a1240622ac38973b6df5ef7a41e7f0b98797099ce"}, + {file = "wrapt-1.13.3-cp38-cp38-win32.whl", hash = "sha256:4b9c458732450ec42578b5642ac53e312092acf8c0bfce140ada5ca1ac556f79"}, + {file = "wrapt-1.13.3-cp38-cp38-win_amd64.whl", hash = "sha256:7dde79d007cd6dfa65afe404766057c2409316135cb892be4b1c768e3f3a11cb"}, + {file = "wrapt-1.13.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:981da26722bebb9247a0601e2922cedf8bb7a600e89c852d063313102de6f2cb"}, + {file = "wrapt-1.13.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:705e2af1f7be4707e49ced9153f8d72131090e52be9278b5dbb1498c749a1e32"}, + {file = "wrapt-1.13.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:25b1b1d5df495d82be1c9d2fad408f7ce5ca8a38085e2da41bb63c914baadff7"}, + {file = "wrapt-1.13.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:77416e6b17926d953b5c666a3cb718d5945df63ecf922af0ee576206d7033b5e"}, + {file = "wrapt-1.13.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:865c0b50003616f05858b22174c40ffc27a38e67359fa1495605f96125f76640"}, + {file = "wrapt-1.13.3-cp39-cp39-win32.whl", hash = "sha256:0a017a667d1f7411816e4bf214646d0ad5b1da2c1ea13dec6c162736ff25a374"}, + {file = "wrapt-1.13.3-cp39-cp39-win_amd64.whl", hash = "sha256:81bd7c90d28a4b2e1df135bfbd7c23aee3050078ca6441bead44c42483f9ebfb"}, + {file = "wrapt-1.13.3.tar.gz", hash = "sha256:1fea9cd438686e6682271d36f3481a9f3636195578bab9ca3382e2f5f01fc185"}, +] diff --git a/pyembree/__init__.py b/pyembree/__init__.py index 2fb2513..e4b3f68 100644 --- a/pyembree/__init__.py +++ b/pyembree/__init__.py @@ -1 +1,3 @@ -__version__ = '0.1.6' +from importlib import metadata + +__version__ = metadata.version('pyembree') diff --git a/pyembree/embree.dll b/pyembree/embree.dll new file mode 100644 index 0000000..1be00c4 Binary files /dev/null and b/pyembree/embree.dll differ diff --git a/pyembree/embree2/lib/embree.lib b/pyembree/embree2/lib/embree.lib new file mode 100644 index 0000000..ffee868 Binary files /dev/null and b/pyembree/embree2/lib/embree.lib differ diff --git a/pyembree/embree2/lib/tbb.lib b/pyembree/embree2/lib/tbb.lib new file mode 100644 index 0000000..87d15fe Binary files /dev/null and b/pyembree/embree2/lib/tbb.lib differ diff --git a/pyembree/embree2/lib/tbbmalloc.lib b/pyembree/embree2/lib/tbbmalloc.lib new file mode 100644 index 0000000..48826e8 Binary files /dev/null and b/pyembree/embree2/lib/tbbmalloc.lib differ diff --git a/pyembree/embree2/rtcore.h b/pyembree/embree2/rtcore.h new file mode 100644 index 0000000..07b9fe7 --- /dev/null +++ b/pyembree/embree2/rtcore.h @@ -0,0 +1,296 @@ +// ======================================================================== // +// Copyright 2009-2018 Intel Corporation // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// ======================================================================== // + +#ifndef __RTCORE_H__ +#define __RTCORE_H__ + +#include +#include + +#include "rtcore_version.h" + +#if defined(_WIN32) +#if defined(_M_X64) +typedef long long ssize_t; +#else +typedef int ssize_t; +#endif +#endif + +#ifndef RTCORE_API +#if defined(_WIN32) && !defined(EMBREE_STATIC_LIB) +# define RTCORE_API extern "C" __declspec(dllimport) +#else +# define RTCORE_API extern "C" +#endif +#endif + +#ifdef _WIN32 +# define RTCORE_ALIGN(...) __declspec(align(__VA_ARGS__)) +#else +# define RTCORE_ALIGN(...) __attribute__((aligned(__VA_ARGS__))) +#endif + +#if !defined (RTCORE_DEPRECATED) +#ifdef __GNUC__ + #define RTCORE_DEPRECATED __attribute__((deprecated)) +#elif defined(_MSC_VER) + #define RTCORE_DEPRECATED __declspec(deprecated) +#else + #define RTCORE_DEPRECATED +#endif +#endif + +#if defined(_WIN32) +# define RTCORE_FORCEINLINE __forceinline +#else +# define RTCORE_FORCEINLINE inline __attribute__((always_inline)) +#endif + +/*! \file rtcore.h Defines the Embree Ray Tracing Kernel API for C and C++ + + This file defines the Embree ray tracing kernel API for C and + C++. The user is supposed to include this file, and alternatively + the rtcore_ray.h file, but none of the other .h files in this + folder. */ + +/*! \{ */ + +/*! Axis aligned bounding box representation */ +struct RTCORE_ALIGN(16) RTCBounds +{ + float lower_x, lower_y, lower_z, align0; + float upper_x, upper_y, upper_z, align1; +}; + +/*! \brief Defines an opaque device type */ +typedef struct __RTCDevice {}* RTCDevice; + +/*! \brief Creates a new Embree device. + + Creates a new Embree device to be used by the application. An + application typically creates only a single Embree device, but it is + valid to use multiple devices inside an application. A configuration + string can be passed at construction time, that allows to configure + implementation specific parameters. If this string is NULL, a + default configuration is used. The following configuration flags are + supported by the Embree implementation of the API: + + verbose = num, // sets verbosity level (default is 0) + + If Embree is started on an unsupported CPU, rtcNewDevice will fail and + set the RTC_UNSUPPORTED_CPU error code. + +*/ +RTCORE_API RTCDevice rtcNewDevice(const char* cfg = NULL); + +/*! \brief Deletes an Embree device. + + Deletes the Embree device again. After deletion, all scene handles + are invalid. */ +RTCORE_API void rtcDeleteDevice(RTCDevice device); + +/*! \brief Initializes the Embree ray tracing core + + WARNING: This function is deprecated, use rtcNewDevice instead. + + Initializes the ray tracing core and passes some configuration + string. The configuration string allows to configure implementation + specific parameters. If this string is NULL, a default configuration + is used. The following configuration flags are supported by the + Embree implementation of the API: + + verbose = num, // sets verbosity level (default is 0) + + If Embree is started on an unsupported CPU, rtcInit will fail and + set the RTC_UNSUPPORTED_CPU error code. + +*/ +RTCORE_API RTCORE_DEPRECATED void rtcInit(const char* cfg = NULL); + +/*! \brief Shuts down Embree + + WARNING: This function is deprecated, use rtcDeleteDevice instead. + + Shuts down the ray tracing core. After shutdown, all scene handles + are invalid, and invoking any API call except rtcInit is not + allowed. The application should invoke this call before + terminating. It is safe to call rtcInit again after an rtcExit + call. */ +RTCORE_API RTCORE_DEPRECATED void rtcExit(); + +/*! \brief Parameters that can get configured using the rtcSetParameter functions. */ +enum RTCParameter { + RTC_SOFTWARE_CACHE_SIZE = 0, /*! Configures the software cache size (used + to cache subdivision surfaces for + instance). The size is specified as an + integer number of bytes. The software + cache cannot be configured during + rendering. (write only) */ + + RTC_CONFIG_INTERSECT1 = 1, //!< checks if rtcIntersect1 is supported (read only) + RTC_CONFIG_INTERSECT4 = 2, //!< checks if rtcIntersect4 is supported (read only) + RTC_CONFIG_INTERSECT8 = 3, //!< checks if rtcIntersect8 is supported (read only) + RTC_CONFIG_INTERSECT16 = 4, //!< checks if rtcIntersect16 is supported (read only) + RTC_CONFIG_INTERSECT_STREAM = 5, //!< checks if rtcIntersect1M, rtcIntersectNM and rtcIntersectNp are supported (read only) + + RTC_CONFIG_RAY_MASK = 6, //!< checks if ray masks are supported (read only) + RTC_CONFIG_BACKFACE_CULLING = 7, //!< checks if backface culling is supported (read only) + RTC_CONFIG_INTERSECTION_FILTER = 8, //!< checks if intersection filters are enabled (read only) + RTC_CONFIG_INTERSECTION_FILTER_RESTORE = 9, //!< checks if intersection filters restores previous hit (read only) + RTC_CONFIG_IGNORE_INVALID_RAYS = 11, //!< checks if invalid rays are ignored (read only) + RTC_CONFIG_TASKING_SYSTEM = 12, //!< return used tasking system (0 = INTERNAL, 1 = TBB, 2 = PPL) (read only) + + RTC_CONFIG_VERSION_MAJOR = 13, //!< returns Embree major version (read only) + RTC_CONFIG_VERSION_MINOR = 14, //!< returns Embree minor version (read only) + RTC_CONFIG_VERSION_PATCH = 15, //!< returns Embree patch version (read only) + RTC_CONFIG_VERSION = 16, //!< returns Embree version as integer (e.g. Embree v2.8.2 -> 20802) (read only) + + RTC_CONFIG_TRIANGLE_GEOMETRY = 17, //!< checks if triangle geometries are supported + RTC_CONFIG_QUAD_GEOMETRY = 18, //!< checks if quad geometries are supported + RTC_CONFIG_LINE_GEOMETRY = 19, //!< checks if line geometries are supported + RTC_CONFIG_HAIR_GEOMETRY = 20, //!< checks if hair geometries are supported + RTC_CONFIG_SUBDIV_GEOMETRY = 21, //!< checks if subdiv geometries are supported + RTC_CONFIG_USER_GEOMETRY = 22, //!< checks if user geometries are supported + + RTC_CONFIG_COMMIT_JOIN = 23, //!< checks if rtcCommitJoin can be used to join build operation (not supported when compiled with some older TBB versions) + RTC_CONFIG_COMMIT_THREAD = 24, //!< checks if rtcCommitThread is available (not supported when compiled with some older TBB versions) +}; + +/*! \brief Configures some parameters. + WARNING: This function is deprecated, use rtcDeviceSetParameter1i instead. +*/ +RTCORE_API RTCORE_DEPRECATED void rtcSetParameter1i(const RTCParameter parm, ssize_t val); + +/*! \brief Reads some device parameter. + WARNING: This function is deprecated, use rtcDeviceGetParameter1i instead. +*/ +RTCORE_API RTCORE_DEPRECATED ssize_t rtcGetParameter1i(const RTCParameter parm); + +/*! \brief Configures some device parameters. */ +RTCORE_API void rtcDeviceSetParameter1i(RTCDevice device, const RTCParameter parm, ssize_t val); + +/*! \brief Reads some device parameter. */ +RTCORE_API ssize_t rtcDeviceGetParameter1i(RTCDevice device, const RTCParameter parm); + +/*! \brief Error codes returned by the rtcGetError function. */ +enum RTCError { + RTC_NO_ERROR = 0, //!< No error has been recorded. + RTC_UNKNOWN_ERROR = 1, //!< An unknown error has occured. + RTC_INVALID_ARGUMENT = 2, //!< An invalid argument is specified + RTC_INVALID_OPERATION = 3, //!< The operation is not allowed for the specified object. + RTC_OUT_OF_MEMORY = 4, //!< There is not enough memory left to execute the command. + RTC_UNSUPPORTED_CPU = 5, //!< The CPU is not supported as it does not support SSE2. + RTC_CANCELLED = 6, //!< The user has cancelled the operation through the RTC_PROGRESS_MONITOR_FUNCTION callback +}; + +/*! \brief Returns the value of the per-thread error flag. + + WARNING: This function is deprecated, use rtcDeviceGetError instead. + + If an error occurs this flag is set to an error code if it stores no + previous error. The rtcGetError function reads and returns the + currently stored error and clears the error flag again. */ +RTCORE_API RTCORE_DEPRECATED RTCError rtcGetError(); + +/*! \brief Returns the value of the per-thread error flag. + + If an error occurs this flag is set to an error code if it stores no + previous error. The rtcGetError function reads and returns the + currently stored error and clears the error flag again. */ +RTCORE_API RTCError rtcDeviceGetError(RTCDevice device); + +/*! \brief Type of error callback function. + WARNING: This callback function is deprecated, use RTCErrorFunc2 instead. +*/ +/*RTCORE_DEPRECATED*/ typedef void (*RTCErrorFunc)(const RTCError code, const char* str); +RTCORE_DEPRECATED typedef RTCErrorFunc RTC_ERROR_FUNCTION; + +/*! \brief Type of error callback function. */ +typedef void (*RTCErrorFunc2)(void* userPtr, const RTCError code, const char* str); + +/*! \brief Sets a callback function that is called whenever an error occurs. + WARNING: This function is deprecated, use rtcDeviceSetErrorFunction2 instead. + */ +RTCORE_API RTCORE_DEPRECATED void rtcSetErrorFunction(RTCErrorFunc func); + +/*! \brief Sets a callback function that is called whenever an error occurs. + WARNING: This function is deprecated, use rtcDeviceSetErrorFunction2 instead. + */ +RTCORE_API RTCORE_DEPRECATED void rtcDeviceSetErrorFunction(RTCDevice device, RTCErrorFunc func); + +/*! \brief Sets a callback function that is called whenever an error occurs. */ +RTCORE_API void rtcDeviceSetErrorFunction2(RTCDevice device, RTCErrorFunc2 func, void* userPtr); + +/*! \brief Type of memory consumption callback function. + WARNING: This callback function is deprecated, use RTCMemoryMonitorFunc2 instead. + */ +/*RTCORE_DEPRECATED*/ typedef bool (*RTCMemoryMonitorFunc)(const ssize_t bytes, const bool post); +RTCORE_DEPRECATED typedef RTCMemoryMonitorFunc RTC_MEMORY_MONITOR_FUNCTION; + +/*! \brief Type of memory consumption callback function. */ +typedef bool (*RTCMemoryMonitorFunc2)(void* ptr, const ssize_t bytes, const bool post); + +/*! \brief Sets the memory consumption callback function which is + * called before or after the library allocates or frees memory. + WARNING: This function is deprecated, use rtcDeviceSetMemoryMonitorFunction2 instead. +*/ +RTCORE_API RTCORE_DEPRECATED void rtcSetMemoryMonitorFunction(RTCMemoryMonitorFunc func); + +/*! \brief Sets the memory consumption callback function which is + * called before or after the library allocates or frees memory. + WARNING: This function is deprecated, use rtcDeviceSetMemoryMonitorFunction2 instead. +*/ +RTCORE_API RTCORE_DEPRECATED void rtcDeviceSetMemoryMonitorFunction(RTCDevice device, RTCMemoryMonitorFunc func); + +/*! \brief Sets the memory consumption callback function which is + * called before or after the library allocates or frees memory. The + * userPtr pointer is passed to each invokation of the callback + * function. */ +RTCORE_API void rtcDeviceSetMemoryMonitorFunction2(RTCDevice device, RTCMemoryMonitorFunc2 func, void* userPtr); + +/*! \brief Implementation specific. + + This function is implementation specific and only for debugging + purposes. + + WARNING: This function is deprecated do not use it. +*/ +RTCORE_API RTCORE_DEPRECATED void rtcDebug(); // FIXME: remove + +#include "rtcore_scene.h" +#include "rtcore_geometry.h" +#include "rtcore_geometry_user.h" +#include "rtcore_builder.h" + +/*! \brief Helper to easily combing scene flags */ +inline RTCSceneFlags operator|(const RTCSceneFlags a, const RTCSceneFlags b) { + return (RTCSceneFlags)((size_t)a | (size_t)b); +} + +/*! \brief Helper to easily combing algorithm flags */ +inline RTCAlgorithmFlags operator|(const RTCAlgorithmFlags a, const RTCAlgorithmFlags b) { + return (RTCAlgorithmFlags)((size_t)a | (size_t)b); +} + +/*! \brief Helper to easily combing geometry flags */ +inline RTCGeometryFlags operator|(const RTCGeometryFlags a, const RTCGeometryFlags b) { + return (RTCGeometryFlags)((size_t)a | (size_t)b); +} + +/*! \} */ + +#endif diff --git a/pyembree/embree2/rtcore.isph b/pyembree/embree2/rtcore.isph new file mode 100644 index 0000000..9ffdec7 --- /dev/null +++ b/pyembree/embree2/rtcore.isph @@ -0,0 +1,256 @@ +// ======================================================================== // +// Copyright 2009-2018 Intel Corporation // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// ======================================================================== // + +#ifndef __RTCORE_ISPH__ +#define __RTCORE_ISPH__ + +#include "rtcore_version.h" + +#if !defined(RTCORE_API) +#define RTCORE_API extern "C" unmasked +#endif + +#ifdef _WIN32 +# define RTCORE_ALIGN(...) // FIXME: need to specify alignment +#else +# define RTCORE_ALIGN(...) // FIXME: need to specify alignment +#endif + +#if !defined(RTCORE_DEPRECATED) +#define RTCORE_DEPRECATED // FIXME: deprecation not supported by ISPC +#endif + +/*! \file rtcore.isph Defines the Embree Ray Tracing Kernel API for ISPC. + + This file defines the Embree ray tracing kernel API for C and + C++. The user is supposed to include this file, and alternatively + the rtcore_ray.isph file, but none of the other .isph files in this + folder. */ + +/*! \{ */ + +/*! Axis aligned bounding box representation */ +RTCORE_ALIGN(16) struct RTCBounds +{ + float lower_x, lower_y, lower_z, align0; + float upper_x, upper_y, upper_z, align1; +}; + +/*! \brief Defines an opaque device type */ +typedef uniform struct __RTCDevice {}* uniform RTCDevice; + +/*! \brief Creates a new Embree device. + + Creates a new Embree device to be used by the application. An + application typically creates only a single Embree device, but it is + valid to use multiple devices inside an application. A configuration + string can be passed at construction time, that allows to configure + implementation specific parameters. If this string is NULL, a + default configuration is used. The following configuration flags are + supported by the Embree implementation of the API: + + verbose = num, // sets verbosity level (default is 0) + + If Embree is started on an unsupported CPU, rtcNewDevice will fail and + set the RTC_UNSUPPORTED_CPU error code. + +*/ +RTCDevice rtcNewDevice(const uniform int8* uniform cfg = NULL); + +/*! \brief Deletes an Embree device. + + Deletes the Embree device again. After deletion, all scene handles + are invalid. */ +void rtcDeleteDevice(RTCDevice device); + +/*! \brief Initializes the Embree ray tracing core + + WARNING: This function is deprecated, use rtcNewDevice instead. + + Initializes the ray tracing core and passes some configuration + string. The configuration string allows to configure implementation + specific parameters. If this string is NULL, a default configuration + is used. The following configuration flags are supported by the + Embree implementation of the API: + + verbose = num, // sets verbosity level (default is 0) + + If Embree is started on an unsupported CPU, rtcInit will fail and + set the RTC_UNSUPPORTED_CPU error code. + +*/ +RTCORE_DEPRECATED void rtcInit(const uniform int8* uniform cfg = NULL); + +/*! \brief Shuts down Embree. + + WARNING: This function is deprecated, use rtcDeleteDevice instead. + + Shuts down the ray tracing core. After shutdown, all scene handles + are invalid, and invoking any API call except rtcInit is not + allowed. The application should invoke this call before + terminating. It is safe to call rtcInit again after an rtcExit + call. */ +RTCORE_DEPRECATED void rtcExit(); + +/*! \brief Parameters that can get configured using the rtcSetParameter functions. */ +enum RTCParameter { + RTC_SOFTWARE_CACHE_SIZE = 0, /*! Configures the software cache size (used + to cache subdivision surfaces for + instance). The size is specified as an + integer number of bytes. The software + cache cannot be configured during + rendering. (write only) */ + + RTC_CONFIG_INTERSECT1 = 1, //!< checks if rtcIntersect1 is supported (read only) + RTC_CONFIG_INTERSECT4 = 2, //!< checks if rtcIntersect4 is supported (read only) + RTC_CONFIG_INTERSECT8 = 3, //!< checks if rtcIntersect8 is supported (read only) + RTC_CONFIG_INTERSECT16 = 4, //!< checks if rtcIntersect16 is supported (read only) + RTC_CONFIG_INTERSECT_STREAM = 5, //!< checks if rtcIntersect1M, rtcIntersectVM, rtcIntersectNM and rtcIntersectNp are supported (read only) + + RTC_CONFIG_RAY_MASK = 6, //!< checks if ray masks are supported (read only) + RTC_CONFIG_BACKFACE_CULLING = 7, //!< checks if backface culling is supported (read only) + RTC_CONFIG_INTERSECTION_FILTER = 8, //!< checks if intersection filters are enabled (read only) + RTC_CONFIG_INTERSECTION_FILTER_RESTORE = 9, //!< checks if intersection filters restores previous hit (read only) + RTC_CONFIG_IGNORE_INVALID_RAYS = 11, //!< checks if invalid rays are ignored (read only) + RTC_CONFIG_TASKING_SYSTEM = 12, //!< return used tasking system (0 = INTERNAL, 1 = TBB) (read only) + + RTC_CONFIG_VERSION_MAJOR = 13, //!< returns Embree major version (read only) + RTC_CONFIG_VERSION_MINOR = 14, //!< returns Embree minor version (read only) + RTC_CONFIG_VERSION_PATCH = 15, //!< returns Embree patch version (read only) + RTC_CONFIG_VERSION = 16, //!< returns Embree version as integer (e.g. Embree v2.8.2 -> 20802) (read only) + + RTC_CONFIG_TRIANGLE_GEOMETRY = 17, //!< checks if triangle geometries are supported + RTC_CONFIG_QUAD_GEOMETRY = 18, //!< checks if quad geometries are supported + RTC_CONFIG_LINE_GEOMETRY = 19, //!< checks if line geometries are supported + RTC_CONFIG_HAIR_GEOMETRY = 20, //!< checks if hair geometries are supported + RTC_CONFIG_SUBDIV_GEOMETRY = 21, //!< checks if subdiv geometries are supported + RTC_CONFIG_USER_GEOMETRY = 22, //!< checks if user geometries are supported + + RTC_CONFIG_COMMIT_JOIN = 23, //!< checks if rtcCommitJoin can be used to join build operation (not supported when compiled with some older TBB versions) + RTC_CONFIG_COMMIT_THREAD = 24, //!< checks if rtcCommitThread is available (not supported when compiled with some older TBB versions) +}; + +/*! \brief Configures some parameters. + WARNING: This function is deprecated, use rtcDeviceSetParameter1i instead. +*/ +RTCORE_DEPRECATED void rtcSetParameter1i(const uniform RTCParameter parm, uniform size_t val); // FIXME: should be ssize_t + +/*! \brief Reads some parameters. + WARNING: This function is deprecated, use rtcDeviceGetParameter1i instead. +*/ +uniform size_t rtcGetParameter1i(const uniform RTCParameter parm); // FIXME: should return ssize_t + +/*! \brief Configures some device parameters.*/ +void rtcDeviceSetParameter1i(RTCDevice device, const uniform RTCParameter parm, uniform size_t val); // FIXME: should be ssize_t + +/*! \brief Reads some device parameters. */ +uniform size_t rtcDeviceGetParameter1i(RTCDevice device, const uniform RTCParameter parm); // FIXME: should return ssize_t + +/*! \brief Error codes returned by the rtcGetError function. */ +enum RTCError { + RTC_NO_ERROR = 0, //!< No error has been recorded. + RTC_UNKNOWN_ERROR = 1, //!< An unknown error has occured. + RTC_INVALID_ARGUMENT = 2, //!< An invalid argument is specified + RTC_INVALID_OPERATION = 3, //!< The operation is not allowed for the specified object. + RTC_OUT_OF_MEMORY = 4, //!< There is not enough memory left to execute the command. + RTC_UNSUPPORTED_CPU = 5, //!< The CPU is not supported as it does not support SSE2. + RTC_CANCELLED = 6 //!< The user has cancelled the operation through the RTCProgressMonitorFunc callback +}; + +/*! \brief Returns the value of the per-thread error flag. + + WARNING: This function is deprecated, use rtcDeviceGetError instead. + + If an error occurs this flag is set to an error code if it stores no + previous error. The rtcGetError function reads and returns the + currently stored error and clears the error flag again. */ +RTCORE_DEPRECATED uniform RTCError rtcGetError(); + +/*! \brief Returns the value of the per-thread error flag. + + If an error occurs this flag is set to an error code if it stores no + previous error. The rtcGetError function reads and returns the + currently stored error and clears the error flag again. */ +uniform RTCError rtcDeviceGetError(RTCDevice device); + +/*! \brief Type of error callback function. + WARNING: This callback function is deprecated, use RTCErrorFunc2 instead. +*/ +RTCORE_DEPRECATED typedef unmasked void (*uniform RTCErrorFunc)(const uniform RTCError code, const uniform int8* uniform str); +RTCORE_DEPRECATED typedef RTCErrorFunc RTC_ERROR_FUNCTION; + +/*! \brief Type of error callback function. */ +typedef unmasked void (*uniform RTCErrorFunc2)(void* uniform userPtr, const uniform RTCError code, const uniform int8* uniform str); + +/*! \brief Sets a callback function that is called whenever an error occurs. + WARNING: This function is deprecated, use rtcDeviceSetErrorFunction2 instead. +*/ +RTCORE_DEPRECATED void rtcSetErrorFunction(uniform RTCErrorFunc func); + +/*! \brief Sets a callback function that is called whenever an error occurs. + WARNING: This function is deprecated, use rtcDeviceSetErrorFunction2 instead. +*/ +RTCORE_DEPRECATED void rtcDeviceSetErrorFunction(RTCDevice device, uniform RTCErrorFunc func); + +/*! \brief Sets a callback function that is called whenever an error occurs. */ +void rtcDeviceSetErrorFunction2(RTCDevice device, uniform RTCErrorFunc2 func, void* uniform userPtr); + +/*! \brief Type of memory consumption callback function. + WARNING: This callback function is deprecated, use RTCMemoryMonitorFunc2 instead. +*/ +RTCORE_DEPRECATED typedef uniform bool (*uniform RTCMemoryMonitorFunc)(const uniform uintptr_t bytes, const uniform bool post); // FIXME: should be ssize_t +RTCORE_DEPRECATED typedef RTCMemoryMonitorFunc RTC_MEMORY_MONITOR_FUNCTION; + +/*! \brief Type of memory consumption callback function. */ +typedef uniform bool (*uniform RTCMemoryMonitorFunc2)(const uniform uintptr_t bytes, const uniform bool post); // FIXME: should be ssize_t + +/*! \brief Sets the memory consumption callback function which is + * called before the library allocates or after the library frees + * memory. + * WARNING: This function is deprecated, use rtcDeviceSetMemoryMonitorFunction2 instead. +*/ +RTCORE_DEPRECATED void rtcSetMemoryMonitorFunction(RTCMemoryMonitorFunc func); + +/*! \brief Sets the memory consumption callback function which is + * called before the library allocates or after the library frees + * memory. + WARNING: This function is deprecated, use rtcDeviceSetMemoryMonitorFunction2 instead. +*/ +void rtcDeviceSetMemoryMonitorFunction(RTCDevice device, RTCMemoryMonitorFunc func); + +/*! \brief Sets the memory consumption callback function which is + * called before or after the library allocates or frees memory. The + * userPtr pointer is passed to each invokation of the callback + * function. */ +void rtcDeviceSetMemoryMonitorFunction2(RTCDevice device, RTCMemoryMonitorFunc2 func, void* uniform userPtr); + +/*! \brief Implementation specific. + + This function is implementation specific and only for debugging + purposes. + + WARNING: This function is deprecated do not use it. + +*/ +RTCORE_DEPRECATED void rtcDebug(); // FIXME: remove + +#include "rtcore_scene.isph" +#include "rtcore_geometry.isph" +#include "rtcore_geometry_user.isph" + +/*! \} */ + +#endif diff --git a/pyembree/embree2/rtcore_builder.h b/pyembree/embree2/rtcore_builder.h new file mode 100644 index 0000000..b4654cc --- /dev/null +++ b/pyembree/embree2/rtcore_builder.h @@ -0,0 +1,121 @@ +// ======================================================================== // +// Copyright 2009-2018 Intel Corporation // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// ======================================================================== // + +#ifndef __RTCORE_BUILDER_H__ +#define __RTCORE_BUILDER_H__ + +#include "rtcore.h" + +/*! \brief Defines an opaque BVH type */ +typedef struct __RTCBVH {}* RTCBVH; + +/*! \brief Defines an opaque thread local allocator type */ +typedef struct __RTCThreadLocalAllocator {}* RTCThreadLocalAllocator; + +/*! Quality settings for BVH build. */ +enum RTCBuildQuality +{ + RTC_BUILD_QUALITY_LOW = 0, //!< build low quality BVH (good for dynamic scenes) + RTC_BUILD_QUALITY_NORMAL = 1, //!< build standard quality BVH + RTC_BUILD_QUALITY_HIGH = 2, //!< build high quality BVH +}; + +/*! Settings for builders */ +struct RTCBuildSettings +{ + unsigned size; //!< Size of this structure in bytes. Makes future extension easier. + RTCBuildQuality quality; //!< quality of BVH build + unsigned maxBranchingFactor; //!< miximal branching factor of BVH to build + unsigned maxDepth; //!< maximal depth of BVH to build + unsigned sahBlockSize; //!< block size for SAH heuristic + unsigned minLeafSize; //!< minimal size of a leaf + unsigned maxLeafSize; //!< maximal size of a leaf + float travCost; //!< estimated cost of one traversal step + float intCost; //!< estimated cost of one primitive intersection + unsigned extraSpace; //!< for spatial splitting we need extra space at end of primitive array +}; + +/*! Creates default build settings. */ +inline RTCBuildSettings rtcDefaultBuildSettings() +{ + RTCBuildSettings settings; + settings.size = sizeof(settings); + settings.quality = RTC_BUILD_QUALITY_NORMAL; + settings.maxBranchingFactor = 2; + settings.maxDepth = 32; + settings.sahBlockSize = 1; + settings.minLeafSize = 1; + settings.maxLeafSize = 32; + settings.travCost = 1.0f; + settings.intCost = 1.0f; + settings.extraSpace = 0; + return settings; +} + +/*! Input primitives for the builder. Stores primitive bounds and ID. */ +struct RTCORE_ALIGN(32) RTCBuildPrimitive +{ + float lower_x, lower_y, lower_z; //!< lower bounds in x/y/z + int geomID; //!< first ID + float upper_x, upper_y, upper_z; //!< upper bounds in x/y/z + int primID; //!< second ID +}; + +/*! Creates a new BVH. */ +RTCORE_API RTCBVH rtcNewBVH(RTCDevice device); + +/*! Callback to create a node. */ +typedef void* (*RTCCreateNodeFunc) (RTCThreadLocalAllocator allocator, size_t numChildren, void* userPtr); + +/*! Callback to set the pointer to all children. */ +typedef void (*RTCSetNodeChildrenFunc) (void* nodePtr, void** children, size_t numChildren, void* userPtr); + +/*! Callback to set the bounds of all children. */ +typedef void (*RTCSetNodeBoundsFunc) (void* nodePtr, const RTCBounds** bounds, size_t numChildren, void* userPtr); + +/*! Callback to create a leaf node. */ +typedef void* (*RTCCreateLeafFunc) (RTCThreadLocalAllocator allocator, const RTCBuildPrimitive* prims, size_t numPrims, void* userPtr); + +/*! Callback to split a build primitive. */ +typedef void (*RTCSplitPrimitiveFunc) (const RTCBuildPrimitive& prim, unsigned dim, float pos, RTCBounds& lbounds, RTCBounds& rbounds, void* userPtr); + +/*! Callback to provide build progress. */ +typedef void (*RTCBuildProgressFunc) (size_t dn, void* userPtr); + +/*! builds the BVH */ +RTCORE_API void* rtcBuildBVH(RTCBVH bvh, //!< BVH to build + const RTCBuildSettings& settings, //!< settings for BVH builder + RTCBuildPrimitive* primitives, //!< list of input primitives + size_t numPrimitives, //!< number of input primitives + RTCCreateNodeFunc createNode, //!< creates a node + RTCSetNodeChildrenFunc setNodeChildren, //!< sets pointer to all children + RTCSetNodeBoundsFunc setNodeBounds, //!< sets bounds of all children + RTCCreateLeafFunc createLeaf, //!< creates a leaf + RTCSplitPrimitiveFunc splitPrimitive, //!< splits a primitive + RTCBuildProgressFunc buildProgress, //!< used to report build progress + void* userPtr //!< user pointer passed to callback functions + ); + +/*! Allocates memory using the thread local allocator. Use this function to allocate nodes in the callback functions. */ +RTCORE_API void* rtcThreadLocalAlloc(RTCThreadLocalAllocator allocator, size_t bytes, size_t align); + +/*! Makes the BVH static. No further rtcBVHBuild can be called anymore on the BVH. */ +RTCORE_API void rtcMakeStaticBVH(RTCBVH bvh); + +/*! Deletes the BVH including all allocated nodes. */ +RTCORE_API void rtcDeleteBVH(RTCBVH bvh); + +#endif diff --git a/pyembree/embree2/rtcore_geometry.h b/pyembree/embree2/rtcore_geometry.h new file mode 100644 index 0000000..9af8139 --- /dev/null +++ b/pyembree/embree2/rtcore_geometry.h @@ -0,0 +1,798 @@ +// ======================================================================== // +// Copyright 2009-2018 Intel Corporation // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// ======================================================================== // + +#ifndef __EMBREE_GEOMETRY_H__ +#define __EMBREE_GEOMETRY_H__ + +/*! \ingroup embree_kernel_api */ +/*! \{ */ + +/*! invalid geometry ID */ +#define RTC_INVALID_GEOMETRY_ID ((unsigned)-1) + +/*! maximal number of time steps */ +#define RTC_MAX_TIME_STEPS 129 + +/*! maximal number of user vertex buffers */ +#define RTC_MAX_USER_VERTEX_BUFFERS 16 + +/*! maximal number of index buffers for subdivision surfaces */ +#define RTC_MAX_INDEX_BUFFERS 16 + +/*! \brief Specifies the type of buffers when mapping buffers */ +enum RTCBufferType +{ + RTC_INDEX_BUFFER = 0x01000000, + RTC_INDEX_BUFFER0 = 0x01000000, + RTC_INDEX_BUFFER1 = 0x01000001, + + RTC_VERTEX_BUFFER = 0x02000000, + RTC_VERTEX_BUFFER0 = 0x02000000, + RTC_VERTEX_BUFFER1 = 0x02000001, + + RTC_USER_VERTEX_BUFFER = 0x02100000, + RTC_USER_VERTEX_BUFFER0 = 0x02100000, + RTC_USER_VERTEX_BUFFER1 = 0x02100001, + + RTC_FACE_BUFFER = 0x03000000, + RTC_LEVEL_BUFFER = 0x04000001, + + RTC_EDGE_CREASE_INDEX_BUFFER = 0x05000000, + RTC_EDGE_CREASE_WEIGHT_BUFFER = 0x06000000, + + RTC_VERTEX_CREASE_INDEX_BUFFER = 0x07000000, + RTC_VERTEX_CREASE_WEIGHT_BUFFER = 0x08000000, + + RTC_HOLE_BUFFER = 0x09000001, +}; + +/*! \brief Supported types of matrix layout for functions involving matrices */ +enum RTCMatrixType { + RTC_MATRIX_ROW_MAJOR = 0, + RTC_MATRIX_COLUMN_MAJOR = 1, + RTC_MATRIX_COLUMN_MAJOR_ALIGNED16 = 2, +}; + +/*! \brief Supported geometry flags to specify handling in dynamic scenes. */ +enum RTCGeometryFlags +{ + RTC_GEOMETRY_STATIC = 0, //!< specifies static geometry that will change rarely + RTC_GEOMETRY_DEFORMABLE = 1, //!< specifies dynamic geometry with deformable motion (BVH refit possible) + RTC_GEOMETRY_DYNAMIC = 2, //!< specifies dynamic geometry with arbitrary motion (BVH refit not possible) +}; + +/*! \brief Boundary interpolation mode for subdivision surfaces. + WARNING: This enum is deprecated, use RTCSubdivisionMode instead. + */ +enum RTCBoundaryMode +{ + RTC_BOUNDARY_NONE = 0, //!< ignores border patches + RTC_BOUNDARY_SMOOTH = 1, //!< smooth border (default) + RTC_BOUNDARY_EDGE_ONLY = 1, //!< soft boundary (default) + RTC_BOUNDARY_EDGE_AND_CORNER = 2 //!< boundary corner vertices are sharp vertices +}; + +/*! \brief Interpolation mode for subdivision surfaces. The modes are + * ordered to interpolate successively more linear. */ +enum RTCSubdivisionMode +{ + RTC_SUBDIV_NO_BOUNDARY = 0, //!< ignores border patches + RTC_SUBDIV_SMOOTH_BOUNDARY = 1, //!< smooth border (default) + RTC_SUBDIV_PIN_CORNERS = 2, //!< smooth border with fixed corners + RTC_SUBDIV_PIN_BOUNDARY = 3, //!< linearly interpolation along border + RTC_SUBDIV_PIN_ALL = 4, //!< pin every vertex (interpolates every patch linearly) +}; + +/*! Intersection filter function for single rays. */ +typedef void (*RTCFilterFunc)(void* ptr, /*!< pointer to user data */ + RTCRay& ray /*!< intersection to filter */); + +/*! Intersection filter function for ray packets of size 4. */ +typedef void (*RTCFilterFunc4)(const void* valid, /*!< pointer to valid mask */ + void* ptr, /*!< pointer to user data */ + RTCRay4& ray /*!< intersection to filter */); + +/*! Intersection filter function for ray packets of size 8. */ +typedef void (*RTCFilterFunc8)(const void* valid, /*!< pointer to valid mask */ + void* ptr, /*!< pointer to user data */ + RTCRay8& ray /*!< intersection to filter */); + +/*! Intersection filter function for ray packets of size 16. */ +typedef void (*RTCFilterFunc16)(const void* valid, /*!< pointer to valid mask */ + void* ptr, /*!< pointer to user data */ + RTCRay16& ray /*!< intersection to filter */); + +/*! Intersection filter function for ray packets of size N. */ +typedef void (*RTCFilterFuncN)(int* valid, /*!< pointer to valid mask */ + void* userPtr, /*!< pointer to geometry user data */ + const RTCIntersectContext* context, /*!< intersection context as passed to rtcIntersect/rtcOccluded */ + struct RTCRayN* ray, /*!< ray and previous hit */ + const struct RTCHitN* potentialHit, /*!< potential new hit */ + const size_t N /*!< size of ray packet */); + +/*! Displacement mapping function. + + WARNING: This callback is deprecated, use RTCDisplacementFunc2 instead. + + */ +typedef void (*RTCDisplacementFunc)(void* ptr, /*!< pointer to user data of geometry */ + unsigned geomID, /*!< ID of geometry to displace */ + unsigned primID, /*!< ID of primitive of geometry to displace */ + const float* u, /*!< u coordinates (source) */ + const float* v, /*!< v coordinates (source) */ + const float* nx, /*!< x coordinates of normalized normal at point to displace (source) */ + const float* ny, /*!< y coordinates of normalized normal at point to displace (source) */ + const float* nz, /*!< z coordinates of normalized normal at point to displace (source) */ + float* px, /*!< x coordinates of points to displace (source and target) */ + float* py, /*!< y coordinates of points to displace (source and target) */ + float* pz, /*!< z coordinates of points to displace (source and target) */ + size_t N /*!< number of points to displace */ ); + +/*! Displacement mapping function. */ +typedef void (*RTCDisplacementFunc2)(void* ptr, /*!< pointer to user data of geometry */ + unsigned geomID, /*!< ID of geometry to displace */ + unsigned primID, /*!< ID of primitive of geometry to displace */ + unsigned time, /*!< time step to calculate displacement for */ + const float* u, /*!< u coordinates (source) */ + const float* v, /*!< v coordinates (source) */ + const float* nx, /*!< x coordinates of normalized normal at point to displace (source) */ + const float* ny, /*!< y coordinates of normalized normal at point to displace (source) */ + const float* nz, /*!< z coordinates of normalized normal at point to displace (source) */ + float* px, /*!< x coordinates of points to displace (source and target) */ + float* py, /*!< y coordinates of points to displace (source and target) */ + float* pz, /*!< z coordinates of points to displace (source and target) */ + size_t N /*!< number of points to displace */ ); + +/*! \brief Creates a new scene instance. + + WARNING: This function is deprecated, use rtcNewInstance2 instead. + + A scene instance contains a reference to a scene to instantiate and + the transformation to instantiate the scene with. An implementation + will typically transform the ray with the inverse of the provided + transformation and continue traversing the ray through the provided + scene. If any geometry is hit, the instance ID (instID) member of + the ray will get set to the geometry ID of the instance. */ +RTCORE_API RTCORE_DEPRECATED unsigned rtcNewInstance (RTCScene target, //!< the scene the instance belongs to + RTCScene source //!< the scene to instantiate + ); + +/*! \brief Creates a new scene instance. + + A scene instance contains a reference to a scene to instantiate and + the transformation to instantiate the scene with. For motion blurred + instances, a number of timesteps can get specified. An + implementation will typically transform the ray with the inverse of + the provided transformation (or inverse of linearly interpolated + transformation in case of multi-segment motion blur) and continue + traversing the ray through the provided scene. If any geometry is + hit, the instance ID (instID) member of the ray will get set to the + geometry ID of the instance. */ +RTCORE_API unsigned rtcNewInstance2 (RTCScene target, //!< the scene the instance belongs to + RTCScene source, //!< the scene to instantiate + size_t numTimeSteps = 1); //!< number of timesteps, one matrix per timestep + +RTCORE_API unsigned rtcNewInstance3 (RTCScene target, //!< the scene the instance belongs to + RTCScene source, //!< the scene to instantiate + size_t numTimeSteps = 1, //!< number of timesteps, one matrix per timestep + unsigned int geomID = -1); //!< optional geometry ID to assign + +/*! \brief Creates a new geometry instance. + + WARNING: This function is deprecated, do not use it. + + A geometry instance contains a reference to some geometry to + instantiate and the transformation to instantiate that geometry + with. An implementation will typically transform the ray with the + inverse of the provided transformation and continue traversing the + ray through the provided scene. If any geometry is hit, the geometry + ID (geomID) member of the ray will get set to the geometry ID of the + instance. */ +RTCORE_API RTCORE_DEPRECATED unsigned rtcNewGeometryInstance(RTCScene scene, unsigned geomID); +RTCORE_API RTCORE_DEPRECATED unsigned rtcNewGeometryGroup (RTCScene scene, RTCGeometryFlags flags, unsigned* geomIDs, size_t N); + +/*! \brief Sets transformation of the instance. + WARNING: This function is deprecated, use rtcSetTransform2 instead. + */ +RTCORE_API RTCORE_DEPRECATED void rtcSetTransform (RTCScene scene, //!< scene handle + unsigned geomID, //!< ID of geometry + RTCMatrixType layout, //!< layout of transformation matrix + const float* xfm //!< pointer to transformation matrix + ); + + +/*! \brief Sets transformation of the instance for specified timestep */ +RTCORE_API void rtcSetTransform2 (RTCScene scene, //!< scene handle + unsigned int geomID, //!< ID of geometry + RTCMatrixType layout, //!< layout of transformation matrix + const float* xfm, //!< pointer to transformation matrix + size_t timeStep = 0 //!< timestep to set the matrix for + ); + +/*! \brief Creates a new triangle mesh. The number of triangles + (numTriangles), number of vertices (numVertices), and number of time + steps (1 for normal meshes, and up to RTC_MAX_TIME_STEPS for multi + segment motion blur), have to get specified. The triangle indices + can be set by mapping and writing to the index buffer + (RTC_INDEX_BUFFER) and the triangle vertices can be set by mapping + and writing into the vertex buffer (RTC_VERTEX_BUFFER). In case of + multi-segment motion blur, multiple vertex buffers have to get filled + (RTC_VERTEX_BUFFER0, RTC_VERTEX_BUFFER1, etc.), one for each time + step. The index buffer has the default layout of three 32 bit + integer indices for each triangle. An index points to the ith + vertex. The vertex buffer stores single precision x,y,z floating + point coordinates aligned to 16 bytes. The value of the 4th float + used for alignment can be arbitrary. */ +RTCORE_API unsigned rtcNewTriangleMesh (RTCScene scene, //!< the scene the mesh belongs to + RTCGeometryFlags flags, //!< geometry flags + size_t numTriangles, //!< number of triangles + size_t numVertices, //!< number of vertices + size_t numTimeSteps = 1 //!< number of motion blur time steps + ); + +RTCORE_API unsigned rtcNewTriangleMesh2 (RTCScene scene, //!< the scene the mesh belongs to + RTCGeometryFlags flags, //!< geometry flags + size_t numTriangles, //!< number of triangles + size_t numVertices, //!< number of vertices + size_t numTimeSteps = 1, //!< number of motion blur time steps + unsigned int geomID = -1 //!< optional geometry ID to assign + ); + + +/*! \brief Creates a new quad mesh. The number of quads (numQuads), + number of vertices (numVertices), and number of time steps (1 for + normal meshes, and up to RTC_MAX_TIME_STEPS for multi-segment motion + blur), have to get specified. The quad indices can be set by mapping + and writing to the index buffer (RTC_INDEX_BUFFER) and the quad + vertices can be set by mapping and writing into the vertex buffer + (RTC_VERTEX_BUFFER). In case of multi-segment motion blur, multiple + vertex buffers have to get filled (RTC_VERTEX_BUFFER0, + RTC_VERTEX_BUFFER1, etc.), one for each time step. The index buffer has + the default layout of three 32 bit integer indices for each quad. An + index points to the ith vertex. The vertex buffer stores single + precision x,y,z floating point coordinates aligned to 16 bytes. The + value of the 4th float used for alignment can be arbitrary. */ +RTCORE_API unsigned rtcNewQuadMesh (RTCScene scene, //!< the scene the mesh belongs to + RTCGeometryFlags flags, //!< geometry flags + size_t numQuads, //!< number of quads + size_t numVertices, //!< number of vertices + size_t numTimeSteps = 1 //!< number of motion blur time steps + ); + +RTCORE_API unsigned rtcNewQuadMesh2(RTCScene scene, //!< the scene the mesh belongs to + RTCGeometryFlags flags, //!< geometry flags + size_t numQuads, //!< number of quads + size_t numVertices, //!< number of vertices + size_t numTimeSteps = 1, //!< number of motion blur time steps + unsigned int geomID = -1 //!< optional geometry ID to assign + ); + +/*! \brief Creates a new subdivision mesh. The number of faces + (numFaces), edges/indices (numEdges), vertices (numVertices), edge + creases (numEdgeCreases), vertex creases (numVertexCreases), holes + (numHoles), and time steps (numTimeSteps) have to get speficied at + construction time. + + The following buffers have to get filled by the application: the face + buffer (RTC_FACE_BUFFER) contains the number edges/indices (3 or 4) + of each of the numFaces faces, the index buffer (RTC_INDEX_BUFFER) + contains multiple (3 or 4) 32bit vertex indices for each face and + numEdges indices in total, the vertex buffer (RTC_VERTEX_BUFFER) + stores numVertices vertices as single precision x,y,z floating point + coordinates aligned to 16 bytes. The value of the 4th float used for + alignment can be arbitrary. In case of multi-segment motion blur, + multiple vertex buffers have to get filled (RTC_VERTEX_BUFFER0, + RTC_VERTEX_BUFFER1, etc.), one for each time step. + + Optionally, the application can fill the hole buffer + (RTC_HOLE_BUFFER) with numHoles many 32 bit indices of faces that + should be considered non-existing. + + Optionally, the application can fill the level buffer + (RTC_LEVEL_BUFFER) with a tessellation level for each of the numEdges + edges. The subdivision level is a positive floating point value, that + specifies how many quads along the edge should get generated during + tessellation. The tessellation level is a lower bound, thus the + implementation is free to choose a larger level. If no level buffer + is specified a level of 1 is used. + + Optionally, the application can fill the sparse edge crease buffers + to make some edges appear sharper. The edge crease index buffer + (RTC_EDGE_CREASE_INDEX_BUFFER) contains numEdgeCreases many pairs of + 32 bit vertex indices that specify unoriented edges. The edge crease + weight buffer (RTC_EDGE_CREASE_WEIGHT_BUFFER) stores for each of + theses crease edges a positive floating point weight. The larger this + weight, the sharper the edge. Specifying a weight of infinify 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 the an edge multiple times with different + crease weights results in undefined behaviour. For a stored edge + (i,j), the reverse direction edges (j,i) does not have to get stored, + as both are considered the same edge. + + Optionally, the application can fill the sparse vertex crease buffers + to make some vertices appear sharper. The vertex crease index buffer + (RTC_VERTEX_CREASE_INDEX_BUFFER), contains numVertexCreases many 32 + bit vertex indices to speficy a set of vertices. The vertex crease + weight buffer (RTC_VERTEX_CREASE_WEIGHT_BUFFER) specifies for each of + these vertices a positive floating point weight. The larger this + 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 behaviour. + +*/ +RTCORE_API unsigned rtcNewSubdivisionMesh (RTCScene scene, //!< the scene the mesh belongs to + RTCGeometryFlags flags, //!< geometry flags + size_t numFaces, //!< number of faces + size_t numEdges, //!< number of edges + size_t numVertices, //!< number of vertices + size_t numEdgeCreases, //!< number of edge creases + size_t numVertexCreases, //!< number of vertex creases + size_t numHoles, //!< number of holes + size_t numTimeSteps = 1 //!< number of motion blur time steps + ); + +RTCORE_API unsigned rtcNewSubdivisionMesh2(RTCScene scene, //!< the scene the mesh belongs to + RTCGeometryFlags flags, //!< geometry flags + size_t numFaces, //!< number of faces + size_t numEdges, //!< number of edges + size_t numVertices, //!< number of vertices + size_t numEdgeCreases, //!< number of edge creases + size_t numVertexCreases, //!< number of vertex creases + size_t numHoles, //!< number of holes + size_t numTimeSteps = 1, //!< number of motion blur time steps + unsigned int geomID = -1 //!< optional geometry ID to assign + ); + +/*! \brief Creates a new hair geometry consisting of multiple hairs + represented as cubic bezier curves with varying radii. + + WARNING: This function is deprecated, use rtcNewBezierHairGeometry instead. + + The number of curves (numCurves), number of vertices (numVertices), + and number of time steps (1 for normal meshes, and up to + RTC_MAX_TIME_STEPS for multi-segment motion blur), have to get + specified at construction time. Further, the curve index buffer + (RTC_INDEX_BUFFER) and the curve vertex buffer (RTC_VERTEX_BUFFER) + have to get set by mapping and writing to the appropiate buffers. In + case of multi-segment motion blur, multiple vertex buffers have to + get filled (RTC_VERTEX_BUFFER0, RTC_VERTEX_BUFFER1, etc.), one for + each time step. The index buffer has the default layout of a single + 32 bit integer index for each curve, that references the start + vertex of the curve. The vertex buffer stores 4 control points per + curve, each such control point consists of a single precision + (x,y,z) position and radius, stored in that order in + memory. Individual hairs are considered to be subpixel sized which + allows the implementation to approximate the intersection + calculation. This in particular means that zooming onto one hair + might show geometric artefacts. */ +RTCORE_API RTCORE_DEPRECATED unsigned rtcNewHairGeometry (RTCScene scene, //!< the scene the curves belong to + RTCGeometryFlags flags, //!< geometry flags + size_t numCurves, //!< number of curves + size_t numVertices, //!< number of vertices + size_t numTimeSteps = 1 //!< number of motion blur time steps + ); + +/*! \brief Creates a new hair geometry, consisting of multiple hairs + represented as cubic bezier curves with varying radii. The number of + curves (numCurves), number of vertices (numVertices), and number of + time steps have to get specified at construction time (1 for normal + meshes, and up to RTC_MAX_TIME_STEPS for multi-segment motion + blur). Further, the curve index buffer (RTC_INDEX_BUFFER) and the + curve vertex buffer (RTC_VERTEX_BUFFER) have to get set by mapping + and writing to the appropiate buffers. In case of multi-segment + motion blur multiple vertex buffers have to get filled + (RTC_VERTEX_BUFFER0, RTC_VERTEX_BUFFER1, etc.), one for each time + step. The index buffer has the default layout of a single 32 bit + integer index for each curve, that references the start vertex of + the curve. The vertex buffer stores 4 control points per curve, each + such control point consists of a single precision (x,y,z) position + and radius, stored in that order in memory. Individual hairs are + considered to be subpixel sized which allows the implementation to + approximate the intersection calculation. This in particular means + that zooming onto one hair might show geometric artefacts. */ +RTCORE_API unsigned rtcNewBezierHairGeometry (RTCScene scene, //!< the scene the curves belong to + RTCGeometryFlags flags, //!< geometry flags + unsigned int numCurves, //!< number of curves + unsigned int numVertices, //!< number of vertices + unsigned int numTimeSteps = 1 //!< number of motion blur time steps + ); + +RTCORE_API unsigned rtcNewBezierHairGeometry2(RTCScene scene, //!< the scene the curves belong to + RTCGeometryFlags flags, //!< geometry flags + unsigned int numCurves, //!< number of curves + unsigned int numVertices, //!< number of vertices + unsigned int numTimeSteps = 1, //!< number of motion blur time steps + unsigned int geomID = -1 //!< optional geometry ID to assign + ); + +/*! \brief Creates a new hair geometry, consisting of multiple hairs + represented as cubic bspline curves with varying radii. The number + of curves (numCurves), number of vertices (numVertices), and number + of time steps have to get specified at construction time (1 for + normal meshes, and up to RTC_MAX_TIME_STEPS for multi-segment motion + blur). Further, the curve index buffer (RTC_INDEX_BUFFER) and the + curve vertex buffer (RTC_VERTEX_BUFFER) have to get set by mapping + and writing to the appropiate buffers. In case of multi-segment + motion blur multiple vertex buffers have to get filled + (RTC_VERTEX_BUFFER0, RTC_VERTEX_BUFFER1, etc.), one for each time + step. The index buffer has the default layout of a single 32 bit + integer index for each curve, that references the start vertex of + the curve. The vertex buffer stores 4 control points per curve, each + such control point consists of a single precision (x,y,z) position + and radius, stored in that order in memory. Individual hairs are + considered to be subpixel sized which allows the implementation to + approximate the intersection calculation. This in particular means + that zooming onto one hair might show geometric artefacts. */ +RTCORE_API unsigned rtcNewBSplineHairGeometry (RTCScene scene, //!< the scene the curves belong to + RTCGeometryFlags flags, //!< geometry flags + unsigned int numCurves, //!< number of curves + unsigned int numVertices, //!< number of vertices + unsigned int numTimeSteps = 1 //!< number of motion blur time steps + ); + +RTCORE_API unsigned rtcNewBSplineHairGeometry2(RTCScene scene, //!< the scene the curves belong to + RTCGeometryFlags flags, //!< geometry flags + unsigned int numCurves, //!< number of curves + unsigned int numVertices, //!< number of vertices + unsigned int numTimeSteps = 1, //!< number of motion blur time steps + unsigned int geomID = -1 //!< optional geometry ID to assign + ); + +/*! \brief Creates a new curve geometry, consisting of multiple curves + represented as cubic bezier curves with varying radii. + + WARNING: This function is deprecated, use rtcNewBezierCurveGeometry instead. + + The intersected surface is defined as the sweep of a varying radius + circle perpendicular along the curve. The number of curves + (numCurves), number of vertices (numVertices), and number of time + steps have to get specified at construction time (1 for normal + meshes, and up to RTC_MAX_TIME_STEPS for multi-segment motion + blur). Further, the curve index buffer (RTC_INDEX_BUFFER) and the + curve vertex buffer (RTC_VERTEX_BUFFER) have to get set by mapping + and writing to the appropiate buffers. In case of multi-segment + motion blur, multiple vertex buffers have to get filled + (RTC_VERTEX_BUFFER0, RTC_VERTEX_BUFFER1, etc.), one for each time + step. The index buffer has the default layout of a single 32 bit + integer index for each curve, that references the start vertex of + the curve. The vertex buffer stores 4 control points per curve, each + such control point consists of a single precision (x,y,z) position + and radius, stored in that order in memory. */ +RTCORE_API RTCORE_DEPRECATED unsigned rtcNewCurveGeometry (RTCScene scene, //!< the scene the curves belong to + RTCGeometryFlags flags, //!< geometry flags + size_t numCurves, //!< number of curves + size_t numVertices, //!< number of vertices + size_t numTimeSteps = 1 //!< number of motion blur time steps + ); + +/*! \brief Creates a new curve geometry, consisting of multiple curves + represented as cubic bezier curves with varying radii. The + intersected surface is defined as the sweep of a varying radius + circle perpendicular along the curve. The number of curves + (numCurves), number of vertices (numVertices), and number of time + steps have to get specified at construction time (1 for normal + meshes, and up to RTC_MAX_TIME_STEPS for multi-segment motion + blur). Further, the curve index buffer (RTC_INDEX_BUFFER) and the + curve vertex buffer (RTC_VERTEX_BUFFER) have to get set by mapping + and writing to the appropiate buffers. In case of multi-segment + motion blur, multiple vertex buffers have to get filled + (RTC_VERTEX_BUFFER0, RTC_VERTEX_BUFFER1, etc.), one for each time + step. The index buffer has the default layout of a single 32 bit + integer index for each curve, that references the start vertex of + the curve. The vertex buffer stores 4 control points per curve, each + such control point consists of a single precision (x,y,z) position + and radius, stored in that order in memory. */ +RTCORE_API unsigned rtcNewBezierCurveGeometry (RTCScene scene, //!< the scene the curves belong to + RTCGeometryFlags flags, //!< geometry flags + unsigned int numCurves, //!< number of curves + unsigned int numVertices, //!< number of vertices + unsigned int numTimeSteps = 1 //!< number of motion blur time steps + ); + +RTCORE_API unsigned rtcNewBezierCurveGeometry2(RTCScene scene, //!< the scene the curves belong to + RTCGeometryFlags flags, //!< geometry flags + unsigned int numCurves, //!< number of curves + unsigned int numVertices, //!< number of vertices + unsigned int numTimeSteps = 1, //!< number of motion blur time steps + unsigned int geomID = -1 //!< optional geometry ID to assign + ); + +/*! \brief Creates a new curve geometry, consisting of multiple curves + represented as cubic bspline curves with varying radii. The + intersected surface is defined as the sweep of a varying radius + circle perpendicular along the curve. The number of curves + (numCurves), number of vertices (numVertices), and number of time + steps have to get specified at construction time (1 for normal + meshes, and up to RTC_MAX_TIME_STEPS for multi-segment motion + blur). Further, the curve index buffer (RTC_INDEX_BUFFER) and the + curve vertex buffer (RTC_VERTEX_BUFFER) have to get set by mapping + and writing to the appropiate buffers. In case of multi-segment + motion blur, multiple vertex buffers have to get filled + (RTC_VERTEX_BUFFER0, RTC_VERTEX_BUFFER1, etc.), one for each time + step. The index buffer has the default layout of a single 32 bit + integer index for each curve, that references the start vertex of + the curve. The vertex buffer stores 4 control points per curve, each + such control point consists of a single precision (x,y,z) position + and radius, stored in that order in memory. */ +RTCORE_API unsigned rtcNewBSplineCurveGeometry (RTCScene scene, //!< the scene the curves belong to + RTCGeometryFlags flags, //!< geometry flags + unsigned int numCurves, //!< number of curves + unsigned int numVertices, //!< number of vertices + unsigned int numTimeSteps = 1 //!< number of motion blur time steps + ); + +RTCORE_API unsigned rtcNewBSplineCurveGeometry2(RTCScene scene, //!< the scene the curves belong to + RTCGeometryFlags flags, //!< geometry flags + unsigned int numCurves, //!< number of curves + unsigned int numVertices, //!< number of vertices + unsigned int numTimeSteps = 1, //!< number of motion blur time steps + unsigned int geomID = -1 //!< optional geometry ID to assign + ); + +/*! \brief Creates a new line segment geometry, consisting of multiple + segments with varying radii. The number of line segments + (numSegments), number of vertices (numVertices), and number of time + steps have to get specified at construction time (1 for normal + meshes, and up to RTC_MAX_TIME_STEPS for multi-segment motion + blur). Further, the segment index buffer (RTC_INDEX_BUFFER) and the + segment vertex buffer (RTC_VERTEX_BUFFER) have to get set by mapping + and writing to the appropiate buffers. In case of multi-segment + motion blur, multiple vertex buffers have to get filled + (RTC_VERTEX_BUFFER0, RTC_VERTEX_BUFFER1, etc.), one for each time + step. The index buffer has the default layout of a single 32 bit + integer index for each line segment, that references the start + vertex of the segment. The vertex buffer stores 2 end points per + line segment, each such point consists of a single precision (x,y,z) + position and radius, stored in that order in memory. Individual + segments are considered to be subpixel sized which allows the + implementation to approximate the intersection calculation. This in + particular means that zooming onto one line segment might show + geometric artefacts. */ +RTCORE_API unsigned rtcNewLineSegments (RTCScene scene, //!< the scene the line segments belong to + RTCGeometryFlags flags, //!< geometry flags + size_t numSegments, //!< number of line segments + size_t numVertices, //!< number of vertices + size_t numTimeSteps = 1 //!< number of motion blur time steps + ); + +RTCORE_API unsigned rtcNewLineSegments2(RTCScene scene, //!< the scene the line segments belong to + RTCGeometryFlags flags, //!< geometry flags + size_t numSegments, //!< number of line segments + size_t numVertices, //!< number of vertices + size_t numTimeSteps = 1, //!< number of motion blur time steps + unsigned int geomID = -1 //!< optional geometry ID to assign + ); + +/*! Sets a uniform tessellation rate for subdiv meshes and hair + * geometry. For subdivision meshes the RTC_LEVEL_BUFFER can also be used + * optionally to set a different tessellation rate per edge.*/ +RTCORE_API void rtcSetTessellationRate (RTCScene scene, unsigned geomID, float tessellationRate); + +/*! \brief Sets 32 bit ray mask. */ +RTCORE_API void rtcSetMask (RTCScene scene, unsigned geomID, int mask); + +/*! \brief Sets boundary interpolation mode for default subdivision surface topology. + WARNING: This function is deprecated, use rtcSetSubdivisionMode instead. + */ +RTCORE_API RTCORE_DEPRECATED void rtcSetBoundaryMode(RTCScene scene, unsigned geomID, RTCBoundaryMode mode); + +/*! \brief Sets subdivision interpolation mode for specified subdivision surface topology */ +RTCORE_API void rtcSetSubdivisionMode(RTCScene scene, unsigned geomID, unsigned topologyID, RTCSubdivisionMode mode); + +/*! \brief Binds a user vertex buffer to some index buffer topology. */ +RTCORE_API void rtcSetIndexBuffer(RTCScene scene, unsigned geomID, RTCBufferType vertexBuffer, RTCBufferType indexBuffer); + +/*! \brief Maps specified buffer. This function can be used to set index and + * vertex buffers of geometries. */ +RTCORE_API void* rtcMapBuffer(RTCScene scene, unsigned geomID, RTCBufferType type); + +/*! \brief Unmaps specified buffer. + + A buffer has to be unmapped before the rtcEnable, rtcDisable, + rtcUpdate, or rtcDeleteGeometry calls are executed. */ +RTCORE_API void rtcUnmapBuffer(RTCScene scene, unsigned geomID, RTCBufferType type); + +/*! \brief Shares a data buffer between the application and + * Embree. + + WARNING: This function is deprecated, use rtcSetBuffer2 instead. + + * The passed buffer is used by Embree to store index and vertex + * data. It has to remain valid as long as the mesh exists, and the + * user is responsible to free the data when the mesh gets + * deleted. One can optionally speficy a byte offset and byte stride + * of the elements stored inside the buffer. The addresses + * ptr+offset+i*stride have to be aligned to 4 bytes on Xeon CPUs and + * 16 bytes on Xeon Phi accelerators. For vertex buffers, the 4 bytes + * after the z-coordinate of the last vertex have to be readable + * memory, thus padding is required for some layouts. If this + * function is not called, Embree will allocate and manage buffers of + * the default layout. */ +RTCORE_API void rtcSetBuffer(RTCScene scene, unsigned geomID, RTCBufferType type, + const void* ptr, size_t byteOffset, size_t byteStride); + +/*! \brief Shares a data buffer between the application and + * Embree. The data has to remain valid as long as the mesh exists, + * and the user is responsible to free the data when the mesh gets + * deleted. For sharing the buffer, one has to specify the number of + * elements of the buffer, a byte offset to the first element, and + * byte stride of elements stored inside the buffer. The addresses + * ptr+offset+i*stride have to be aligned to 4 bytes. For vertex + * buffers and user vertex buffers the buffer has to be padded with 0 + * to a size of a multiple of 16 bytes, as Embree always accesses + * vertex buffers and user vertex buffers using SSE instructions. If + * this function is not called, Embree will allocate and manage + * buffers of the default layout. */ +RTCORE_API void rtcSetBuffer2(RTCScene scene, unsigned geomID, RTCBufferType type, + const void* ptr, size_t byteOffset, size_t byteStride, size_t size = -1); + +/*! \brief Enable geometry. Enabled geometry can be hit by a ray. */ +RTCORE_API void rtcEnable (RTCScene scene, unsigned geomID); + +/*! \brief Update all geometry buffers. + + Each time geometry buffers got modified, the user has to call some + update function to tell the ray tracing engine which buffers got + modified. The rtcUpdate function taggs each geometry buffer of the + specified geometry as modified. */ +RTCORE_API void rtcUpdate (RTCScene scene, unsigned geomID); + +/*! \brief Update spefific geometry buffer. + + Each time geometry buffers got modified, the user has to call some + update function to tell the ray tracing engine which buffers got + modified. The rtcUpdateBuffer function taggs a specific buffer of + some geometry as modified. */ +RTCORE_API void rtcUpdateBuffer (RTCScene scene, unsigned geomID, RTCBufferType type); + +/*! \brief Disable geometry. + + Disabled geometry is not hit by any ray. Disabling and enabling + geometry gives higher performance than deleting and recreating + geometry. */ +RTCORE_API void rtcDisable (RTCScene scene, unsigned geomID); + +/*! \brief Sets the displacement function. */ +RTCORE_API void rtcSetDisplacementFunction (RTCScene scene, unsigned geomID, RTCDisplacementFunc func, RTCBounds* bounds); + +/*! \brief Sets the displacement function. */ +RTCORE_API void rtcSetDisplacementFunction2 (RTCScene scene, unsigned geomID, RTCDisplacementFunc2 func, RTCBounds* bounds); + +/*! \brief Sets the intersection filter function for single rays. */ +RTCORE_API void rtcSetIntersectionFilterFunction (RTCScene scene, unsigned geomID, RTCFilterFunc func); + +/*! \brief Sets the intersection filter function for ray packets of size 4. */ +RTCORE_API void rtcSetIntersectionFilterFunction4 (RTCScene scene, unsigned geomID, RTCFilterFunc4 func); + +/*! \brief Sets the intersection filter function for ray packets of size 8. */ +RTCORE_API void rtcSetIntersectionFilterFunction8 (RTCScene scene, unsigned geomID, RTCFilterFunc8 func); + +/*! \brief Sets the intersection filter function for ray packets of size 16. */ +RTCORE_API void rtcSetIntersectionFilterFunction16 (RTCScene scene, unsigned geomID, RTCFilterFunc16 func); + +/*! \brief Sets the intersection filter function for ray packets of size N. */ +RTCORE_API void rtcSetIntersectionFilterFunctionN (RTCScene scene, unsigned geomID, RTCFilterFuncN func); + +/*! \brief Sets the occlusion filter function for single rays. */ +RTCORE_API void rtcSetOcclusionFilterFunction (RTCScene scene, unsigned geomID, RTCFilterFunc func); + +/*! \brief Sets the occlusion filter function for ray packets of size 4. */ +RTCORE_API void rtcSetOcclusionFilterFunction4 (RTCScene scene, unsigned geomID, RTCFilterFunc4 func); + +/*! \brief Sets the occlusion filter function for ray packets of size 8. */ +RTCORE_API void rtcSetOcclusionFilterFunction8 (RTCScene scene, unsigned geomID, RTCFilterFunc8 func); + +/*! \brief Sets the occlusion filter function for ray packets of size 16. */ +RTCORE_API void rtcSetOcclusionFilterFunction16 (RTCScene scene, unsigned geomID, RTCFilterFunc16 func); + +/*! \brief Sets the occlusion filter function for ray packets of size N. */ +RTCORE_API void rtcSetOcclusionFilterFunctionN (RTCScene scene, unsigned geomID, RTCFilterFuncN func); + +/*! Set pointer for user defined data per geometry. Invokations + * of the various user intersect and occluded functions get passed + * this data pointer when called. */ +RTCORE_API void rtcSetUserData (RTCScene scene, unsigned geomID, void* ptr); + +/*! Get pointer for user defined data per geometry based on geomID. */ +RTCORE_API void* rtcGetUserData (RTCScene scene, unsigned geomID); + +/*! Interpolates user data to some u/v location. The data buffer + * specifies per vertex data to interpolate and can be one of the + * RTC_VERTEX_BUFFER0/1 or RTC_USER_VERTEX_BUFFER0/1 and has to + * contain numFloats floating point values to interpolate for each + * vertex of the geometry. The dP array will get filled with the + * interpolated data and the dPdu and dPdv arrays with the u and v + * derivative of the interpolation. If the pointers dP is NULL, the + * value will not get calculated. If dPdu and dPdv are NULL the + * derivatives will not get calculated. Both dPdu and dPdv have to be + * either valid or NULL. The buffer has to be padded at the end such + * that the last element can be read safely using SSE + * instructions. */ +RTCORE_API void rtcInterpolate(RTCScene scene, unsigned geomID, unsigned primID, float u, float v, RTCBufferType buffer, + float* P, float* dPdu, float* dPdv, size_t numFloats); + +/*! Interpolates user data to some u/v location. The data buffer + * specifies per vertex data to interpolate and can be one of the + * RTC_VERTEX_BUFFER0/1 or RTC_USER_VERTEX_BUFFER0/1 and has to + * contain numFloats floating point values to interpolate for each + * vertex of the geometry. The P array will get filled with the + * interpolated datam the dPdu and dPdv arrays with the u and v + * derivative of the interpolation, and the ddPdudu, ddPdvdv, and + * ddPdudv arrays with the respective second derivatives. One can + * disable 1) the calculation of the interpolated value by setting P + * to NULL, 2) the calculation of the 1st order derivatives by + * setting dPdu and dPdv to NULL, 3) the calculation of the second + * order derivatives by setting ddPdudu, ddPdvdv, and ddPdudv to + * NULL. The buffers have to be padded at the end such that the last + * element can be read or written safely using SSE instructions. */ +RTCORE_API void rtcInterpolate2(RTCScene scene, unsigned geomID, unsigned primID, float u, float v, RTCBufferType buffer, + float* P, float* dPdu, float* dPdv, float* ddPdudu, float* ddPdvdv, float* ddPdudv, size_t numFloats); + +/*! Interpolates user data to an array of u/v locations. The valid + * pointer points to an integer array that specified which entries in + * the u/v arrays are valid (-1 denotes valid, and 0 invalid). If the + * valid pointer is NULL all elements are considers valid. The data + * buffer specifies per vertex data to interpolate and can be one of + * the RTC_VERTEX_BUFFER0/1 or RTC_USER_VERTEX_BUFFER0/1 and has to + * contain numFloats floating point values to interpolate for each + * vertex of the geometry. The P array will get filled with the + * interpolated data, and the dPdu and dPdv arrays with the u and v + * derivative of the interpolation. If the pointers P is NULL, the + * value will not get calculated. If dPdu and dPdv are NULL the + * derivatives will not get calculated. Both dPdu and dPdv have to be + * either valid or NULL. These destination arrays are filled in + * structure of array (SoA) layout. The buffer has to be padded at + * the end such that the last element can be read safely using SSE + * instructions.*/ +RTCORE_API void rtcInterpolateN(RTCScene scene, unsigned geomID, + const void* valid, const unsigned* primIDs, const float* u, const float* v, size_t numUVs, + RTCBufferType buffer, + float* P, float* dPdu, float* dPdv, size_t numFloats); + +/*! Interpolates user data to an array of u/v locations. The valid + * pointer points to an integer array that specified which entries in + * the u/v arrays are valid (-1 denotes valid, and 0 invalid). If the + * valid pointer is NULL all elements are considers valid. The data + * buffer specifies per vertex data to interpolate and can be one of + * the RTC_VERTEX_BUFFER0/1 or RTC_USER_VERTEX_BUFFER0/1 and has to + * contain numFloats floating point values to interpolate for each + * vertex of the geometry. The P array will get filled with the + * interpolated datam the dPdu and dPdv arrays with the u and v + * derivative of the interpolation, and the ddPdudu, ddPdvdv, and + * ddPdudv arrays with the respective second derivatives. One can + * disable 1) the calculation of the interpolated value by setting P + * to NULL, 2) the calculation of the 1st order derivatives by + * setting dPdu and dPdv to NULL, 3) the calculation of the second + * order derivatives by setting ddPdudu, ddPdvdv, and ddPdudv to + * NULL. These destination arrays are filled in structure of array + * (SoA) layout. The buffer has to be padded at the end such that + * the last element can be read safely using SSE + * instructions. */ +RTCORE_API void rtcInterpolateN2(RTCScene scene, unsigned geomID, + const void* valid, const unsigned* primIDs, const float* u, const float* v, size_t numUVs, + RTCBufferType buffer, + float* P, float* dPdu, float* dPdv, float* ddPdudu, float* ddPdvdv, float* ddPdudv, size_t numFloats); + +/*! \brief Deletes the geometry. */ +RTCORE_API void rtcDeleteGeometry (RTCScene scene, unsigned geomID); + + +/*! @} */ + +#endif diff --git a/pyembree/embree2/rtcore_geometry.isph b/pyembree/embree2/rtcore_geometry.isph new file mode 100644 index 0000000..2c43d38 --- /dev/null +++ b/pyembree/embree2/rtcore_geometry.isph @@ -0,0 +1,729 @@ +// ======================================================================== // +// Copyright 2009-2018 Intel Corporation // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// ======================================================================== // + +#ifndef __EMBREE_GEOMETRY_ISPH__ +#define __EMBREE_GEOMETRY_ISPH__ + +/*! \ingroup embree_kernel_api_ispc */ +/*! \{ */ + +/*! invalid geometry ID */ +#define RTC_INVALID_GEOMETRY_ID ((uniform unsigned int)-1) + +/*! maximal number of time steps */ +#define RTC_MAX_TIME_STEPS 129 + +/*! maximal number of user vertex buffers */ +#define RTC_MAX_USER_VERTEX_BUFFERS 16 + +/*! maximal number of index buffers for subdivision surfaces */ +#define RTC_MAX_INDEX_BUFFERS 16 + +/*! \brief Specifies the type of buffers when mapping buffers */ +enum RTCBufferType +{ + RTC_INDEX_BUFFER = 0x01000000, + RTC_INDEX_BUFFER0 = 0x01000000, + RTC_INDEX_BUFFER1 = 0x01000001, + + RTC_VERTEX_BUFFER = 0x02000000, + RTC_VERTEX_BUFFER0 = 0x02000000, + RTC_VERTEX_BUFFER1 = 0x02000001, + + RTC_USER_VERTEX_BUFFER = 0x02100000, + RTC_USER_VERTEX_BUFFER0 = 0x02100000, + RTC_USER_VERTEX_BUFFER1 = 0x02100001, + + RTC_FACE_BUFFER = 0x03000000, + RTC_LEVEL_BUFFER = 0x04000001, + + RTC_EDGE_CREASE_INDEX_BUFFER = 0x05000000, + RTC_EDGE_CREASE_WEIGHT_BUFFER = 0x06000000, + + RTC_VERTEX_CREASE_INDEX_BUFFER = 0x07000000, + RTC_VERTEX_CREASE_WEIGHT_BUFFER = 0x08000000, + + RTC_HOLE_BUFFER = 0x09000001, +}; + +/*! \brief Supported types of matrix layout for functions involving matrices */ +enum RTCMatrixType { + RTC_MATRIX_ROW_MAJOR = 0, + RTC_MATRIX_COLUMN_MAJOR = 1, + RTC_MATRIX_COLUMN_MAJOR_ALIGNED16 = 2, +}; + +/*! \brief Supported geometry flags to specify handling in dynamic scenes. */ +enum RTCGeometryFlags +{ + RTC_GEOMETRY_STATIC = 0, //!< specifies static geometry that will change rarely + RTC_GEOMETRY_DEFORMABLE = 1, //!< specifies dynamic geometry with deformable motion (BVH refit possible) + RTC_GEOMETRY_DYNAMIC = 2, //!< specifies dynamic geometry with arbitrary motion (BVH refit not possible) +}; + +/*! \brief Boundary interpolation mode for subdivision surfaces. + WARNING: This enum is deprecated, use RTCSubdivisionMode instead. +*/ +enum RTCBoundaryMode +{ + RTC_BOUNDARY_NONE = 0, //!< ignores border patches + RTC_BOUNDARY_SMOOTH = 1, //!< smooth border (default) + RTC_BOUNDARY_EDGE_ONLY = 1, //!< soft boundary (default) + RTC_BOUNDARY_EDGE_AND_CORNER = 2 //!< boundary corner vertices are sharp vertices +}; + +/*! \brief Interpolation mode for subdivision surfaces. The modes are + * ordered to interpolate successively more linear. */ +enum RTCSubdivisionMode +{ + RTC_SUBDIV_NO_BOUNDARY = 0, //!< ignores border patches + RTC_SUBDIV_SMOOTH_BOUNDARY = 1, //!< smooth border (default) + RTC_SUBDIV_PIN_CORNERS = 2, //!< smooth border with fixed corners + RTC_SUBDIV_PIN_BOUNDARY = 3, //!< linearly interpolation along border + RTC_SUBDIV_PIN_ALL = 4, //!< pin every vertex (interpolates every patch linearly) +}; + +/*! Intersection filter function for uniform rays. */ +typedef unmasked void (*uniform RTCFilterFuncUniform)(void* uniform ptr, /*!< pointer to user data */ + uniform RTCRay1& ray /*!< intersection to filter */); + +/*! Intersection filter function for varying rays. */ +typedef void (*uniform RTCFilterFuncVarying)(void* uniform ptr, /*!< pointer to user data */ + varying RTCRay& ray /*!< intersection to filter */); + +/*! Intersection filter function for ray packets of size N. */ +typedef unmasked void (*uniform RTCFilterFuncN)(uniform int* uniform valid, /*!< pointer to valid mask */ + void* uniform ptr, /*!< pointer to geometry user data */ + const uniform RTCIntersectContext* uniform context, /*!< intersection context as passed to rtcIntersect/rtcOccluded */ + struct RTCRayN* uniform ray, /*!< ray and previous hit */ + const struct RTCHitN* uniform potentialHit, /*!< potential new hit */ + uniform const uintptr_t N /*!< number of rays in ray packet */); + +/*! Type of displacement callback functions */ +typedef unmasked void (*RTCDisplacementFunc)(void* uniform ptr, /*!< pointer to user data of geometry */ + uniform unsigned int geomID, /*!< ID of geometry to displace */ + uniform unsigned int primID, /*!< ID of primitive of geometry to displace */ + uniform const float* uniform u, /*!< u coordinates (source) */ + uniform const float* uniform v, /*!< v coordinates (source) */ + uniform const float* uniform nx, /*!< x coordinates of normal at point to displace (source) */ + uniform const float* uniform ny, /*!< y coordinates of normal at point to displace (source) */ + uniform const float* uniform nz, /*!< z coordinates of normal at point to displace (source) */ + uniform float* uniform px, /*!< x coordinates of points to displace (source and target) */ + uniform float* uniform py, /*!< y coordinates of points to displace (source and target) */ + uniform float* uniform pz, /*!< z coordinates of points to displace (source and target) */ + uniform uintptr_t N /*!< number of points to displace */ ); + +/*! Type of displacement callback functions */ +typedef unmasked void (*RTCDisplacementFunc2)(void* uniform ptr, /*!< pointer to user data of geometry */ + uniform unsigned int geomID, /*!< ID of geometry to displace */ + uniform unsigned int primID, /*!< ID of primitive of geometry to displace */ + uniform unsigned int time, /*!< time step to calculate displacement for */ + uniform const float* uniform u, /*!< u coordinates (source) */ + uniform const float* uniform v, /*!< v coordinates (source) */ + uniform const float* uniform nx, /*!< x coordinates of normal at point to displace (source) */ + uniform const float* uniform ny, /*!< y coordinates of normal at point to displace (source) */ + uniform const float* uniform nz, /*!< z coordinates of normal at point to displace (source) */ + uniform float* uniform px, /*!< x coordinates of points to displace (source and target) */ + uniform float* uniform py, /*!< y coordinates of points to displace (source and target) */ + uniform float* uniform pz, /*!< z coordinates of points to displace (source and target) */ + uniform uintptr_t N /*!< number of points to displace */ ); + +/*! \brief Creates a new scene instance. + + WARNING: This callback is deprecated, use rtcNewInstance2 instead. + + A scene instance contains a reference to a scene to instantiate and + the transformation to instantiate the scene with. An implementation + will typically transform the ray with the inverse of the provided + transformation and continue traversing the ray through the provided + scene. If any geometry is hit, the instance ID (instID) member of + the ray will get set to the geometry ID of the instance. */ +RTCORE_DEPRECATED uniform unsigned int rtcNewInstance (RTCScene target, //!< the scene the instance belongs to + RTCScene source //!< the geometry to instantiate + ); + +/*! \brief Creates a new scene instance. + + A scene instance contains a reference to a scene to instantiate and + the transformation to instantiate the scene with. For motion blurred + instances, a number of timesteps can get specified. An + implementation will typically transform the ray with the inverse of + the provided transformation and continue traversing the ray through + the provided scene. If any geometry is hit, the instance ID (instID) + member of the ray will get set to the geometry ID of the + instance. */ +uniform unsigned int rtcNewInstance2 (RTCScene target, //!< the scene the instance belongs to + RTCScene source, //!< the scene to instantiate + uniform size_t numTimeSteps = 1 //!< number of timesteps, one matrix per timestep + ); + +uniform unsigned int rtcNewInstance3 (RTCScene target, //!< the scene the instance belongs to + RTCScene source, //!< the scene to instantiate + uniform size_t numTimeSteps = 1, //!< number of timesteps, one matrix per timestep + uniform unsigned int geomID = -1 //!< optional geometry ID to assign + ); + +/*! \brief Creates a new geometry instance. + + WARNING: This function is deprecated, do not use it. + + A geometry instance contains a reference to some geometry to + instantiate and the transformation to instantiate that geometry + with. An implementation will typically transform the ray with the + inverse of the provided transformation and continue traversing the + ray through the provided scene. If any geometry is hit, the geometry + ID (geomID) member of the ray will get set to the geometry ID of the + instance. */ +RTCORE_DEPRECATED uniform unsigned int rtcNewGeometryInstance(RTCScene scene, uniform unsigned int geomID); + +/*! \brief Sets transformation of the instance */ +RTCORE_DEPRECATED void rtcSetTransform (RTCScene scene, //!< scene handle + uniform unsigned int geomID, //!< ID of geometry + uniform RTCMatrixType layout, //!< layout of transformation matrix + const uniform float* uniform xfm //!< pointer to transformation matrix + ); + +/*! \brief Sets transformation of the instance for specified timestep */ +void rtcSetTransform2 (RTCScene scene, //!< scene handle + uniform unsigned int geomID, //!< ID of geometry + uniform RTCMatrixType layout, //!< layout of transformation matrix + const uniform float* uniform xfm, //!< pointer to transformation matrix + uniform size_t timeStep = 0 //!< timestep to set the matrix for + ); + +/*! \brief Creates a new triangle mesh. The number of triangles + (numTriangles), number of vertices (numVertices), and number of time + steps (1 for normal meshes, and up to RTC_MAX_TIME_STEPS for multi + segment motion blur), have to get specified. The triangle indices + can be set by mapping and writing to the index buffer + (RTC_INDEX_BUFFER) and the triangle vertices can be set by mapping + and writing into the vertex buffer (RTC_VERTEX_BUFFER). In case of + multi-segment motion blur, multiple vertex buffers have to get filled + (RTC_VERTEX_BUFFER0, RTC_VERTEX_BUFFER1, etc.), one for each time + step. The index buffer has the default layout of three 32 bit + integer indices for each triangle. An index points to the ith + vertex. The vertex buffer stores single precision x,y,z floating + point coordinates aligned to 16 bytes. The value of the 4th float + used for alignment can be arbitrary. */ +uniform unsigned int rtcNewTriangleMesh (RTCScene scene, //!< the scene the mesh belongs to + uniform RTCGeometryFlags flags, //!< geometry flags + uniform size_t numTriangles, //!< number of triangles + uniform size_t numVertices, //!< number of vertices + uniform size_t numTimeSteps = 1 //!< number of motion blur time steps + ); + +uniform unsigned int rtcNewTriangleMesh2(RTCScene scene, //!< the scene the mesh belongs to + uniform RTCGeometryFlags flags, //!< geometry flags + uniform size_t numTriangles, //!< number of triangles + uniform size_t numVertices, //!< number of vertices + uniform size_t numTimeSteps = 1, //!< number of motion blur time steps + uniform unsigned int geomID = -1 //!< optional geometry ID to assign + ); + +/*! \brief Creates a new quad mesh. The number of quads (numQuads), + number of vertices (numVertices), and number of time steps (1 for + normal meshes, and up to RTC_MAX_TIME_STEPS for multi-segment motion + blur), have to get specified. The quad indices can be set by mapping + and writing to the index buffer (RTC_INDEX_BUFFER) and the quad + vertices can be set by mapping and writing into the vertex buffer + (RTC_VERTEX_BUFFER). In case of multi-segment motion blur, multiple + vertex buffers have to get filled (RTC_VERTEX_BUFFER0, + RTC_VERTEX_BUFFER1, etc.), one for each time step. The index buffer has + the default layout of three 32 bit integer indices for each quad. An + index points to the ith vertex. The vertex buffer stores single + precision x,y,z floating point coordinates aligned to 16 bytes. The + value of the 4th float used for alignment can be arbitrary. */ +uniform unsigned int rtcNewQuadMesh (RTCScene scene, //!< the scene the mesh belongs to + uniform RTCGeometryFlags flags, //!< geometry flags + uniform size_t numQuads, //!< number of quads + uniform size_t numVertices, //!< number of vertices + uniform size_t numTimeSteps = 1 //!< number of motion blur time steps + ); + +uniform unsigned int rtcNewQuadMesh2(RTCScene scene, //!< the scene the mesh belongs to + uniform RTCGeometryFlags flags, //!< geometry flags + uniform size_t numQuads, //!< number of quads + uniform size_t numVertices, //!< number of vertices + uniform size_t numTimeSteps = 1, //!< number of motion blur time steps + uniform unsigned int geomID = -1 //!< optional geometry ID to assign + ); + +/*! \brief Creates a new subdivision mesh. The number of faces + (numFaces), edges/indices (numEdges), vertices (numVertices), edge + creases (numEdgeCreases), vertex creases (numVertexCreases), holes + (numHoles), and time steps (numTimeSteps) have to get speficied at + construction time. + + The following buffers have to get filled by the application: the face + buffer (RTC_FACE_BUFFER) contains the number edges/indices (3 or 4) + of each of the numFaces faces, the index buffer (RTC_INDEX_BUFFER) + contains multiple (3 or 4) 32bit vertex indices for each face and + numEdges indices in total, the vertex buffer (RTC_VERTEX_BUFFER) + stores numVertices vertices as single precision x,y,z floating point + coordinates aligned to 16 bytes. The value of the 4th float used for + alignment can be arbitrary. In case of multi-segment motion blur, + multiple vertex buffers have to get filled (RTC_VERTEX_BUFFER0, + RTC_VERTEX_BUFFER1, etc.), one for each time step. + + Optionally, the application can fill the hole buffer + (RTC_HOLE_BUFFER) with numHoles many 32 bit indices of faces that + should be considered non-existing. + + Optionally, the application can fill the level buffer + (RTC_LEVEL_BUFFER) with a tessellation level for each of the numEdges + edges. The subdivision level is a positive floating point value, that + specifies how many quads along the edge should get generated during + tessellation. The tessellation level is a lower bound, thus the + implementation is free to choose a larger level. If no level buffer + is specified a level of 1 is used. + + Optionally, the application can fill the sparse edge crease buffers + to make some edges appear sharper. The edge crease index buffer + (RTC_EDGE_CREASE_INDEX_BUFFER) contains numEdgeCreases many pairs of + 32 bit vertex indices that specify unoriented edges. The edge crease + weight buffer (RTC_EDGE_CREASE_WEIGHT_BUFFER) stores for each of + theses crease edges a positive floating point weight. The larger this + weight, the sharper the edge. Specifying a weight of infinify 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 the an edge multiple times with different + crease weights results in undefined behaviour. For a stored edge + (i,j), the reverse direction edges (j,i) does not have to get stored, + as both are considered the same edge. + + Optionally, the application can fill the sparse vertex crease buffers + to make some vertices appear sharper. The vertex crease index buffer + (RTC_VERTEX_CREASE_INDEX_BUFFER), contains numVertexCreases many 32 + bit vertex indices to speficy a set of vertices. The vertex crease + weight buffer (RTC_VERTEX_CREASE_WEIGHT_BUFFER) specifies for each of + these vertices a positive floating point weight. The larger this + 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 behaviour. + +*/ + +uniform unsigned int rtcNewSubdivisionMesh (RTCScene scene, //!< the scene the mesh belongs to + uniform RTCGeometryFlags flags, //!< geometry flags + uniform size_t numFaces, //!< number of faces + uniform size_t numEdges, //!< number of edges + uniform size_t numVertices, //!< number of vertices + uniform size_t numEdgeCreases, //!< number of edge creases + uniform size_t numVertexCreases, //!< number of vertex creases + uniform size_t numHoles, //!< number of holes + uniform size_t numTimeSteps = 1 //!< number of motion blur time steps + ); + +uniform unsigned int rtcNewSubdivisionMesh2(RTCScene scene, //!< the scene the mesh belongs to + uniform RTCGeometryFlags flags, //!< geometry flags + uniform size_t numFaces, //!< number of faces + uniform size_t numEdges, //!< number of edges + uniform size_t numVertices, //!< number of vertices + uniform size_t numEdgeCreases, //!< number of edge creases + uniform size_t numVertexCreases, //!< number of vertex creases + uniform size_t numHoles, //!< number of holes + uniform size_t numTimeSteps = 1, //!< number of motion blur time steps + uniform unsigned int geomID = -1 //!< optional geometry ID to assign + ); + +/*! \brief Creates a new hair geometry consisting of multiple hairs + represented as cubic bezier curves with varying radii. + + WARNING: This function is deprecated, use rtcNewBezierHairGeometry instead. + + The number of curves (numCurves), number of vertices (numVertices), + and number of time steps (1 for normal meshes, and up to + RTC_MAX_TIME_STEPS for multi-segment motion blur), have to get + specified at construction time. Further, the curve index buffer + (RTC_INDEX_BUFFER) and the curve vertex buffer (RTC_VERTEX_BUFFER) + have to get set by mapping and writing to the appropiate buffers. In + case of multi-segment motion blur, multiple vertex buffers have to + get filled (RTC_VERTEX_BUFFER0, RTC_VERTEX_BUFFER1, etc.), one for + each time step. The index buffer has the default layout of a single + 32 bit integer index for each curve, that references the start + vertex of the curve. The vertex buffer stores 4 control points per + curve, each such control point consists of a single precision + (x,y,z) position and radius, stored in that order in + memory. Individual hairs are considered to be subpixel sized which + allows the implementation to approximate the intersection + calculation. This in particular means that zooming onto one hair + might show geometric artefacts. */ +RTCORE_DEPRECATED uniform unsigned int rtcNewHairGeometry (RTCScene scene, //!< the scene the curves belong to + uniform RTCGeometryFlags flags, //!< geometry flags + uniform size_t numCurves, //!< number of curves + uniform size_t numVertices, //!< number of vertices + uniform size_t numTimeSteps = 1 //!< number of motion blur time steps + ); + +/*! \brief Creates a new hair geometry, consisting of multiple hairs + represented as cubic bezier curves with varying radii. The number of + curves (numCurves), number of vertices (numVertices), and number of + time steps have to get specified at construction time (1 for normal + meshes, and up to RTC_MAX_TIME_STEPS for multi-segment motion + blur). Further, the curve index buffer (RTC_INDEX_BUFFER) and the + curve vertex buffer (RTC_VERTEX_BUFFER) have to get set by mapping + and writing to the appropiate buffers. In case of multi-segment + motion blur multiple vertex buffers have to get filled + (RTC_VERTEX_BUFFER0, RTC_VERTEX_BUFFER1, etc.), one for each time + step. The index buffer has the default layout of a single 32 bit + integer index for each curve, that references the start vertex of + the curve. The vertex buffer stores 4 control points per curve, each + such control point consists of a single precision (x,y,z) position + and radius, stored in that order in memory. Individual hairs are + considered to be subpixel sized which allows the implementation to + approximate the intersection calculation. This in particular means + that zooming onto one hair might show geometric artefacts. */ +RTCORE_API uniform unsigned int rtcNewBezierHairGeometry (RTCScene scene, //!< the scene the curves belong to + uniform RTCGeometryFlags flags, //!< geometry flags + uniform unsigned int numCurves, //!< number of curves + uniform unsigned int numVertices, //!< number of vertices + uniform unsigned int numTimeSteps = 1 //!< number of motion blur time steps + ); + +RTCORE_API uniform unsigned int rtcNewBezierHairGeometry2(RTCScene scene, //!< the scene the curves belong to + uniform RTCGeometryFlags flags, //!< geometry flags + uniform unsigned int numCurves, //!< number of curves + uniform unsigned int numVertices, //!< number of vertices + uniform unsigned int numTimeSteps = 1, //!< number of motion blur time steps + uniform unsigned int geomID = -1 //!< optional geometry ID to assign + ); + +/*! \brief Creates a new hair geometry, consisting of multiple hairs + represented as cubic bspline curves with varying radii. The number + of curves (numCurves), number of vertices (numVertices), and number + of time steps have to get specified at construction time (1 for + normal meshes, and up to RTC_MAX_TIME_STEPS for multi-segment motion + blur). Further, the curve index buffer (RTC_INDEX_BUFFER) and the + curve vertex buffer (RTC_VERTEX_BUFFER) have to get set by mapping + and writing to the appropiate buffers. In case of multi-segment + motion blur multiple vertex buffers have to get filled + (RTC_VERTEX_BUFFER0, RTC_VERTEX_BUFFER1, etc.), one for each time + step. The index buffer has the default layout of a single 32 bit + integer index for each curve, that references the start vertex of + the curve. The vertex buffer stores 4 control points per curve, each + such control point consists of a single precision (x,y,z) position + and radius, stored in that order in memory. Individual hairs are + considered to be subpixel sized which allows the implementation to + approximate the intersection calculation. This in particular means + that zooming onto one hair might show geometric artefacts. */ +RTCORE_API uniform unsigned int rtcNewBSplineHairGeometry (RTCScene scene, //!< the scene the curves belong to + uniform RTCGeometryFlags flags, //!< geometry flags + uniform unsigned int numCurves, //!< number of curves + uniform unsigned int numVertices, //!< number of vertices + uniform unsigned int numTimeSteps = 1 //!< number of motion blur time steps + ); + +RTCORE_API uniform unsigned int rtcNewBSplineHairGeometry2(RTCScene scene, //!< the scene the curves belong to + uniform RTCGeometryFlags flags, //!< geometry flags + uniform unsigned int numCurves, //!< number of curves + uniform unsigned int numVertices, //!< number of vertices + uniform unsigned int numTimeSteps = 1, //!< number of motion blur time steps + uniform unsigned int geomID = -1 //!< optional geometry ID to assign + ); + +/*! \brief Creates a new curve geometry, consisting of multiple curves + represented as cubic bezier curves with varying radii. + + WARNING: This function is deprecated, use rtcNewBezierCurveGeometry instead. + + The intersected surface is defined as the sweep of a varying radius + circle perpendicular along the curve. The number of curves + (numCurves), number of vertices (numVertices), and number of time + steps have to get specified at construction time (1 for normal + meshes, and up to RTC_MAX_TIME_STEPS for multi-segment motion + blur). Further, the curve index buffer (RTC_INDEX_BUFFER) and the + curve vertex buffer (RTC_VERTEX_BUFFER) have to get set by mapping + and writing to the appropiate buffers. In case of multi-segment + motion blur, multiple vertex buffers have to get filled + (RTC_VERTEX_BUFFER0, RTC_VERTEX_BUFFER1, etc.), one for each time + step. The index buffer has the default layout of a single 32 bit + integer index for each curve, that references the start vertex of + the curve. The vertex buffer stores 4 control points per curve, each + such control point consists of a single precision (x,y,z) position + and radius, stored in that order in memory. */ +RTCORE_DEPRECATED uniform unsigned int rtcNewCurveGeometry (RTCScene scene, //!< the scene the curves belong to + uniform RTCGeometryFlags flags, //!< geometry flags + uniform size_t numCurves, //!< number of curves + uniform size_t numVertices, //!< number of vertices + uniform size_t numTimeSteps = 1 //!< number of motion blur time steps + ); + +/*! \brief Creates a new curve geometry, consisting of multiple curves + represented as cubic bezier curves with varying radii. The + intersected surface is defined as the sweep of a varying radius + circle perpendicular along the curve. The number of curves + (numCurves), number of vertices (numVertices), and number of time + steps have to get specified at construction time (1 for normal + meshes, and up to RTC_MAX_TIME_STEPS for multi-segment motion + blur). Further, the curve index buffer (RTC_INDEX_BUFFER) and the + curve vertex buffer (RTC_VERTEX_BUFFER) have to get set by mapping + and writing to the appropiate buffers. In case of multi-segment + motion blur, multiple vertex buffers have to get filled + (RTC_VERTEX_BUFFER0, RTC_VERTEX_BUFFER1, etc.), one for each time + step. The index buffer has the default layout of a single 32 bit + integer index for each curve, that references the start vertex of + the curve. The vertex buffer stores 4 control points per curve, each + such control point consists of a single precision (x,y,z) position + and radius, stored in that order in memory. */ +RTCORE_API uniform unsigned int rtcNewBezierCurveGeometry (RTCScene scene, //!< the scene the curves belong to + uniform RTCGeometryFlags flags, //!< geometry flags + uniform unsigned int numCurves, //!< number of curves + uniform unsigned int numVertices, //!< number of vertices + uniform unsigned int numTimeSteps = 1 //!< number of motion blur time steps + ); + +RTCORE_API uniform unsigned int rtcNewBezierCurveGeometry2(RTCScene scene, //!< the scene the curves belong to + uniform RTCGeometryFlags flags, //!< geometry flags + uniform unsigned int numCurves, //!< number of curves + uniform unsigned int numVertices, //!< number of vertices + uniform unsigned int numTimeSteps = 1, //!< number of motion blur time steps + uniform unsigned int geomID = -1 //!< optional geometry ID to assign + ); + +/*! \brief Creates a new curve geometry, consisting of multiple curves + represented as cubic bspline curves with varying radii. The + intersected surface is defined as the sweep of a varying radius + circle perpendicular along the curve. The number of curves + (numCurves), number of vertices (numVertices), and number of time + steps have to get specified at construction time (1 for normal + meshes, and up to RTC_MAX_TIME_STEPS for multi-segment motion + blur). Further, the curve index buffer (RTC_INDEX_BUFFER) and the + curve vertex buffer (RTC_VERTEX_BUFFER) have to get set by mapping + and writing to the appropiate buffers. In case of multi-segment + motion blur, multiple vertex buffers have to get filled + (RTC_VERTEX_BUFFER0, RTC_VERTEX_BUFFER1, etc.), one for each time + step. The index buffer has the default layout of a single 32 bit + integer index for each curve, that references the start vertex of + the curve. The vertex buffer stores 4 control points per curve, each + such control point consists of a single precision (x,y,z) position + and radius, stored in that order in memory. */ +RTCORE_API uniform unsigned int rtcNewBSplineCurveGeometry (RTCScene scene, //!< the scene the curves belong to + uniform RTCGeometryFlags flags, //!< geometry flags + uniform unsigned int numCurves, //!< number of curves + uniform unsigned int numVertices, //!< number of vertices + uniform unsigned int numTimeSteps = 1 //!< number of motion blur time steps + ); + +RTCORE_API uniform unsigned int rtcNewBSplineCurveGeometry2(RTCScene scene, //!< the scene the curves belong to + uniform RTCGeometryFlags flags, //!< geometry flags + uniform unsigned int numCurves, //!< number of curves + uniform unsigned int numVertices, //!< number of vertices + uniform unsigned int numTimeSteps = 1, //!< number of motion blur time steps + uniform unsigned int geomID = -1 //!< optional geometry ID to assign + ); + +/*! \brief Creates a new line segment geometry, consisting of multiple + segments with varying radii. The number of line segments + (numSegments), number of vertices (numVertices), and number of time + steps have to get specified at construction time (1 for normal + meshes, and up to RTC_MAX_TIME_STEPS for multi-segment motion + blur). Further, the segment index buffer (RTC_INDEX_BUFFER) and the + segment vertex buffer (RTC_VERTEX_BUFFER) have to get set by mapping + and writing to the appropiate buffers. In case of multi-segment + motion blur, multiple vertex buffers have to get filled + (RTC_VERTEX_BUFFER0, RTC_VERTEX_BUFFER1, etc.), one for each time + step. The index buffer has the default layout of a single 32 bit + integer index for each line segment, that references the start + vertex of the segment. The vertex buffer stores 2 end points per + line segment, each such point consists of a single precision (x,y,z) + position and radius, stored in that order in memory. Individual + segments are considered to be subpixel sized which allows the + implementation to approximate the intersection calculation. This in + particular means that zooming onto one line segment might show + geometric artefacts. */ +uniform unsigned int rtcNewLineSegments (RTCScene scene, //!< the scene the line segments belong to + uniform RTCGeometryFlags flags, //!< geometry flags + uniform size_t numSegments, //!< number of line segments + uniform size_t numVertices, //!< number of vertices + uniform size_t numTimeSteps = 1 //!< number of motion blur time steps + ); + +uniform unsigned int rtcNewLineSegments2(RTCScene scene, //!< the scene the line segments belong to + uniform RTCGeometryFlags flags, //!< geometry flags + uniform size_t numSegments, //!< number of line segments + uniform size_t numVertices, //!< number of vertices + uniform size_t numTimeSteps = 1, //!< number of motion blur time steps + uniform unsigned int geomID = -1 //!< optional geometry ID to assign + ); + +/*! Sets a uniform tessellation rate for subdiv meshes and hair + * geometry. For subdivision meshes the RTC_LEVEL_BUFFER can also be used + * optionally to set a different tessellation rate per edge.*/ +void rtcSetTessellationRate (RTCScene scene, uniform unsigned int geomID, uniform float tessellationRate); + +/*! \brief Sets 32 bit ray mask. */ +void rtcSetMask (RTCScene scene, uniform unsigned int geomID, uniform int mask); + +/*! \brief Sets boundary interpolation mode for default subdivision surface topology. + WARNING: This function is deprecated, use rtcSetSubdivisionMode instead. + */ +RTCORE_DEPRECATED void rtcSetBoundaryMode(RTCScene scene, uniform unsigned int geomID, uniform RTCBoundaryMode mode); + +/*! \brief Sets boundary interpolation mode for specified subdivision surface topology */ +void rtcSetSubdivisionMode(RTCScene scene, uniform unsigned int geomID, uniform unsigned int topologyID, uniform RTCSubdivisionMode mode); + +/*! \brief Binds a user vertex buffer to some index buffer topology. */ +void rtcSetIndexBuffer(RTCScene scene, uniform unsigned int geomID, uniform RTCBufferType vertexBuffer, uniform RTCBufferType indexBuffer); + +/*! \brief Maps specified buffer. This function can be used to set index and + * vertex buffers of geometries. */ +void* uniform rtcMapBuffer(RTCScene scene, uniform unsigned int geomID, uniform RTCBufferType type); + +/*! \brief Unmaps specified buffer. + + A buffer has to be unmapped before the rtcEnable, rtcDisable, + rtcUpdate, or rtcDeleteGeometry calls are executed. */ +void rtcUnmapBuffer(RTCScene scene, uniform unsigned int geomID, uniform RTCBufferType type); + +/*! \brief Shares a data buffer between the application and + * Embree. + + WARNING: This function is deprecated, use rtcSetBuffer2 instead. + + * The passed buffer is used by Embree to store index and vertex + * data. It has to remain valid as long as the mesh exists, and the + * user is responsible to free the data when the mesh gets + * deleted. One can optionally speficy a byte offset and byte stride + * of the elements stored inside the buffer. The addresses + * ptr+offset+i*stride have to be aligned to 4 bytes on Xeon CPUs and + * 16 bytes on Xeon Phi accelerators. For vertex buffers, the 4 bytes + * after the z-coordinate of the last vertex have to be readable + * memory, thus padding is required for some layouts. If this + * function is not called, Embree will allocate and manage buffers of + * the default layout. */ +void rtcSetBuffer(RTCScene scene, uniform unsigned int geomID, uniform RTCBufferType type, + const void* uniform ptr, uniform size_t byteOffset, uniform size_t byteStride); + +/*! \brief Shares a data buffer between the application and + * Embree. The data has to remain valid as long as the mesh exists, + * and the user is responsible to free the data when the mesh gets + * deleted. For sharing the buffer, one has to specify the number of + * elements of the buffer, a byte offset to the first element, and + * byte stride of elements stored inside the buffer. The addresses + * ptr+offset+i*stride have to be aligned to 4 bytes. For vertex + * buffers and user vertex buffers the buffer has to be padded with 0 + * to a size of a multiple of 16 bytes, as Embree always accesses + * vertex buffers and user vertex buffers using SSE instructions. If + * this function is not called, Embree will allocate and manage + * buffers of the default layout. */ +void rtcSetBuffer2(RTCScene scene, uniform unsigned int geomID, uniform RTCBufferType type, + const void* uniform ptr, uniform size_t byteOffset, uniform size_t byteStride, uniform size_t size = -1); + +/*! \brief Enable geometry. Enabled geometry can be hit by a ray. */ +void rtcEnable (RTCScene scene, uniform unsigned int geomID); + +/*! \brief Update spefific geometry buffer. + + Each time geometry buffers got modified, the user has to call some + update function to tell the ray tracing engine which buffers got + modified. The rtcUpdateBuffer function taggs a specific buffer of + some geometry as modified. */ +void rtcUpdate (RTCScene scene, uniform unsigned int geomID); + +/*! \brief Update spefific geometry buffer. + + Each time geometry buffers got modified, the user has to call some + update function to tell the ray tracing engine which buffers got + modified. The rtcUpdateBuffer function taggs a specific buffer of + some geometry as modified. */ +void rtcUpdateBuffer (RTCScene scene, uniform unsigned int geomID, uniform RTCBufferType type); + +/*! \brief Disable geometry. + + Disabled geometry is not hit by any ray. Disabling and enabling + geometry gives higher performance than deleting and recreating + geometry. */ +void rtcDisable (RTCScene scene, uniform unsigned int geomID); + +/*! \brief Sets the displacement function. */ +void rtcSetDisplacementFunction (RTCScene scene, uniform unsigned int geomID, uniform RTCDisplacementFunc func, uniform RTCBounds *uniform bounds); + +/*! \brief Sets the displacement function. */ +void rtcSetDisplacementFunction2 (RTCScene scene, uniform unsigned int geomID, uniform RTCDisplacementFunc2 func, uniform RTCBounds *uniform bounds); + +/*! \brief Sets the intersection filter function for uniform rays. */ +void rtcSetIntersectionFilterFunction1 (RTCScene scene, uniform unsigned int geomID, uniform RTCFilterFuncUniform func); + +/*! \brief Sets the intersection filter function for varying rays. */ +void rtcSetIntersectionFilterFunction (RTCScene scene, uniform unsigned int geomID, uniform RTCFilterFuncVarying func); + +/*! \brief Sets the intersection filter function for ray packets of size N. */ +void rtcSetIntersectionFilterFunctionN (RTCScene scene, uniform unsigned int geomID, uniform RTCFilterFuncN func); + +/*! \brief Sets the occlusion filter function for uniform rays. */ +void rtcSetOcclusionFilterFunction1 (RTCScene scene, uniform unsigned int geomID, uniform RTCFilterFuncUniform func); + +/*! \brief Sets the occlusion filter function for varying rays. */ +void rtcSetOcclusionFilterFunction (RTCScene scene, uniform unsigned int geomID, uniform RTCFilterFuncVarying func); + +/*! \brief Sets the occlusion filter function for ray packets of size N. */ +void rtcSetOcclusionFilterFunctionN (RTCScene scene, uniform unsigned int geomID, uniform RTCFilterFuncN func); + +/*! Set pointer for user defined data per geometry. Invokations + * of the various user intersect and occluded functions get passed + * this data pointer when called. */ +void rtcSetUserData (RTCScene scene, uniform unsigned int geomID, void* uniform ptr); + +/*! Get pointer for user defined data per geometry based on geomID. */ +void* uniform rtcGetUserData (RTCScene scene, uniform unsigned int geomID); + +/*! Interpolates user data to some varying u/v location. The data + * buffer specifies per vertex data to interpolate and can be one of + * the RTC_VERTEX_BUFFER0/1 or RTC_USER_VERTEX_BUFFER0/1 and has to contain + * numFloats floating point values to interpolate for each vertex of + * the geometry. The P array will get filled with the interpolated + * data, and the dPdu and dPdv arrays with the u and v derivative of + * the interpolation. If the pointers P is NULL, the value will not + * get calculated. If dPdu and dPdv are NULL the derivatives will not + * get calculated. Both dPdu and dPdv have to be either valid or + * NULL. These destination arrays are filled in structure of array + * (SoA) layout. The buffer has to be padded at the end such + * that the last element can be read safely using SSE + * instructions. */ +void rtcInterpolate(RTCScene scene, uniform unsigned int geomID, varying unsigned int primIDs, varying float u, varying float v, + uniform RTCBufferType buffer, + varying float* uniform P, varying float* uniform dPdu, varying float* uniform dPdv, uniform size_t numFloats); + +/*! Interpolates user data to some varying u/v location. The data + * buffer specifies per vertex data to interpolate and can be one of + * the RTC_VERTEX_BUFFER0/1 or RTC_USER_VERTEX_BUFFER0/1 and has to contain + * numFloats floating point values to interpolate for each vertex of + * the geometry. The P array will get filled with the + * interpolated datam the dPdu and dPdv arrays with the u and v + * derivative of the interpolation, and the ddPdudu, ddPdvdv, and + * ddPdudv arrays with the respective second derivatives. One can + * disable 1) the calculation of the interpolated value by setting P + * to NULL, 2) the calculation of the 1st order derivatives by + * setting dPdu and dPdv to NULL, 3) the calculation of the second + * order derivatives by setting ddPdudu, ddPdvdv, and ddPdudv to + * NULL. These destination arrays are filled in structure of array + * (SoA) layout. The buffer has to be padded at the end such that + * the last element can be read safely using SSE + * instructions. */ +void rtcInterpolate2(RTCScene scene, uniform unsigned int geomID, varying unsigned int primIDs, varying float u, varying float v, + uniform RTCBufferType buffer, + varying float* uniform P, varying float* uniform dPdu, varying float* uniform dPdv, + varying float* uniform ddPdudu, varying float* uniform ddPdvdv, varying float* uniform ddPdudv, + uniform size_t numFloats); + +/*! \brief Deletes the geometry. */ +void rtcDeleteGeometry (RTCScene scene, uniform unsigned int geomID); + +/*! @} */ + +#endif diff --git a/pyembree/embree2/rtcore_geometry_user.h b/pyembree/embree2/rtcore_geometry_user.h new file mode 100644 index 0000000..ab77ae2 --- /dev/null +++ b/pyembree/embree2/rtcore_geometry_user.h @@ -0,0 +1,231 @@ +// ======================================================================== // +// Copyright 2009-2018 Intel Corporation // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// ======================================================================== // + +#ifndef __RTCORE_USER_GEOMETRY_H__ +#define __RTCORE_USER_GEOMETRY_H__ + +/*! \ingroup embree_kernel_api */ +/*! \{ */ + +/*! Type of bounding function. */ +typedef void (*RTCBoundsFunc)(void* ptr, /*!< pointer to user data */ + size_t item, /*!< item to calculate bounds for */ + RTCBounds& bounds_o /*!< returns calculated bounds */); + +/*! Type of bounding function. */ +typedef void (*RTCBoundsFunc2)(void* userPtr, /*!< pointer to user data */ + void* geomUserPtr, /*!< pointer to geometry user data */ + size_t item, /*!< item to calculate bounds for */ + RTCBounds* bounds_o /*!< returns calculated bounds */); + +/*! Type of bounding function. */ +typedef void (*RTCBoundsFunc3)(void* userPtr, /*!< pointer to user data */ + void* geomUserPtr, /*!< pointer to geometry user data */ + size_t item, /*!< item to calculate bounds for */ + size_t time, /*!< time to calculate bounds for */ + RTCBounds& bounds_o /*!< returns calculated bounds */); + +/*! Type of intersect function pointer for single rays. */ +typedef void (*RTCIntersectFunc)(void* ptr, /*!< pointer to user data */ + RTCRay& ray, /*!< ray to intersect */ + size_t item /*!< item to intersect */); + +/*! Type of intersect function pointer for ray packets of size 4. */ +typedef void (*RTCIntersectFunc4)(const void* valid, /*!< pointer to valid mask */ + void* ptr, /*!< pointer to user data */ + RTCRay4& ray, /*!< ray packet to intersect */ + size_t item /*!< item to intersect */); + +/*! Type of intersect function pointer for ray packets of size 8. */ +typedef void (*RTCIntersectFunc8)(const void* valid, /*!< pointer to valid mask */ + void* ptr, /*!< pointer to user data */ + RTCRay8& ray, /*!< ray packet to intersect */ + size_t item /*!< item to intersect */); + +/*! Type of intersect function pointer for ray packets of size 16. */ +typedef void (*RTCIntersectFunc16)(const void* valid, /*!< pointer to valid mask */ + void* ptr, /*!< pointer to user data */ + RTCRay16& ray, /*!< ray packet to intersect */ + size_t item /*!< item to intersect */); + +/*! Type of intersect function pointer for stream of rays. */ +typedef void (*RTCIntersectFunc1Mp)(void* ptr, /*!< pointer to geometry user data */ + const RTCIntersectContext* context, /*!< intersection context as passed to rtcIntersect/rtcOccluded */ + RTCRay** rays, /*!< pointers to rays to intersect */ + size_t M, /*!< number of rays in stream */ + size_t item /*!< item to intersect */); + +/*! Type of intersect function pointer for ray packets of size N. */ +typedef void (*RTCIntersectFuncN)(const int* valid, /*!< pointer to valid mask */ + void* ptr, /*!< pointer to geometry user data */ + const RTCIntersectContext* context, /*!< intersection context as passed to rtcIntersect/rtcOccluded */ + RTCRayN* rays, /*!< ray packet to intersect */ + size_t N, /*!< number of rays in packet */ + size_t item /*!< item to intersect */); + +/*! Type of occlusion function pointer for single rays. */ +typedef void (*RTCOccludedFunc) (void* ptr, /*!< pointer to user data */ + RTCRay& ray, /*!< ray to test occlusion */ + size_t item /*!< item to test for occlusion */); + +/*! Type of occlusion function pointer for ray packets of size 4. */ +typedef void (*RTCOccludedFunc4) (const void* valid, /*! pointer to valid mask */ + void* ptr, /*!< pointer to user data */ + RTCRay4& ray, /*!< Ray packet to test occlusion. */ + size_t item /*!< item to test for occlusion */); + +/*! Type of occlusion function pointer for ray packets of size 8. */ +typedef void (*RTCOccludedFunc8) (const void* valid, /*! pointer to valid mask */ + void* ptr, /*!< pointer to user data */ + RTCRay8& ray, /*!< Ray packet to test occlusion. */ + size_t item /*!< item to test for occlusion */); + +/*! Type of occlusion function pointer for ray packets of size 16. */ +typedef void (*RTCOccludedFunc16) (const void* valid, /*! pointer to valid mask */ + void* ptr, /*!< pointer to user data */ + RTCRay16& ray, /*!< Ray packet to test occlusion. */ + size_t item /*!< item to test for occlusion */); + +/*! Type of occlusion function pointer for stream of rays. */ +typedef void (*RTCOccludedFunc1Mp) (void* ptr, /*!< pointer to geometry user data */ + const RTCIntersectContext* context, /*!< intersection context as passed to rtcIntersect/rtcOccluded */ + RTCRay** rays, /*!< pointers to rays to test occlusion */ + size_t M, /*!< number of rays in stream */ + size_t item /*!< item to test for occlusion */); + +/*! Type of occlusion function pointer for ray packets of size N. */ +typedef void (*RTCOccludedFuncN) (const int* valid, /*! pointer to valid mask */ + void* ptr, /*!< pointer to user data */ + const RTCIntersectContext* context, /*!< intersection context as passed to rtcIntersect/rtcOccluded */ + RTCRayN* rays, /*!< Ray packet to test occlusion for. */ + size_t N, /*!< number of rays in packet */ + size_t item /*!< item to test for occlusion */); + +/*! Creates a new user geometry object. This feature makes it possible + * to add arbitrary types of geometry to the scene by providing + * appropiate bounding, intersect and occluded functions. A user + * geometry object is a set of user geometries. As the rtcIntersect + * and rtcOccluded functions support different ray packet sizes, the + * user also has to provide different versions of intersect and + * occluded function pointers for these packet sizes. However, the + * ray packet size of the called function pointer always matches the + * packet size of the originally invoked rtcIntersect and rtcOccluded + * functions. A user data pointer, that points to a user specified + * representation of the geometry, is passed to each intersect and + * occluded function invokation, as well as the index of the geometry + * of the set to intersect. */ +RTCORE_API unsigned rtcNewUserGeometry (RTCScene scene, /*!< the scene the user geometry set is created in */ + size_t numGeometries /*!< the number of geometries contained in the set */); + +RTCORE_API unsigned rtcNewUserGeometry2 (RTCScene scene, /*!< the scene the user geometry set is created in */ + size_t numGeometries, /*!< the number of geometries contained in the set */ + size_t numTimeSteps = 1 /*!< number of motion blur time steps */); + +RTCORE_API unsigned rtcNewUserGeometry3 (RTCScene scene, /*!< the scene the user geometry set is created in */ + RTCGeometryFlags gflags, //!< geometry flags + size_t numGeometries, /*!< the number of geometries contained in the set */ + size_t numTimeSteps = 1 /*!< number of motion blur time steps */); + +RTCORE_API unsigned rtcNewUserGeometry4 (RTCScene scene, /*!< the scene the user geometry set is created in */ + RTCGeometryFlags gflags, //!< geometry flags + size_t numGeometries, /*!< the number of geometries contained in the set */ + size_t numTimeSteps = 1, /*!< number of motion blur time steps */ + unsigned int geomID = -1 /*!< optional geometry ID to assign */ + ); + + +/*! Sets the bounding function to calculate bounding boxes of the user + * geometry items when building spatial index structures. The + * calculated bounding box have to be conservative and should be + * tight. */ +RTCORE_API void rtcSetBoundsFunction (RTCScene scene, unsigned geomID, RTCBoundsFunc bounds); + +/*! Sets the bounding function to calculate bounding boxes of the user + * geometry items when building spatial index structures. The + * calculated bounding box have to be conservative and should be + * tight. */ +RTCORE_API void rtcSetBoundsFunction2 (RTCScene scene, unsigned geomID, RTCBoundsFunc2 bounds, void* userPtr); + +/*! Sets the bounding function to calculate bounding boxes of the user + * geometry items when building spatial index structures. The + * calculated bounding box have to be conservative and should be + * tight. */ +RTCORE_API void rtcSetBoundsFunction3 (RTCScene scene, unsigned geomID, RTCBoundsFunc3 bounds, void* userPtr); + +/*! Set intersect function for single rays. The rtcIntersect function + * will call the passed function for intersecting the user + * geometry. */ +RTCORE_API void rtcSetIntersectFunction (RTCScene scene, unsigned geomID, RTCIntersectFunc intersect); + +/*! Set intersect function for ray packets of size 4. The + * rtcIntersect4 function will call the passed function for + * intersecting the user geometry. */ +RTCORE_API void rtcSetIntersectFunction4 (RTCScene scene, unsigned geomID, RTCIntersectFunc4 intersect4); + +/*! Set intersect function for ray packets of size 8. The + * rtcIntersect8 function will call the passed function for + * intersecting the user geometry.*/ +RTCORE_API void rtcSetIntersectFunction8 (RTCScene scene, unsigned geomID, RTCIntersectFunc8 intersect8); + +/*! Set intersect function for ray packets of size 16. The + * rtcIntersect16 function will call the passed function for + * intersecting the user geometry. */ +RTCORE_API void rtcSetIntersectFunction16 (RTCScene scene, unsigned geomID, RTCIntersectFunc16 intersect16); + +/*! Set intersect function for stream of rays. The rtcIntersectN function + * will call the passed function for intersecting the user + * geometry. */ +RTCORE_API void rtcSetIntersectFunction1Mp (RTCScene scene, unsigned geomID, RTCIntersectFunc1Mp intersect); + +/*! Set intersect function for ray packets of size N. The rtcIntersectN function + * will call the passed function for intersecting the user + * geometry. */ +RTCORE_API void rtcSetIntersectFunctionN (RTCScene scene, unsigned geomID, RTCIntersectFuncN intersect); + +/*! Set occlusion function for single rays. The rtcOccluded function + * will call the passed function for intersecting the user + * geometry. */ +RTCORE_API void rtcSetOccludedFunction (RTCScene scene, unsigned geomID, RTCOccludedFunc occluded); + +/*! Set occlusion function for ray packets of size 4. The rtcOccluded4 + * function will call the passed function for intersecting the user + * geometry. */ +RTCORE_API void rtcSetOccludedFunction4 (RTCScene scene, unsigned geomID, RTCOccludedFunc4 occluded4); + +/*! Set occlusion function for ray packets of size 8. The rtcOccluded8 + * function will call the passed function for intersecting the user + * geometry. */ +RTCORE_API void rtcSetOccludedFunction8 (RTCScene scene, unsigned geomID, RTCOccludedFunc8 occluded8); + +/*! Set occlusion function for ray packets of size 16. The + * rtcOccluded16 function will call the passed function for + * intersecting the user geometry. */ +RTCORE_API void rtcSetOccludedFunction16 (RTCScene scene, unsigned geomID, RTCOccludedFunc16 occluded16); + +/*! Set occlusion function for a stream of single rays. The rtcOccludedN function + * will call the passed function for intersecting the user + * geometry. */ +RTCORE_API void rtcSetOccludedFunction1Mp (RTCScene scene, unsigned geomID, RTCOccludedFunc1Mp occluded); + +/*! Set occlusion function for ray packets of size N. The rtcOccludedN function + * will call the passed function for intersecting the user + * geometry. */ +RTCORE_API void rtcSetOccludedFunctionN (RTCScene scene, unsigned geomID, RTCOccludedFuncN occluded); + + +/*! @} */ + +#endif diff --git a/pyembree/embree2/rtcore_geometry_user.isph b/pyembree/embree2/rtcore_geometry_user.isph new file mode 100644 index 0000000..c011e9e --- /dev/null +++ b/pyembree/embree2/rtcore_geometry_user.isph @@ -0,0 +1,185 @@ +// ======================================================================== // +// Copyright 2009-2018 Intel Corporation // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// ======================================================================== // + +#ifndef __RTCORE_USER_GEOMETRY_ISPH__ +#define __RTCORE_USER_GEOMETRY_ISPH__ + +/*! \ingroup embree_kernel_api_ispc */ +/*! \{ */ + +/*! Type of bounding function. */ +typedef unmasked void (*RTCBoundsFunc)(void* uniform ptr, /*!< pointer to user data */ + uniform uintptr_t item, /*!< item to calculate bounds for */ + uniform RTCBounds& bounds_o /*!< returns calculated bounds */); + +/*! Type of bounding function. */ +typedef unmasked void (*RTCBoundsFunc2)(void* uniform userPtr, /*!< pointer to user data */ + void* uniform geomUserPtr, /*!< pointer to geometry user data */ + uniform uintptr_t item, /*!< item to calculate bounds for */ + RTCBounds* uniform bounds_o /*!< returns calculated bounds */); + +/*! Type of bounding function. */ +typedef unmasked void (*RTCBoundsFunc3)(void* uniform userPtr, /*!< pointer to user data */ + void* uniform geomUserPtr, /*!< pointer to geometry user data */ + uniform uintptr_t item, /*!< item to calculate bounds for */ + uniform uintptr_t time, /*!< time to calculate bounds for */ + uniform RTCBounds& bounds_o /*!< returns calculated bounds */); + +/*! Type of intersect function pointer for uniform rays. */ +typedef unmasked void (*RTCIntersectFuncUniform)(void* uniform ptr, /*!< pointer to user data */ + uniform RTCRay1& ray, /*!< ray to intersect */ + uniform uintptr_t item /*< item to intersect */); + +/*! Type of intersect function pointer for varying rays. */ +typedef void (*RTCIntersectFuncVarying)(void* uniform ptr, /*!< pointer to user data */ + varying RTCRay& ray, /*!< ray to intersect */ + uniform uintptr_t item /*< item to intersect */); + +/*! Type of intersect function pointer for stream of uniform rays. */ +typedef unmasked void (*RTCIntersectFunc1Mp)(void* uniform ptr, /*!< pointer to geometry user data */ + const uniform RTCIntersectContext* uniform context, /*!< intersection context as passed to rtcIntersect/rtcOccluded */ + uniform RTCRay1** uniform ray, /*!< pointers to rays to intersect */ + uniform uintptr_t M, /*< number of rays in stream */ + uniform uintptr_t item /*< item to intersect */); + +/*! Type of intersect function pointer for ray packets of size N. */ +typedef unmasked void (*RTCIntersectFuncN)(const uniform int* uniform valid, /*! pointer to valid mask */ + void* uniform ptr, /*!< pointer to geometry user data */ + const uniform RTCIntersectContext* uniform context, /*!< intersection context as passed to rtcIntersect/rtcOccluded */ + RTCRayN* uniform rays, /*!< ray packet of size N */ + uniform uintptr_t N, /*< number of rays in ray packet */ + uniform uintptr_t item /*< item to intersect */); + +/*! Type of occlusion function pointer for uniform rays. */ +typedef unmasked void (*RTCOccludedFuncUniform) (void* uniform ptr, /*!< pointer to user data */ + uniform RTCRay1& ray, /*!< ray to test occlusion */ + uniform uintptr_t item /*< item to test for occlusion */); + +/*! Type of occlusion function pointer for varying rays. */ +typedef void (*RTCOccludedFuncVarying) (void* uniform ptr, /*!< pointer to user data */ + varying RTCRay& ray, /*!< ray to test occlusion */ + uniform uintptr_t item /*< item to test for occlusion */); + +/*! Type of occlusion function pointer for stream of uniform rays. */ +typedef unmasked void (*RTCOccludedFunc1Mp) (void* uniform ptr, /*!< pointer to geometry user data */ + const uniform RTCIntersectContext* uniform context, /*!< intersection context as passed to rtcIntersect/rtcOccluded */ + uniform RTCRay1** uniform ray, /*!< pointers to rays to test occlusion */ + uniform uintptr_t M, /*< number of rays in stream */ + uniform uintptr_t item /*< item to test for occlusion */); + +/*! Type of occlusion function pointer for ray packets of size N. */ +typedef unmasked void (*RTCOccludedFuncN) (const uniform int* uniform valid, /*! pointer to valid mask */ + void* uniform ptr, /*!< pointer to geometry user data */ + const uniform RTCIntersectContext* uniform context, /*!< intersection context as passed to rtcIntersect/rtcOccluded */ + RTCRayN* uniform ray, /*!< ray packet of size N */ + uniform uintptr_t N, /*< number of rays in ray packet*/ + uniform uintptr_t item /*< item to test for occlusion */); + + +/*! Creates a new user geometry object. This feature makes it possible + * to add arbitrary types of geometry to the scene by providing + * appropiate intersect and occluded functions, as well as a bounding + * box of the implemented geometry. As the rtcIntersect and + * rtcOccluded functions support different ray packet sizes, the user + * also has to provide different versions of intersect and occluded + * function pointers for the different packet sized. However, only + * rtcIntersect and rtcOccluded functions of specific packet sizes + * are called, it is sufficient to provide only the corresponding + * function pointer for the user geometry. However, the functions + * provided have to intersect the same geometry. A user data pointer, + * that points to a user specified representation of the geometry, is + * passed to each intersect and occluded function invokation. */ +uniform unsigned int rtcNewUserGeometry (RTCScene scene, /*!< the scene the user geometry set is created in */ + uniform size_t numGeometries /*!< the number of geometries contained in the set */); + +uniform unsigned int rtcNewUserGeometry2 (RTCScene scene, /*!< the scene the user geometry set is created in */ + uniform size_t numGeometries, /*!< the number of geometries contained in the set */ + uniform size_t numTimeSteps = 1 /*!< number of motion blur time steps */); + +uniform unsigned int rtcNewUserGeometry3 (RTCScene scene, /*!< the scene the user geometry set is created in */ + uniform RTCGeometryFlags flags, //!< geometry flags + uniform size_t numGeometries, /*!< the number of geometries contained in the set */ + uniform size_t numTimeSteps = 1 /*!< number of motion blur time steps */); + + +uniform unsigned int rtcNewUserGeometry4 (RTCScene scene, /*!< the scene the user geometry set is created in */ + uniform RTCGeometryFlags flags, //!< geometry flags + uniform size_t numGeometries, /*!< the number of geometries contained in the set */ + uniform size_t numTimeSteps = 1, /*!< number of motion blur time steps */ + uniform unsigned int geomID = -1 /*!< optional geometry ID to assign */ + ); + +/*! Sets the bounding function to calculate bounding boxes of the user + * geometry items when building spatial index structures. The + * calculated bounding box have to be conservative and should be + * tight.*/ +void rtcSetBoundsFunction (RTCScene scene, uniform unsigned int geomID, uniform RTCBoundsFunc bounds); + +/*! Sets the bounding function to calculate bounding boxes of the user + * geometry items when building spatial index structures. The + * calculated bounding box have to be conservative and should be + * tight.*/ +void rtcSetBoundsFunction2 (RTCScene scene, uniform unsigned int geomID, uniform RTCBoundsFunc2 bounds, void* uniform userPtr); + +/*! Sets the bounding function to calculate bounding boxes of the user + * geometry items when building spatial index structures. The + * calculated bounding box have to be conservative and should be + * tight.*/ +void rtcSetBoundsFunction3 (RTCScene scene, uniform unsigned int geomID, uniform RTCBoundsFunc3 bounds, void* uniform userPtr); + +/*! Set intersect function for uniform rays. The rtcIntersect1 + * function will call the passed function for intersecting the user + * geometry. */ +void rtcSetIntersectFunction1 (RTCScene scene, uniform unsigned int geomID, uniform RTCIntersectFuncUniform intersect); + +/*! Set intersect function for varying rays. The rtcIntersect function + * will call the passed function for intersecting the user + * geometry. */ +void rtcSetIntersectFunction (RTCScene scene, uniform unsigned int geomID, uniform RTCIntersectFuncVarying intersect); + +/*! Set intersect function for stream of rays. The rtcIntersectN function + * will call the passed function for intersecting the user + * geometry. */ +void rtcSetIntersectFunction1Mp (RTCScene scene, uniform unsigned int geomID, uniform RTCIntersectFunc1Mp intersect); + +/*! Set intersect function for ray packets of size N. The rtcIntersectN function + * will call the passed function for intersecting the user + * geometry. */ +void rtcSetIntersectFunctionN (RTCScene scene, uniform unsigned int geomID, uniform RTCIntersectFuncN intersect); + +/*! Set occlusion function for uniform rays. The rtcOccluded1 function + * will call the passed function for intersecting the user + * geometry. */ +void rtcSetOccludedFunction1 (RTCScene scene, uniform unsigned int geomID, uniform RTCOccludedFuncUniform occluded); + +/*! Set occlusion function for varying rays. The rtcOccluded function + * will call the passed function for intersecting the user + * geometry. */ +void rtcSetOccludedFunction (RTCScene scene, uniform unsigned int geomID, uniform RTCOccludedFuncVarying occluded); + +/*! Set occlusion function for a stream of single rays. The rtcOccludedN function + * will call the passed function for intersecting the user + * geometry. */ +void rtcSetOccludedFunction1Mp (RTCScene scene, uniform unsigned int geomID, uniform RTCOccludedFunc1Mp occluded); + +/*! Set occlusion function for a ray packets of size N. The rtcOccludedN function + * will call the passed function for intersecting the user + * geometry. */ +void rtcSetOccludedFunctionN (RTCScene scene, uniform unsigned int geomID, uniform RTCOccludedFuncN occluded); + +/*! @} */ + +#endif diff --git a/pyembree/embree2/rtcore_ray.h b/pyembree/embree2/rtcore_ray.h new file mode 100644 index 0000000..7b8f095 --- /dev/null +++ b/pyembree/embree2/rtcore_ray.h @@ -0,0 +1,310 @@ +// ======================================================================== // +// Copyright 2009-2018 Intel Corporation // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// ======================================================================== // + +#ifndef __RTCORE_RAY_H__ +#define __RTCORE_RAY_H__ + +#include "rtcore.h" + +/*! \ingroup embree_kernel_api */ +/*! \{ */ + +/*! \brief Ray structure for an individual ray */ +#ifndef __RTCRay__ +#define __RTCRay__ +struct RTCORE_ALIGN(16) RTCRay +{ + /* ray data */ +public: + float org[3]; //!< Ray origin + float align0; + + float dir[3]; //!< Ray direction + float align1; + + float tnear; //!< Start of ray segment + float tfar; //!< End of ray segment (set to hit distance) + + float time; //!< Time of this ray for motion blur + unsigned mask; //!< Used to mask out objects during traversal + + /* hit data */ +public: + float Ng[3]; //!< Unnormalized geometry normal + float align2; + + float u; //!< Barycentric u coordinate of hit + float v; //!< Barycentric v coordinate of hit + + unsigned geomID; //!< geometry ID + unsigned primID; //!< primitive ID + unsigned instID; //!< instance ID +}; +#endif + +/*! Ray structure for packets of 4 rays. */ +#ifndef __RTCRay4__ +#define __RTCRay4__ +struct RTCORE_ALIGN(16) RTCRay4 +{ + /* ray data */ +public: + float orgx[4]; //!< x coordinate of ray origin + float orgy[4]; //!< y coordinate of ray origin + float orgz[4]; //!< z coordinate of ray origin + + float dirx[4]; //!< x coordinate of ray direction + float diry[4]; //!< y coordinate of ray direction + float dirz[4]; //!< z coordinate of ray direction + + float tnear[4]; //!< Start of ray segment + float tfar[4]; //!< End of ray segment (set to hit distance) + + float time[4]; //!< Time of this ray for motion blur + unsigned mask[4]; //!< Used to mask out objects during traversal + + /* hit data */ +public: + float Ngx[4]; //!< x coordinate of geometry normal + float Ngy[4]; //!< y coordinate of geometry normal + float Ngz[4]; //!< z coordinate of geometry normal + + float u[4]; //!< Barycentric u coordinate of hit + float v[4]; //!< Barycentric v coordinate of hit + + unsigned geomID[4]; //!< geometry ID + unsigned primID[4]; //!< primitive ID + unsigned instID[4]; //!< instance ID +}; +#endif + +/*! Ray structure for packets of 8 rays. */ +#ifndef __RTCRay8__ +#define __RTCRay8__ +struct RTCORE_ALIGN(32) RTCRay8 +{ + /* ray data */ +public: + float orgx[8]; //!< x coordinate of ray origin + float orgy[8]; //!< y coordinate of ray origin + float orgz[8]; //!< z coordinate of ray origin + + float dirx[8]; //!< x coordinate of ray direction + float diry[8]; //!< y coordinate of ray direction + float dirz[8]; //!< z coordinate of ray direction + + float tnear[8]; //!< Start of ray segment + float tfar[8]; //!< End of ray segment (set to hit distance) + + float time[8]; //!< Time of this ray for motion blur + unsigned mask[8]; //!< Used to mask out objects during traversal + + /* hit data */ +public: + float Ngx[8]; //!< x coordinate of geometry normal + float Ngy[8]; //!< y coordinate of geometry normal + float Ngz[8]; //!< z coordinate of geometry normal + + float u[8]; //!< Barycentric u coordinate of hit + float v[8]; //!< Barycentric v coordinate of hit + + unsigned geomID[8]; //!< geometry ID + unsigned primID[8]; //!< primitive ID + unsigned instID[8]; //!< instance ID +}; +#endif + +/*! \brief Ray structure for packets of 16 rays. */ +#ifndef __RTCRay16__ +#define __RTCRay16__ +struct RTCORE_ALIGN(64) RTCRay16 +{ + /* ray data */ +public: + float orgx[16]; //!< x coordinate of ray origin + float orgy[16]; //!< y coordinate of ray origin + float orgz[16]; //!< z coordinate of ray origin + + float dirx[16]; //!< x coordinate of ray direction + float diry[16]; //!< y coordinate of ray direction + float dirz[16]; //!< z coordinate of ray direction + + float tnear[16]; //!< Start of ray segment + float tfar[16]; //!< End of ray segment (set to hit distance) + + float time[16]; //!< Time of this ray for motion blur + unsigned mask[16]; //!< Used to mask out objects during traversal + + /* hit data */ +public: + float Ngx[16]; //!< x coordinate of geometry normal + float Ngy[16]; //!< y coordinate of geometry normal + float Ngz[16]; //!< z coordinate of geometry normal + + float u[16]; //!< Barycentric u coordinate of hit + float v[16]; //!< Barycentric v coordinate of hit + + unsigned geomID[16]; //!< geometry ID + unsigned primID[16]; //!< primitive ID + unsigned instID[16]; //!< instance ID +}; +#endif + +/* Helper functions to access ray packets of runtime size N */ +#ifndef __RTCRayN__ +#define __RTCRayN__ +struct RTCRayN {}; +RTCORE_FORCEINLINE float& RTCRayN_org_x(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[0*N+0*N1+i]; } //!< x coordinate of ray origin +RTCORE_FORCEINLINE float& RTCRayN_org_y(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[1*N+0*N1+i]; } //!< y coordinate of ray origin +RTCORE_FORCEINLINE float& RTCRayN_org_z(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[2*N+0*N1+i]; } //!< z coordinate of ray origin + +RTCORE_FORCEINLINE float& RTCRayN_dir_x(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[3*N+1*N1+i]; } //!< x coordinate of ray direction +RTCORE_FORCEINLINE float& RTCRayN_dir_y(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[4*N+1*N1+i]; } //!< y coordinate of ray direction +RTCORE_FORCEINLINE float& RTCRayN_dir_z(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[5*N+1*N1+i]; } //!< z coordinate of ray direction + +RTCORE_FORCEINLINE float& RTCRayN_tnear(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[6*N+2*N1+i]; } //!< Start of ray segment +RTCORE_FORCEINLINE float& RTCRayN_tfar (RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[7*N+2*N1+i]; } //!< End of ray segment (set to hit distance) + +RTCORE_FORCEINLINE float& RTCRayN_time(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*) ptr)[8*N+2*N1+i]; } //!< Time of this ray for motion blur +RTCORE_FORCEINLINE unsigned& RTCRayN_mask(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((unsigned*)ptr)[9*N+2*N1+i]; } //!< Used to mask out objects during traversal + +RTCORE_FORCEINLINE float& RTCRayN_Ng_x(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[10*N+2*N1+i]; } //!< x coordinate of geometry normal +RTCORE_FORCEINLINE float& RTCRayN_Ng_y(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[11*N+2*N1+i]; } //!< y coordinate of geometry normal +RTCORE_FORCEINLINE float& RTCRayN_Ng_z(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[12*N+2*N1+i]; } //!< z coordinate of geometry normal + +RTCORE_FORCEINLINE float& RTCRayN_u (RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[13*N+3*N1+i]; } //!< Barycentric u coordinate of hit +RTCORE_FORCEINLINE float& RTCRayN_v (RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[14*N+3*N1+i]; } //!< Barycentric v coordinate of hit + +RTCORE_FORCEINLINE unsigned& RTCRayN_geomID(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((unsigned*)ptr)[15*N+3*N1+i]; } //!< geometry ID +RTCORE_FORCEINLINE unsigned& RTCRayN_primID(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((unsigned*)ptr)[16*N+3*N1+i]; } //!< primitive ID +RTCORE_FORCEINLINE unsigned& RTCRayN_instID(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((unsigned*)ptr)[17*N+3*N1+i]; } //!< instance ID +#endif + +/* Helper structure to create a ray packet of compile time size N */ +#ifndef __RTCRayNt__ +#define __RTCRayNt__ +template +struct RTCRayNt : public RTCRayN +{ + /* ray data */ +public: + float orgx[N]; //!< x coordinate of ray origin + float orgy[N]; //!< y coordinate of ray origin + float orgz[N]; //!< z coordinate of ray origin + + float dirx[N]; //!< x coordinate of ray direction + float diry[N]; //!< y coordinate of ray direction + float dirz[N]; //!< z coordinate of ray direction + + float tnear[N]; //!< Start of ray segment + float tfar[N]; //!< End of ray segment (set to hit distance) + + float time[N]; //!< Time of this ray for motion blur + unsigned mask[N]; //!< Used to mask out objects during traversal + + /* hit data */ +public: + float Ngx[N]; //!< x coordinate of geometry normal + float Ngy[N]; //!< y coordinate of geometry normal + float Ngz[N]; //!< z coordinate of geometry normal + + float u[N]; //!< Barycentric u coordinate of hit + float v[N]; //!< Barycentric v coordinate of hit + + unsigned geomID[N]; //!< geometry ID + unsigned primID[N]; //!< primitive ID + unsigned instID[N]; //!< instance ID +}; +#endif + +/*! \brief Ray structure template for packets of N rays in pointer SOA layout. */ +#ifndef __RTCRayNp__ +#define __RTCRayNp__ +struct RTCRayNp +{ + /* ray data */ +public: + + float* orgx; //!< x coordinate of ray origin + float* orgy; //!< y coordinate of ray origin + float* orgz; //!< z coordinate of ray origin + + float* dirx; //!< x coordinate of ray direction + float* diry; //!< y coordinate of ray direction + float* dirz; //!< z coordinate of ray direction + + float* tnear; //!< Start of ray segment (optional) + float* tfar; //!< End of ray segment (set to hit distance) + + float* time; //!< Time of this ray for motion blur (optional) + unsigned* mask; //!< Used to mask out objects during traversal (optional) + + /* hit data */ +public: + + float* Ngx; //!< x coordinate of geometry normal (optional) + float* Ngy; //!< y coordinate of geometry normal (optional) + float* Ngz; //!< z coordinate of geometry normal (optional) + + float* u; //!< Barycentric u coordinate of hit + float* v; //!< Barycentric v coordinate of hit + + unsigned* geomID; //!< geometry ID + unsigned* primID; //!< primitive ID + unsigned* instID; //!< instance ID (optional) +}; +#endif + +/* Helper functions to access hit packets of size N */ +#ifndef __RTCHitN__ +#define __RTCHitN__ +struct RTCHitN {}; +RTCORE_FORCEINLINE float& RTCHitN_Ng_x(const RTCHitN* ptr, size_t N, size_t i) { return ((float*)ptr)[0*N+i]; } //!< x coordinate of geometry normal +RTCORE_FORCEINLINE float& RTCHitN_Ng_y(const RTCHitN* ptr, size_t N, size_t i) { return ((float*)ptr)[1*N+i]; } //!< y coordinate of geometry normal +RTCORE_FORCEINLINE float& RTCHitN_Ng_z(const RTCHitN* ptr, size_t N, size_t i) { return ((float*)ptr)[2*N+i]; } //!< z coordinate of geometry normal + +RTCORE_FORCEINLINE unsigned& RTCHitN_instID(const RTCHitN* ptr, size_t N, size_t i) { return ((unsigned*)ptr)[3*N+i]; } //!< instance ID +RTCORE_FORCEINLINE unsigned& RTCHitN_geomID(const RTCHitN* ptr, size_t N, size_t i) { return ((unsigned*)ptr)[4*N+i]; } //!< geometry ID +RTCORE_FORCEINLINE unsigned& RTCHitN_primID(const RTCHitN* ptr, size_t N, size_t i) { return ((unsigned*)ptr)[5*N+i]; } //!< primitive ID + +RTCORE_FORCEINLINE float& RTCHitN_u (const RTCHitN* ptr, size_t N, size_t i) { return ((float*)ptr)[6*N+i]; } //!< Barycentric u coordinate of hit +RTCORE_FORCEINLINE float& RTCHitN_v (const RTCHitN* ptr, size_t N, size_t i) { return ((float*)ptr)[7*N+i]; } //!< Barycentric v coordinate of hit +RTCORE_FORCEINLINE float& RTCHitN_t (const RTCHitN* ptr, size_t N, size_t i) { return ((float*)ptr)[8*N+i]; } //!< hit distance +#endif + +/* Helper structure to create a hit packet of compile time size N */ +#ifndef __RTCHitNt__ +#define __RTCHitNt__ +template +struct RTCHitNt : public RTCHitN +{ + float Ngx[N]; //!< x coordinate of geometry normal + float Ngy[N]; //!< y coordinate of geometry normal + float Ngz[N]; //!< z coordinate of geometry normal + + unsigned instID[N]; //!< instance ID + unsigned geomID[N]; //!< geometry ID + unsigned primID[N]; //!< primitive ID + + float u[N]; //!< Barycentric u coordinate of hit + float v[N]; //!< Barycentric v coordinate of hit + float t[N]; //!< hit distance +}; +#endif + +/*! @} */ + +#endif diff --git a/pyembree/embree2/rtcore_ray.isph b/pyembree/embree2/rtcore_ray.isph new file mode 100644 index 0000000..27cc9fd --- /dev/null +++ b/pyembree/embree2/rtcore_ray.isph @@ -0,0 +1,172 @@ +// ======================================================================== // +// Copyright 2009-2018 Intel Corporation // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// ======================================================================== // + +#ifndef __RTCORE_RAY_ISPH__ +#define __RTCORE_RAY_ISPH__ + +#include "rtcore.isph" + +/*! \ingroup embree_kernel_api_ispc */ +/*! \{ */ + +/*! Ray structure for uniform (single) rays. */ +#ifndef __RTCRay1__ +#define __RTCRay1__ +struct RTCRay1 +{ + /* ray data */ + float org[3]; //!< Ray origin + float align0; //!< unused member to force alignment of following members + + float dir[3]; //!< Ray direction + float align1; //!< unused member to force alignment of following members + + float tnear; //!< Start of ray segment + float tfar; //!< End of ray segment (set to hit distance) + float time; //!< Time of this ray for motion blur + unsigned int mask; //!< Used to mask out objects during traversal + + /* hit data */ + float Ng[3]; //!< Unnormalized geometry normal + float align2; + + float u; //!< Barycentric u coordinate of hit + float v; //!< Barycentric v coordinate of hit + + unsigned int geomID; //!< geometry ID + unsigned int primID; //!< primitive ID + unsigned int instID; //!< instance ID + varying unsigned int align[0]; //!< aligns ray on stack to at least 16 bytes +}; +#endif + +/*! Ray structure for packets of 4 rays. */ +#ifndef __RTCRay__ +#define __RTCRay__ +struct RTCRay +{ + /* ray data */ + float orgx; //!< x coordinate of ray origin + float orgy; //!< y coordinate of ray origin + float orgz; //!< z coordinate of ray origin + + float dirx; //!< x coordinate of ray direction + float diry; //!< y coordinate of ray direction + float dirz; //!< z coordinate of ray direction + + float tnear; //!< Start of ray segment + float tfar; //!< End of ray segment + float time; //!< Time of this ray for motion blur + unsigned int mask; //!< Used to mask out objects during traversal + + /* hit data */ + float Ngx; //!< x coordinate of geometry normal + float Ngy; //!< y coordinate of geometry normal + float Ngz; //!< z coordinate of geometry normal + + float u; //!< Barycentric u coordinate of hit + float v; //!< Barycentric v coordinate of hit + + unsigned int geomID; //!< geometry ID + unsigned int primID; //!< primitive ID + unsigned int instID; //!< instance ID +}; +#endif + +/* Helper functions to access ray packets of runtime size N */ +#ifndef __RTCRayN__ +#define __RTCRayN__ +struct RTCRayN {}; +inline varying float& RTCRayN_org_x(RTCRayN* uniform ptr, uniform unsigned int N, uniform unsigned int i) { uniform unsigned int N1 = (uniform unsigned int)(N == 1); return *((varying float* uniform) &((uniform float*)ptr)[0*N+0*N1+i]); } //!< x coordinate of ray origin +inline varying float& RTCRayN_org_y(RTCRayN* uniform ptr, uniform unsigned int N, uniform unsigned int i) { uniform unsigned int N1 = (uniform unsigned int)(N == 1); return *((varying float* uniform) &((uniform float*)ptr)[1*N+0*N1+i]); } //!< y coordinate of ray origin +inline varying float& RTCRayN_org_z(RTCRayN* uniform ptr, uniform unsigned int N, uniform unsigned int i) { uniform unsigned int N1 = (uniform unsigned int)(N == 1); return *((varying float* uniform) &((uniform float*)ptr)[2*N+0*N1+i]); }; //!< z coordinate of ray origin + +inline varying float& RTCRayN_dir_x(RTCRayN* uniform ptr, uniform unsigned int N, uniform unsigned int i) { uniform unsigned int N1 = (uniform unsigned int)(N == 1); return *((varying float* uniform) &((uniform float*)ptr)[3*N+1*N1+i]); }; //!< x coordinate of ray direction +inline varying float& RTCRayN_dir_y(RTCRayN* uniform ptr, uniform unsigned int N, uniform unsigned int i) { uniform unsigned int N1 = (uniform unsigned int)(N == 1); return *((varying float* uniform) &((uniform float*)ptr)[4*N+1*N1+i]); }; //!< y coordinate of ray direction +inline varying float& RTCRayN_dir_z(RTCRayN* uniform ptr, uniform unsigned int N, uniform unsigned int i) { uniform unsigned int N1 = (uniform unsigned int)(N == 1); return *((varying float* uniform) &((uniform float*)ptr)[5*N+1*N1+i]); }; //!< z coordinate of ray direction + +inline varying float& RTCRayN_tnear(RTCRayN* uniform ptr, uniform unsigned int N, uniform unsigned int i) { uniform unsigned int N1 = (uniform unsigned int)(N == 1); return *((varying float* uniform) &((uniform float*)ptr)[6*N+2*N1+i]); }; //!< Start of ray segment +inline varying float& RTCRayN_tfar (RTCRayN* uniform ptr, uniform unsigned int N, uniform unsigned int i) { uniform unsigned int N1 = (uniform unsigned int)(N == 1); return *((varying float* uniform) &((uniform float*)ptr)[7*N+2*N1+i]); }; //!< End of ray segment (set to hit distance) + +inline varying float& RTCRayN_time(RTCRayN* uniform ptr, uniform unsigned int N, uniform unsigned int i) { uniform unsigned int N1 = (uniform unsigned int)(N == 1); return *((varying float* uniform) &((uniform float*)ptr)[8*N+2*N1+i]); }; //!< Time of this ray for motion blur +inline varying unsigned int& RTCRayN_mask(RTCRayN* uniform ptr, uniform unsigned int N, uniform unsigned int i) { uniform unsigned int N1 = (uniform unsigned int)(N == 1); return *((varying unsigned int* uniform) &((uniform unsigned int*)ptr)[9*N+2*N1+i]); }; //!< Used to mask out objects during traversal + +inline varying float& RTCRayN_Ng_x(RTCRayN* uniform ptr, uniform unsigned int N, uniform unsigned int i) { uniform unsigned int N1 = (uniform unsigned int)(N == 1); return *((varying float* uniform) &((uniform float*)ptr)[10*N+2*N1+i]); }; //!< x coordinate of geometry normal +inline varying float& RTCRayN_Ng_y(RTCRayN* uniform ptr, uniform unsigned int N, uniform unsigned int i) { uniform unsigned int N1 = (uniform unsigned int)(N == 1); return *((varying float* uniform) &((uniform float*)ptr)[11*N+2*N1+i]); }; //!< y coordinate of geometry normal +inline varying float& RTCRayN_Ng_z(RTCRayN* uniform ptr, uniform unsigned int N, uniform unsigned int i) { uniform unsigned int N1 = (uniform unsigned int)(N == 1); return *((varying float* uniform) &((uniform float*)ptr)[12*N+2*N1+i]); }; //!< z coordinate of geometry normal + +inline varying float& RTCRayN_u (RTCRayN* uniform ptr, uniform unsigned int N, uniform unsigned int i) { uniform unsigned int N1 = (uniform unsigned int)(N == 1); return *((varying float* uniform) &((uniform float*)ptr)[13*N+3*N1+i]); }; //!< Barycentric u coordinate of hit +inline varying float& RTCRayN_v (RTCRayN* uniform ptr, uniform unsigned int N, uniform unsigned int i) { uniform unsigned int N1 = (uniform unsigned int)(N == 1); return *((varying float* uniform) &((uniform float*)ptr)[14*N+3*N1+i]); }; //!< Barycentric v coordinate of hit + +inline varying unsigned int& RTCRayN_geomID(RTCRayN* uniform ptr, uniform unsigned int N, uniform unsigned int i) { uniform unsigned int N1 = (uniform unsigned int)(N == 1); return *((varying unsigned int* uniform) &((uniform unsigned int* )ptr)[15*N+3*N1+i]); }; //!< geometry ID +inline varying unsigned int& RTCRayN_primID(RTCRayN* uniform ptr, uniform unsigned int N, uniform unsigned int i) { uniform unsigned int N1 = (uniform unsigned int)(N == 1); return *((varying unsigned int* uniform) &((uniform unsigned int* )ptr)[16*N+3*N1+i]); }; //!< primitive ID +inline varying unsigned int& RTCRayN_instID(RTCRayN* uniform ptr, uniform unsigned int N, uniform unsigned int i) { uniform unsigned int N1 = (uniform unsigned int)(N == 1); return *((varying unsigned int* uniform) &((uniform unsigned int* )ptr)[17*N+3*N1+i]); }; //!< instance ID +#endif + +/*! \brief Ray structure template for packets of N rays in pointer SOA layout. */ +#ifndef __RTCRayNp__ +#define __RTCRayNp__ +struct RTCRayNp +{ + /* ray data */ + uniform float* uniform orgx; //!< x coordinate of ray origin + uniform float* uniform orgy; //!< y coordinate of ray origin + uniform float* uniform orgz; //!< z coordinate of ray origin + + uniform float* uniform dirx; //!< x coordinate of ray direction + uniform float* uniform diry; //!< y coordinate of ray direction + uniform float* uniform dirz; //!< z coordinate of ray direction + + uniform float* uniform tnear; //!< Start of ray segment (optional) + uniform float* uniform tfar; //!< End of ray segment (set to hit distance) + + uniform float* uniform time; //!< Time of this ray for motion blur (optional) + uniform unsigned int* uniform mask; //!< Used to mask out objects during traversal (optional) + + /* hit data */ + uniform float* uniform Ngx; //!< x coordinate of geometry normal (optional) + uniform float* uniform Ngy; //!< y coordinate of geometry normal (optional) + uniform float* uniform Ngz; //!< z coordinate of geometry normal (optional) + + uniform float* uniform u; //!< Barycentric u coordinate of hit + uniform float* uniform v; //!< Barycentric v coordinate of hit + + uniform unsigned int* uniform geomID; //!< geometry ID + uniform unsigned int* uniform primID; //!< primitive ID + uniform unsigned int* uniform instID; //!< instance ID (optional) +}; +#endif + +/* Helper functions to access hit packets of size N */ +#ifndef __RTCHitN__ +#define __RTCHitN__ +struct RTCHitN {}; +inline varying float& RTCHitN_Ng_x(const RTCHitN* uniform ptr, uniform unsigned int N, uniform unsigned int i) { return *((varying float* uniform) &((float* uniform)ptr)[0*N+i]); }; //!< x coordinate of geometry normal +inline varying float& RTCHitN_Ng_y(const RTCHitN* uniform ptr, uniform unsigned int N, uniform unsigned int i) { return *((varying float* uniform) &((float* uniform)ptr)[1*N+i]); }; //!< y coordinate of geometry normal +inline varying float& RTCHitN_Ng_z(const RTCHitN* uniform ptr, uniform unsigned int N, uniform unsigned int i) { return *((varying float* uniform) &((float* uniform)ptr)[2*N+i]); }; //!< z coordinate of geometry normal + +inline varying unsigned int& RTCHitN_instID(const RTCHitN* uniform ptr, uniform unsigned int N, uniform unsigned int i) { return *((varying unsigned int* uniform) &((unsigned int* uniform )ptr)[3*N+i]); }; //!< instance ID +inline varying unsigned int& RTCHitN_geomID(const RTCHitN* uniform ptr, uniform unsigned int N, uniform unsigned int i) { return *((varying unsigned int* uniform) &((unsigned int* uniform )ptr)[4*N+i]); }; //!< geometry ID +inline varying unsigned int& RTCHitN_primID(const RTCHitN* uniform ptr, uniform unsigned int N, uniform unsigned int i) { return *((varying unsigned int* uniform) &((unsigned int* uniform )ptr)[5*N+i]); }; //!< primitive ID + +inline varying float& RTCHitN_u (const RTCHitN* uniform ptr, uniform unsigned int N, uniform unsigned int i) { return *((varying float* uniform) &((float* uniform)ptr)[6*N+i]); }; //!< Barycentric u coordinate of hit +inline varying float& RTCHitN_v (const RTCHitN* uniform ptr, uniform unsigned int N, uniform unsigned int i) { return *((varying float* uniform) &((float* uniform)ptr)[7*N+i]); }; //!< Barycentric v coordinate of hit +inline varying float& RTCHitN_t (const RTCHitN* uniform ptr, uniform unsigned int N, uniform unsigned int i) { return *((varying float* uniform) &((float* uniform)ptr)[8*N+i]); }; //!< hit distance +#endif + +/*! @} */ + +#endif diff --git a/pyembree/embree2/rtcore_scene.h b/pyembree/embree2/rtcore_scene.h new file mode 100644 index 0000000..1a52428 --- /dev/null +++ b/pyembree/embree2/rtcore_scene.h @@ -0,0 +1,276 @@ +// ======================================================================== // +// Copyright 2009-2018 Intel Corporation // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// ======================================================================== // + +#ifndef __RTCORE_SCENE_H__ +#define __RTCORE_SCENE_H__ + +/*! \ingroup embree_kernel_api */ +/*! \{ */ + +/*! forward declarations for ray structures */ +struct RTCRay; +struct RTCRay4; +struct RTCRay8; +struct RTCRay16; +struct RTCRayNp; + +/*! scene flags */ +enum RTCSceneFlags +{ + /* dynamic type flags */ + RTC_SCENE_STATIC = (0 << 0), //!< specifies static scene + RTC_SCENE_DYNAMIC = (1 << 0), //!< specifies dynamic scene + + /* acceleration structure flags */ + RTC_SCENE_COMPACT = (1 << 8), //!< use memory conservative data structures + RTC_SCENE_COHERENT = (1 << 9), //!< optimize data structures for coherent rays + RTC_SCENE_INCOHERENT = (1 << 10), //!< optimize data structures for in-coherent rays (enabled by default) + RTC_SCENE_HIGH_QUALITY = (1 << 11), //!< create higher quality data structures + + /* traversal algorithm flags */ + RTC_SCENE_ROBUST = (1 << 16) //!< use more robust traversal algorithms +}; + +/*! enabled algorithm flags */ +enum RTCAlgorithmFlags +{ + RTC_INTERSECT1 = (1 << 0), //!< enables the rtcIntersect1 and rtcOccluded1 functions for this scene + RTC_INTERSECT4 = (1 << 1), //!< enables the rtcIntersect4 and rtcOccluded4 functions for this scene + RTC_INTERSECT8 = (1 << 2), //!< enables the rtcIntersect8 and rtcOccluded8 functions for this scene + RTC_INTERSECT16 = (1 << 3), //!< enables the rtcIntersect16 and rtcOccluded16 functions for this scene + RTC_INTERPOLATE = (1 << 4), //!< enables the rtcInterpolate function for this scene + RTC_INTERSECT_STREAM = (1 << 5), //!< enables the rtcIntersectN and rtcOccludedN functions for this scene +}; + +/*! intersection flags */ +enum RTCIntersectFlags +{ + RTC_INTERSECT_COHERENT = 0, //!< optimize for coherent rays + RTC_INTERSECT_INCOHERENT = 1 //!< optimize for incoherent rays +}; + +/*! intersection context passed to intersect/occluded calls */ +struct RTCIntersectContext +{ + RTCIntersectFlags flags; //!< intersection flags + void* userRayExt; //!< can be used to pass extended ray data to callbacks +}; + +/*! \brief Defines an opaque scene type */ +typedef struct __RTCScene {}* RTCScene; + +/*! Creates a new scene. + WARNING: This function is deprecated, use rtcDeviceNewScene instead. +*/ +RTCORE_API RTCORE_DEPRECATED RTCScene rtcNewScene (RTCSceneFlags flags, RTCAlgorithmFlags aflags); + +/*! Creates a new scene. */ +RTCORE_API RTCScene rtcDeviceNewScene (RTCDevice device, RTCSceneFlags flags, RTCAlgorithmFlags aflags); + +/*! \brief Type of progress callback function. */ +typedef bool (*RTCProgressMonitorFunc)(void* ptr, const double n); +RTCORE_DEPRECATED typedef RTCProgressMonitorFunc RTC_PROGRESS_MONITOR_FUNCTION; + +/*! \brief Sets the progress callback function which is called during hierarchy build of this scene. */ +RTCORE_API void rtcSetProgressMonitorFunction(RTCScene scene, RTCProgressMonitorFunc func, void* ptr); + +/*! Commits the geometry of the scene. After initializing or modifying + * geometries, commit has to get called before tracing + * rays. */ +RTCORE_API void rtcCommit (RTCScene scene); + +/*! Commits the geometry of the scene in join mode. When Embree is + * using TBB (default), threads that call `rtcCommitJoin` will + * participate in the hierarchy build procedure. When Embree is using + * the internal tasking system, exclusively threads that call + * `rtcCommitJoin` will execute the build procedure. Do not + * mix `rtcCommitJoin` with other commit calls. */ +RTCORE_API void rtcCommitJoin (RTCScene scene); + +/*! Commits the geometry of the scene. The calling threads will be + * used internally as a worker threads on some implementations. The + * function will wait until 'numThreads' threads have called this + * function and all threads return from the function after the scene + * commit is finished. The application threads will not be used as + * worker threads when the TBB tasking system is enabled (which is + * the default). On CPUs, we recommend also using TBB inside your + * application to share threads. We recommend using the + * rtcCommitThread feature to share threads on the Xeon Phi + * coprocessor. */ +RTCORE_API void rtcCommitThread(RTCScene scene, unsigned int threadID, unsigned int numThreads); + +/*! Returns AABB of the scene. rtcCommit has to get called + * previously to this function. */ +RTCORE_API void rtcGetBounds(RTCScene scene, RTCBounds& bounds_o); + +/*! Returns linear AABBs of the scene. The result bounds_o gets filled + * with AABBs for time 0 and time 1. rtcCommit has to get called + * previously to this function. */ +RTCORE_API void rtcGetLinearBounds(RTCScene scene, RTCBounds* bounds_o); + +/*! Intersects a single ray with the scene. The ray has to be aligned + * to 16 bytes. This function can only be called for scenes with the + * RTC_INTERSECT1 flag set. */ +RTCORE_API void rtcIntersect (RTCScene scene, RTCRay& ray); + +/*! Intersects a single ray with the scene. The ray has to be aligned + * to 16 bytes. This function can only be called for scenes with the + * RTC_INTERSECT1 flag set. */ +RTCORE_API void rtcIntersect1Ex (RTCScene scene, const RTCIntersectContext* context, RTCRay& ray); + +/*! Intersects a packet of 4 rays with the scene. The valid mask and + * ray have both to be aligned to 16 bytes. This function can only be + * called for scenes with the RTC_INTERSECT4 flag set. */ +RTCORE_API void rtcIntersect4 (const void* valid, RTCScene scene, RTCRay4& ray); + +/*! Intersects a packet of 4 rays with the scene. The valid mask and + * ray have both to be aligned to 16 bytes. This function can only be + * called for scenes with the RTC_INTERSECT4 flag set. */ +RTCORE_API void rtcIntersect4Ex (const void* valid, RTCScene scene, const RTCIntersectContext* context, RTCRay4& ray); + +/*! Intersects a packet of 8 rays with the scene. The valid mask and + * ray have both to be aligned to 32 bytes. This function can only be + * called for scenes with the RTC_INTERSECT8 flag set. For performance + * reasons, the rtcIntersect8 function should only get called if the + * CPU supports AVX. */ +RTCORE_API void rtcIntersect8 (const void* valid, RTCScene scene, RTCRay8& ray); + +/*! Intersects a packet of 8 rays with the scene. The valid mask and + * ray have both to be aligned to 32 bytes. This function can only be + * called for scenes with the RTC_INTERSECT8 flag set. For performance + * reasons, the rtcIntersect8 function should only get called if the + * CPU supports AVX. */ +RTCORE_API void rtcIntersect8Ex (const void* valid, RTCScene scene, const RTCIntersectContext* context, RTCRay8& ray); + +/*! Intersects a packet of 16 rays with the scene. The valid mask and + * ray have both to be aligned to 64 bytes. This function can only be + * called for scenes with the RTC_INTERSECT16 flag set. For + * performance reasons, the rtcIntersect16 function should only get + * called if the CPU supports the 16-wide SIMD instructions. */ +RTCORE_API void rtcIntersect16 (const void* valid, RTCScene scene, RTCRay16& ray); + +/*! Intersects a packet of 16 rays with the scene. The valid mask and + * ray have both to be aligned to 64 bytes. This function can only be + * called for scenes with the RTC_INTERSECT16 flag set. For + * performance reasons, the rtcIntersect16 function should only get + * called if the CPU supports the 16-wide SIMD instructions. */ +RTCORE_API void rtcIntersect16Ex (const void* valid, RTCScene scene, const RTCIntersectContext* context, RTCRay16& ray); + +/*! Intersects a stream of M rays with the scene. This function can + * only be called for scenes with the RTC_INTERSECT_STREAM flag set. The + * stride specifies the offset between rays in bytes. */ +RTCORE_API void rtcIntersect1M (RTCScene scene, const RTCIntersectContext* context, RTCRay* rays, const size_t M, const size_t stride); + +/*! Intersects a stream of pointers to M rays with the scene. This function can + * only be called for scenes with the RTC_INTERSECT_STREAM flag set. */ +RTCORE_API void rtcIntersect1Mp (RTCScene scene, const RTCIntersectContext* context, RTCRay** rays, const size_t M); + +/*! Intersects a stream of M ray packets of size N in SOA format with the + * scene. This function can only be called for scenes with the + * RTC_INTERSECT_STREAM flag set. The stride specifies the offset between + * ray packets in bytes. */ +RTCORE_API void rtcIntersectNM (RTCScene scene, const RTCIntersectContext* context, struct RTCRayN* rays, const size_t N, const size_t M, const size_t stride); + +/*! Intersects a stream of M ray packets of size N in SOA format with + * the scene. This function can only be called for scenes with the + * RTC_INTERSECT_STREAM flag set. The stride specifies the offset between + * ray packets in bytes. In contrast to the rtcIntersectNM function + * this function accepts a separate data pointer for each component + * of the ray packet. */ +RTCORE_API void rtcIntersectNp (RTCScene scene, const RTCIntersectContext* context, const RTCRayNp& rays, const size_t N); + +/*! Tests if a single ray is occluded by the scene. The ray has to be + * aligned to 16 bytes. This function can only be called for scenes + * with the RTC_INTERSECT1 flag set. */ +RTCORE_API void rtcOccluded (RTCScene scene, RTCRay& ray); + +/*! Tests if a single ray is occluded by the scene. The ray has to be + * aligned to 16 bytes. This function can only be called for scenes + * with the RTC_INTERSECT1 flag set. */ +RTCORE_API void rtcOccluded1Ex (RTCScene scene, const RTCIntersectContext* context, RTCRay& ray); + +/*! Tests if a packet of 4 rays is occluded by the scene. This + * function can only be called for scenes with the RTC_INTERSECT4 + * flag set. The valid mask and ray have both to be aligned to 16 + * bytes. */ +RTCORE_API void rtcOccluded4 (const void* valid, RTCScene scene, RTCRay4& ray); + +/*! Tests if a packet of 4 rays is occluded by the scene. This + * function can only be called for scenes with the RTC_INTERSECT4 + * flag set. The valid mask and ray have both to be aligned to 16 + * bytes. */ +RTCORE_API void rtcOccluded4Ex (const void* valid, RTCScene scene, const RTCIntersectContext* context, RTCRay4& ray); + +/*! Tests if a packet of 8 rays is occluded by the scene. The valid + * mask and ray have both to be aligned to 32 bytes. This function + * can only be called for scenes with the RTC_INTERSECT8 flag + * set. For performance reasons, the rtcOccluded8 function should + * only get called if the CPU supports AVX. */ +RTCORE_API void rtcOccluded8 (const void* valid, RTCScene scene, RTCRay8& ray); + +/*! Tests if a packet of 8 rays is occluded by the scene. The valid + * mask and ray have both to be aligned to 32 bytes. This function + * can only be called for scenes with the RTC_INTERSECT8 flag + * set. For performance reasons, the rtcOccluded8 function should + * only get called if the CPU supports AVX. */ +RTCORE_API void rtcOccluded8Ex (const void* valid, RTCScene scene, const RTCIntersectContext* context, RTCRay8& ray); + +/*! Tests if a packet of 16 rays is occluded by the scene. The valid + * mask and ray have both to be aligned to 64 bytes. This function + * can only be called for scenes with the RTC_INTERSECT16 flag + * set. For performance reasons, the rtcOccluded16 function should + * only get called if the CPU supports the 16-wide SIMD + * instructions. */ +RTCORE_API void rtcOccluded16 (const void* valid, RTCScene scene, RTCRay16& ray); + +/*! Tests if a packet of 16 rays is occluded by the scene. The valid + * mask and ray have both to be aligned to 64 bytes. This function + * can only be called for scenes with the RTC_INTERSECT16 flag + * set. For performance reasons, the rtcOccluded16 function should + * only get called if the CPU supports the 16-wide SIMD + * instructions. */ +RTCORE_API void rtcOccluded16Ex (const void* valid, RTCScene scene, const RTCIntersectContext* context, RTCRay16& ray); + +/*! Tests if a stream of M rays is occluded by the scene. This + * function can only be called for scenes with the RTC_INTERSECT_STREAM + * flag set. The stride specifies the offset between rays in bytes.*/ +RTCORE_API void rtcOccluded1M (RTCScene scene, const RTCIntersectContext* context, RTCRay* rays, const size_t M, const size_t stride); + +/*! Tests if a stream of pointers to M rays is occluded by the scene. This + * function can only be called for scenes with the RTC_INTERSECT_STREAM + * flag set. */ +RTCORE_API void rtcOccluded1Mp (RTCScene scene, const RTCIntersectContext* context, RTCRay** rays, const size_t M); + +/*! Tests if a stream of M ray packets of size N in SOA format is occluded by + * the scene. This function can only be called for scenes with the + * RTC_INTERSECT_STREAM flag set. The stride specifies the offset between + * rays in bytes.*/ +RTCORE_API void rtcOccludedNM (RTCScene scene, const RTCIntersectContext* context, struct RTCRayN* rays, const size_t N, const size_t M, const size_t stride); + +/*! Tests if a stream of M ray packets of size N in SOA format is + * occluded by the scene. This function can only be called for scenes + * with the RTC_INTERSECT_STREAM flag set. The stride specifies the offset + * between rays in bytes. In contrast to the rtcOccludedNM function + * this function accepts a separate data pointer for each component + * of the ray packet. */ +RTCORE_API void rtcOccludedNp (RTCScene scene, const RTCIntersectContext* context, const RTCRayNp& rays, const size_t N); + +/*! Deletes the scene. All contained geometry get also destroyed. */ +RTCORE_API void rtcDeleteScene (RTCScene scene); + +/*! @} */ + +#endif diff --git a/pyembree/embree2/rtcore_scene.isph b/pyembree/embree2/rtcore_scene.isph new file mode 100644 index 0000000..f5b7c77 --- /dev/null +++ b/pyembree/embree2/rtcore_scene.isph @@ -0,0 +1,231 @@ +// ======================================================================== // +// Copyright 2009-2018 Intel Corporation // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// ======================================================================== // + +#ifndef __RTCORE_SCENE_ISPH__ +#define __RTCORE_SCENE_ISPH__ + +/*! \ingroup embree_kernel_api */ +/*! \{ */ + +/*! forward declarations for ray structures */ +struct RTCRay1; +struct RTCRay; +struct RTCRayNp; + +/*! scene flags */ +enum RTCSceneFlags +{ + /* dynamic type flags */ + RTC_SCENE_STATIC = (0 << 0), //!< specifies static scene + RTC_SCENE_DYNAMIC = (1 << 0), //!< specifies dynamic scene + + /* acceleration structure flags */ + RTC_SCENE_COMPACT = (1 << 8), //!< use memory conservative data structures + RTC_SCENE_COHERENT = (1 << 9), //!< optimize data structures for coherent rays (enabled by default) + RTC_SCENE_INCOHERENT = (1 << 10), //!< optimize data structures for in-coherent rays + RTC_SCENE_HIGH_QUALITY = (1 << 11), //!< create higher quality data structures + + /* traversal algorithm flags */ + RTC_SCENE_ROBUST = (1 << 16) //!< use more robust traversal algorithms +}; + +/*! enabled algorithm flags */ +enum RTCAlgorithmFlags +{ + RTC_INTERSECT_UNIFORM = (1 << 0), //!< enables the uniform rtcIntersect1 and uniform rtcOccluded1 functions for this scene + RTC_INTERSECT_VARYING = (1 << 1) | (1 << 2) | (1 << 3), //!< enables the varying rtcIntersect and varying rtcOccluded functions for this scene + RTC_INTERPOLATE = (1 << 4), //!< enables the rtcInterpolate function for this scene + RTC_INTERSECT_STREAM = (1 << 5), //!< enables the rtcIntersectN and rtcOccludedN functions for this scene +}; + +/*! intersection flags */ +enum RTCIntersectFlags +{ + RTC_INTERSECT_COHERENT = 0, //!< optimize for coherent rays + RTC_INTERSECT_INCOHERENT = 1 //!< optimize for incoherent rays +}; + +/*! intersection context passed to intersect/occluded calls */ +struct RTCIntersectContext +{ + RTCIntersectFlags flags; //!< intersection flags + void* userRayExt; //!< can be used to pass extended ray data to callbacks +}; + +/*! \brief Defines an opaque scene type */ +typedef uniform struct __RTCScene {}* uniform RTCScene; + +/*! Creates a new scene. + WARNING: This function is deprecated, use rtcDeviceNewScene instead. +*/ +RTCORE_DEPRECATED RTCScene rtcNewScene (uniform RTCSceneFlags flags, uniform RTCAlgorithmFlags aflags); + +/*! Creates a new scene. */ +RTCScene rtcDeviceNewScene (RTCDevice device, uniform RTCSceneFlags flags, uniform RTCAlgorithmFlags aflags); + +/*! \brief Type of progress callback function. */ +typedef unmasked uniform bool (*uniform RTCProgressMonitorFunc)(void* uniform ptr, const uniform double n); +RTCORE_DEPRECATED typedef unmasked uniform bool (*uniform RTC_PROGRESS_MONITOR_FUNCTION)(void* uniform ptr, const uniform double n); + +/*! \brief Sets the progress callback function which is called during hierarchy build. */ +void rtcSetProgressMonitorFunction(RTCScene scene, RTCProgressMonitorFunc func, void* uniform ptr); + +/*! Commits the geometry of the scene. After initializing or modifying + * geometries, commit has to get called before tracing + * rays. */ +void rtcCommit (RTCScene scene); + +/*! Commits the geometry of the scene in join mode. When Embree is + * using TBB (default), threads that call `rtcCommitJoin` will + * participate in the hierarchy build procedure. When Embree is using + * the internal tasking system, exclusively threads that call + * `rtcCommitJoin` will execute the build procedure. Do not + * mix `rtcCommitJoin` with other commit calls. */ +void rtcCommitJoin (RTCScene scene); + +/*! Commits the geometry of the scene. The calling threads will be + * used internally as a worker threads on some implementations. The + * function will wait until 'numThreads' threads have called this + * function and all threads return from the function after the scene + * commit is finished. The application threads will not be used as + * worker threads when the TBB tasking system is enabled (which is + * the default). On CPUs, we recommend also using TBB inside your + * application to share threads. We recommend using the + * rtcCommitThread feature to share threads on the Xeon Phi + * coprocessor. */ +void rtcCommitThread(RTCScene scene, uniform unsigned int threadID, uniform unsigned int numThreads); + +/*! Returns to AABB of the scene. rtcCommit has to get called + * previously to this function. */ +void rtcGetBounds(RTCScene scene, uniform RTCBounds& bounds_o); + +/*! Returns linear AABBs of the scene. The result bounds_o gets filled + * with AABBs for time 0 and time 1. rtcCommit has to get called + * previously to this function. */ +void rtcGetLinearBounds(RTCScene scene, uniform RTCBounds* uniform bounds_o); + +/*! Intersects a uniform ray with the scene. This function can only be + * called for scenes with the RTC_INTERSECT_UNIFORM flag set. The ray + * has to be aligned to 16 bytes. */ +void rtcIntersect1 (RTCScene scene, uniform RTCRay1& ray); + +/*! Intersects a uniform ray with the scene. This function can only be + * called for scenes with the RTC_INTERSECT_UNIFORM flag set. The ray + * has to be aligned to 16 bytes. */ +void rtcIntersect1Ex (RTCScene scene, const uniform RTCIntersectContext* uniform context, uniform RTCRay1& ray); + +/*! Intersects a varying ray with the scene. This function can only be + * called for scenes with the RTC_INTERSECT_VARYING flag set. The + * valid mask and ray have both to be aligned to sizeof(varing float) + * bytes. */ +void rtcIntersect (RTCScene scene, varying RTCRay& ray); + +/*! Intersects a varying ray with the scene. This function can only be + * called for scenes with the RTC_INTERSECT_VARYING flag set. The + * valid mask and ray have both to be aligned to sizeof(varing float) + * bytes. */ +void rtcIntersectEx (RTCScene scene, const uniform RTCIntersectContext* uniform context, varying RTCRay& ray); + +/*! Intersects a stream of M rays in AOS layout with the scene. This + * function can only be called for scenes with the RTC_INTERSECT_STREAM + * flag set. The stride specifies the offset between rays in + * bytes. */ +void rtcIntersect1M (RTCScene scene, const uniform RTCIntersectContext* uniform context, uniform RTCRay1* uniform rays, const uniform size_t M, const uniform size_t stride); + +/*! Intersects a stream of pointers to M rays with the scene. This + * function can only be called for scenes with the + * RTC_INTERSECT_STREAM flag set. */ +void rtcIntersect1Mp (RTCScene scene, const uniform RTCIntersectContext* uniform context, uniform RTCRay1** uniform rays, const uniform size_t M); + +/*! Intersects a stream of M ray packets in SOA format with the scene. This + * function can only be called for scenes with the RTC_INTERSECT_STREAM + * flag set. The stride specifies the offset between rays in + * bytes. */ +void rtcIntersectVM (RTCScene scene, const uniform RTCIntersectContext* uniform context, varying RTCRay* uniform rays, const uniform size_t M, const uniform size_t stride); + +/*! Intersects a stream of M ray packets of size N in SOA format with the + * scene. This function can only be called for scenes with the + * RTC_INTERSECT_STREAM flag set. The stride specifies the offset between + * ray packets in bytes. */ +void rtcIntersectNM (RTCScene scene, const uniform RTCIntersectContext* uniform context, struct RTCRayN* uniform rays, const uniform size_t N, const uniform size_t M, const uniform size_t stride); + +/*! Intersects a stream of M ray packets of size N in SOA format with + * the scene. This function can only be called for scenes with the + * RTC_INTERSECT_STREAM flag set. The stride specifies the offset between + * ray packets in bytes. In contrast to the rtcIntersectNM function + * this function accepts a separate data pointer for each component + * of the ray packet. */ +void rtcIntersectNp (RTCScene scene, const uniform RTCIntersectContext* uniform context, const uniform RTCRayNp& rays, const uniform size_t N); + +/*! Tests if a uniform ray is occluded by the scene. This function can + * only be called for scenes with the RTC_INTERSECT_UNIFORM flag + * set. The ray has to be aligned to 16 bytes. */ +void rtcOccluded1 (RTCScene scene, uniform RTCRay1& ray); + +/*! Tests if a uniform ray is occluded by the scene. This function can + * only be called for scenes with the RTC_INTERSECT_UNIFORM flag + * set. The ray has to be aligned to 16 bytes. */ +void rtcOccluded1Ex (RTCScene scene, const uniform RTCIntersectContext* uniform context, uniform RTCRay1& ray); + +/*! Tests if a varying ray is occluded by the scene. This function can + * only be called for scenes with the RTC_INTERSECT_VARYING flag + * set. The valid mask and ray have both to be aligned to + * sizeof(varing float) bytes. */ +void rtcOccluded (RTCScene scene, varying RTCRay& ray); + +/*! Tests if a varying ray is occluded by the scene. This function can + * only be called for scenes with the RTC_INTERSECT_VARYING flag + * set. The valid mask and ray have both to be aligned to + * sizeof(varing float) bytes. */ +void rtcOccludedEx (RTCScene scene, const uniform RTCIntersectContext* uniform context, varying RTCRay& ray); + +/*! Tests if a stream of M rays in AOS layout is occluded by the + * scene. This function can only be called for scenes with the + * RTC_INTERSECT_STREAM flag set. The stride specifies the offset between + * rays in bytes.*/ +void rtcOccluded1M (RTCScene scene, const uniform RTCIntersectContext* uniform context, uniform RTCRay1* uniform rays, const uniform size_t M, const uniform size_t stride); + +/*! Tests if a stream of pointers to M rays in AOS layout is occluded by the + * scene. This function can only be called for scenes with the + * RTC_INTERSECT_STREAM flag set. */ +void rtcOccluded1Mp (RTCScene scene, const uniform RTCIntersectContext* uniform context, uniform RTCRay1** uniform rays, const uniform size_t M); + +/*! Tests if a stream of M ray packets in SOA format is occluded by the + * scene. This function can only be called for scenes with the + * RTC_INTERSECT_STREAM flag set. The stride specifies the offset between + * rays in bytes.*/ +void rtcOccludedVM (RTCScene scene, const uniform RTCIntersectContext* uniform context, varying RTCRay* uniform rays, const uniform size_t M, const uniform size_t stride); + +/*! Tests if a stream of M ray packets of size N in SOA format is + * occluded by the scene. This function can only be called for scenes + * with the RTC_INTERSECT_STREAM flag set. The stride specifies the offset + * between rays in bytes.*/ +void rtcOccludedNM (RTCScene scene, const uniform RTCIntersectContext* uniform context, struct RTCRayN* uniform rays, const uniform size_t N, const uniform size_t M, const uniform size_t stride); + +/*! Tests if a stream of M ray packets of size N in SOA format is + * occluded by the scene. This function can only be called for scenes + * with the RTC_INTERSECT_STREAM flag set. The stride specifies the offset + * between rays in bytes. In contrast to the rtcOccludedNM function + * this function accepts a separate data pointer for each component + * of the ray packet. */ +void rtcOccludedNp (RTCScene scene, const uniform RTCIntersectContext* uniform context, const uniform RTCRayNp& rays, const uniform size_t N); + +/*! Deletes the geometry again. */ +void rtcDeleteScene (RTCScene scene); + +/*! @} */ + +#endif diff --git a/pyembree/embree2/rtcore_version.h b/pyembree/embree2/rtcore_version.h new file mode 100644 index 0000000..22eb51e --- /dev/null +++ b/pyembree/embree2/rtcore_version.h @@ -0,0 +1,21 @@ +// ======================================================================== // +// Copyright 2009-2018 Intel Corporation // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// ======================================================================== // + +#define RTCORE_VERSION_MAJOR 2 +#define RTCORE_VERSION_MINOR 17 +#define RTCORE_VERSION_PATCH 7 +#define RTCORE_VERSION 21707 +#define RTCORE_VERSION_STRING "2.17.7" diff --git a/pyembree/mesh_construction.pyx b/pyembree/mesh_construction.pyx index 0ed91ab..4630d0f 100644 --- a/pyembree/mesh_construction.pyx +++ b/pyembree/mesh_construction.pyx @@ -1,10 +1,13 @@ +# distutils: language=c++ + + cimport numpy as np -cimport rtcore as rtc -cimport rtcore_ray as rtcr -cimport rtcore_scene as rtcs -cimport rtcore_geometry as rtcg -cimport rtcore_geometry_user as rtcgu -from rtcore cimport Vertex, Triangle +cimport pyembree.rtcore as rtc +cimport pyembree.rtcore_ray as rtcr +cimport pyembree.rtcore_scene as rtcs +cimport pyembree.rtcore_geometry as rtcg +cimport pyembree.rtcore_geometry_user as rtcgu +from pyembree.rtcore cimport Vertex, Triangle cdef extern from "mesh_construction.h": diff --git a/pyembree/rtcore.pxd b/pyembree/rtcore.pxd index 989e47b..93df7f2 100644 --- a/pyembree/rtcore.pxd +++ b/pyembree/rtcore.pxd @@ -1,4 +1,6 @@ # rtcore.pxd wrapper +# distutils: language=c++ + cimport cython cimport numpy as np diff --git a/pyembree/rtcore.pyx b/pyembree/rtcore.pyx index 977f388..f8f2abe 100644 --- a/pyembree/rtcore.pyx +++ b/pyembree/rtcore.pyx @@ -1,3 +1,6 @@ +# distutils: language=c++ + + import logging diff --git a/pyembree/rtcore_geometry.pxd b/pyembree/rtcore_geometry.pxd index 3c002a1..c91819d 100644 --- a/pyembree/rtcore_geometry.pxd +++ b/pyembree/rtcore_geometry.pxd @@ -1,7 +1,9 @@ # rtcore_geometry wrapper +# distutils: language=c++ -from .rtcore_ray cimport RTCRay, RTCRay4, RTCRay8, RTCRay16 -from .rtcore_scene cimport RTCScene + +from pyembree.rtcore_ray cimport RTCRay, RTCRay4, RTCRay8, RTCRay16 +from pyembree.rtcore_scene cimport RTCScene cimport cython cimport numpy as np @@ -17,13 +19,13 @@ cdef extern from "embree2/rtcore_geometry.h": RTC_FACE_BUFFER RTC_LEVEL_BUFFER - RTC_EDGE_CREASE_INDEX_BUFFER - RTC_EDGE_CREASE_WEIGHT_BUFFER + RTC_EDGE_CREASE_INDEX_BUFFER + RTC_EDGE_CREASE_WEIGHT_BUFFER - RTC_VERTEX_CREASE_INDEX_BUFFER - RTC_VERTEX_CREASE_WEIGHT_BUFFER + RTC_VERTEX_CREASE_INDEX_BUFFER + RTC_VERTEX_CREASE_WEIGHT_BUFFER - RTC_HOLE_BUFFER + RTC_HOLE_BUFFER cdef enum RTCMatrixType: RTC_MATRIX_ROW_MAJOR @@ -52,7 +54,7 @@ cdef extern from "embree2/rtcore_geometry.h": unsigned rtcNewInstance(RTCScene target, RTCScene source) void rtcSetTransform(RTCScene scene, unsigned geomID, RTCMatrixType layout, const float *xfm) - unsigned rtcNewTriangleMesh(RTCScene scene, RTCGeometryFlags flags, + unsigned rtcNewTriangleMesh(RTCScene scene, RTCGeometryFlags flags, size_t numTriangles, size_t numVertices, size_t numTimeSteps) @@ -85,4 +87,3 @@ cdef extern from "embree2/rtcore_geometry.h": void rtcSetUserData (RTCScene scene, unsigned geomID, void* ptr) void* rtcGetUserData (RTCScene scene, unsigned geomID) void rtcDeleteGeometry (RTCScene scene, unsigned geomID) - diff --git a/pyembree/rtcore_geometry_user.pxd b/pyembree/rtcore_geometry_user.pxd index f1ad5fb..9428cf6 100644 --- a/pyembree/rtcore_geometry_user.pxd +++ b/pyembree/rtcore_geometry_user.pxd @@ -1,9 +1,11 @@ # rtcore_geometry_user wrapper +# distutils: language=c++ + #from libc.stdint cimport ssize_t, size_t -from .rtcore_ray cimport RTCRay, RTCRay4, RTCRay8, RTCRay16 -from .rtcore_geometry cimport RTCBounds -from .rtcore_scene cimport RTCScene +from pyembree.rtcore_ray cimport RTCRay, RTCRay4, RTCRay8, RTCRay16 +from pyembree.rtcore_geometry cimport RTCBounds +from pyembree.rtcore_scene cimport RTCScene cimport cython cimport numpy as np diff --git a/pyembree/rtcore_ray.pxd b/pyembree/rtcore_ray.pxd index 3f248b0..7cfd46f 100644 --- a/pyembree/rtcore_ray.pxd +++ b/pyembree/rtcore_ray.pxd @@ -1,4 +1,6 @@ # rtcore_ray.pxd wrapper +# distutils: language=c++ + cimport cython cimport numpy as np diff --git a/pyembree/rtcore_scene.pxd b/pyembree/rtcore_scene.pxd index 006357a..da4b44f 100644 --- a/pyembree/rtcore_scene.pxd +++ b/pyembree/rtcore_scene.pxd @@ -1,9 +1,11 @@ # rtcore_scene.pxd wrapper +# distutils: language=c++ + cimport cython cimport numpy as np -cimport rtcore as rtc -cimport rtcore_ray as rtcr +cimport pyembree.rtcore as rtc +cimport pyembree.rtcore_ray as rtcr cdef extern from "embree2/rtcore_scene.h": diff --git a/pyembree/rtcore_scene.pyx b/pyembree/rtcore_scene.pyx index be5e58e..a2b21e5 100644 --- a/pyembree/rtcore_scene.pyx +++ b/pyembree/rtcore_scene.pyx @@ -1,11 +1,14 @@ +# distutils: language=c++ + + cimport cython cimport numpy as np import numpy as np import logging import numbers -cimport rtcore as rtc -cimport rtcore_ray as rtcr -cimport rtcore_geometry as rtcg +cimport pyembree.rtcore as rtc +cimport pyembree.rtcore_ray as rtcr +cimport pyembree.rtcore_geometry as rtcg log = logging.getLogger('pyembree') @@ -55,7 +58,7 @@ cdef class EmbreeScene: query_type = distance else: - raise ValueError("Embree ray query type %s not recognized." + raise ValueError("Embree ray query type %s not recognized." "\nAccepted types are (INTERSECT,OCCLUDED,DISTANCE)" % (query)) if dists is None: diff --git a/pyembree/tbb.dll b/pyembree/tbb.dll new file mode 100644 index 0000000..85243e9 Binary files /dev/null and b/pyembree/tbb.dll differ diff --git a/pyembree/tbbmalloc.dll b/pyembree/tbbmalloc.dll new file mode 100644 index 0000000..b825339 Binary files /dev/null and b/pyembree/tbbmalloc.dll differ diff --git a/pyembree/triangles.pyx b/pyembree/triangles.pyx index 4cb0f4c..c7bb54d 100644 --- a/pyembree/triangles.pyx +++ b/pyembree/triangles.pyx @@ -1,10 +1,13 @@ +# distutils: language=c++ + + cimport numpy as np -cimport rtcore as rtc -cimport rtcore_ray as rtcr -cimport rtcore_scene as rtcs -cimport rtcore_geometry as rtcg -cimport rtcore_geometry_user as rtcgu -from rtcore cimport Vertex, Triangle, Vec3f +cimport pyembree.rtcore as rtc +cimport pyembree.rtcore_ray as rtcr +cimport pyembree.rtcore_scene as rtcs +cimport pyembree.rtcore_geometry as rtcg +cimport pyembree.rtcore_geometry_user as rtcgu +from pyembree.rtcore cimport Vertex, Triangle, Vec3f from libc.stdlib cimport malloc, free ctypedef Vec3f (*renderPixelFunc)(float x, float y, diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..69ba1c2 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,36 @@ +[tool.poetry] +name = "pyembree" +version = "0.1.7" +description = "Python wrapper for embree" +authors = ["Anthony Scopatz , Adam Hendry "] +license = "BSD 2-Clause \"Simplified\"" +classifiers = [ + "License :: OSI Approved :: BSD 2-Clause Simplified", + "Operating System :: Windows", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", +] + +[tool.poetry.dependencies] +python = "^3.8" +numpy = "^1.22.2" +Cython = "^0.29.28" +setuptools = "^60.9.3" +wheel = "^0.37.1" +trimesh = "^3.10.7" +Rtree = "^1.0.0" + +[tool.poetry.dev-dependencies] +pylint = "^2.12.2" +pytest = "^7.0.1" +coverage = "^6.3.2" +ipython = "^8.1.1" + +[build-system] +requires = [ + "Cython", + "numpy", + "setuptools>=45", + "wheel" +] +build-backend = "setuptools.build_meta" diff --git a/recipes/pyembree/build.sh b/recipes/pyembree/build.sh deleted file mode 100644 index 5db9a50..0000000 --- a/recipes/pyembree/build.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -export LD_LIBRARY_PATH=$PREFIX/lib -export PATH=$PREFIX/bin:$PATH -export DYLD_FALLBACK_LIBRARY_PATH=$PREFIX/lib/cyclus:$PREFIX/lib -export C_INCLUDE_PATH=$PREFIX/include:$C_INCLUDE_PATH -export CPLUS_INCLUDE_PATH=$PREFIX/include:$CPLUS_INCLUDE_PATH - -python setup.py install --prefix=$PREFIX diff --git a/recipes/pyembree/meta.yaml b/recipes/pyembree/meta.yaml deleted file mode 100644 index ca99c06..0000000 --- a/recipes/pyembree/meta.yaml +++ /dev/null @@ -1,26 +0,0 @@ -package: - name: pyembree - version: 0.1.6 - -source: - #fn: cymetric-src.tar.gz # ["TRAVIS" not in environ] - #url: https://github.com/scopatz/pyembree/archive/master.tar.gz # ["TRAVIS" not in environ] - #path: ../.. # ["TRAVIS" in environ] - path: ../.. - -requirements: - build: - - embree - - python - - cython - - numpy - - setuptools - run: - - embree - - python - - numpy - - -about: - home: - license: BSD 2 Clause diff --git a/rever.xsh b/rever.xsh deleted file mode 100644 index b0a9d03..0000000 --- a/rever.xsh +++ /dev/null @@ -1,27 +0,0 @@ -from rever.activity import dockeractivity - -$PROJECT = $GITHUB_REPO = 'pyembree' -$GITHUB_ORG = 'scopatz' -$WEBSITE_URL = 'https://github.com/scopatz/pyembree' - -with! dockeractivity(name='pyembree-examples', lang='sh'): - python examples/attenuate.py --no-plots - -$ACTIVITIES = ['authors', 'pyembree-examples', 'version_bump', 'changelog', - 'tag', 'push_tag', 'conda_forge','ghrelease' - ] - -$VERSION_BUMP_PATTERNS = [ - ('recipes/pyembree/meta.yaml', 'version:.*', 'version: $VERSION'), - ('pyembree/__init__.py', r'__version__\s*=.*', "__version__ = '$VERSION'"), - ('setup.py', r'version\s*=.*', "version='$VERSION',"), - ] -$CHANGELOG_FILENAME = 'CHANGELOG.rst' -$CHANGELOG_TEMPLATE = 'TEMPLATE.rst' - -$DOCKER_APT_DEPS = ['gcc'] -$DOCKER_CONDA_DEPS = ['numpy', 'embree', 'gcc', 'setuptools', 'cython'] -$DOCKER_INSTALL_COMMAND = ('git clean -fdx && ' - './setup.py install') -$DOCKER_GIT_NAME = 'Anthony Scopatz' -$DOCKER_GIT_EMAIL = 'scopatz@gmail.com' diff --git a/setup.py b/setup.py index c9ff0b9..95df128 100755 --- a/setup.py +++ b/setup.py @@ -1,23 +1,43 @@ -#!/usr/bin/env python - -from setuptools import setup, find_packages +from importlib import metadata import numpy as np + +# setuptools must be imported before cython. setuptools overrides the +# distutils.extension.Extension class. If imported after, the isinstance check in +# distutils.command.check_extensions_list fails and setuptools gives the erroneous +# error: +# +# "error: each element of 'ext_modules' option must be an Extension instance or 2-tuple" +# +# ref: https://github.com/cython/cython/issues/4724 +import setuptools +from setuptools import find_packages, setup from Cython.Build import cythonize -include_path = [np.get_include()] +include_path = [ + np.get_include(), +] + +ext_modules = cythonize( + module_list="pyembree/*.pyx", + language_level=3, + include_path=include_path, +) -ext_modules = cythonize('pyembree/*.pyx', language='c++', - include_path=include_path) for ext in ext_modules: ext.include_dirs = include_path - ext.libraries = ["embree"] + ext.libraries = [ + "pyembree/embree2/lib/embree", + "pyembree/embree2/lib/tbb", + "pyembree/embree2/lib/tbbmalloc", + ] setup( name="pyembree", - version='0.1.6', + version=metadata.version("pyembree"), ext_modules=ext_modules, zip_safe=False, packages=find_packages(), - package_data = {'pyembree': ['*.pxd']} + include_package_data=True, + package_data={"pyembree": ["*.dll"]}, )